Change topic names in RTAB-Map node

classic Classic list List threaded Threaded
4 messages Options
skn
Reply | Threaded
Open this post in threaded view
|

Change topic names in RTAB-Map node

skn
Hi,

I've been using RTAB-Map for a while now for mapping and localization, and it works very well. I have been able to modify the rtabmap.launch file with the names of the topics I wanted to subscribe to.

However I would now like to use the RTAB-Map node (with rosrun rtabmap_ros rtabmap, as described on this page), but I don't know how to change the names of the topics the node is subscribing to, for example rgb/image. What file should I modify?


Thanks for your answer, and for the package!

Sakina
Reply | Threaded
Open this post in threaded view
|

Re: Change topic names in RTAB-Map node

matlabbe
Administrator
Hi Sakina,

Here is an example:
$ rosrun rtabmap_ros rtabmap \
   odom:=/my_odom_topic \
   rgb/image:=/camera/rgb/image_rect_color \
   rgb/camera_info:=/camera/rgb/camera_info \
   depth/image:=/camera/depth_registered/image_raw \
   _frame_id:=camera_link \
   --delete_db_on_start

Parameters should have an underscore prefix ("_") while topics not. Verify that remapping is okay with corresponding message on the terminal:
[ INFO] [1495547604.132336085]: Starting node...
[ INFO] [1495547604.310353968]: Initializing nodelet with 4 worker threads.
[ INFO] [1495547605.174315689]: /rtabmap(maps): map_filter_radius          = 0.000000
[ INFO] [1495547605.174432110]: /rtabmap(maps): map_filter_angle           = 30.000000
[ INFO] [1495547605.174498837]: /rtabmap(maps): map_cleanup                = true
[ INFO] [1495547605.174565597]: /rtabmap(maps): map_negative_poses_ignored = false
[ INFO] [1495547605.174630134]: /rtabmap(maps): map_negative_scan_ray_tracing = true
[ INFO] [1495547605.174695340]: /rtabmap(maps): cloud_output_voxelized     = true
[ INFO] [1495547605.174768160]: /rtabmap(maps): cloud_subtract_filtering   = false
[ INFO] [1495547605.175265530]: /rtabmap(maps): cloud_subtract_filtering_min_neighbors = 2
[ INFO] [1495547605.184010119]: /rtabmap(maps): octomap_tree_depth         = 16
[ INFO] [1495547605.184126916]: /rtabmap(maps): octomap_occupancy_thr      = 0.500000
[ INFO] [1495547605.260523105]: rtabmap: frame_id      = camera_link
[ INFO] [1495547605.260652363]: rtabmap: map_frame_id  = map
[ INFO] [1495547605.260753137]: rtabmap: tf_delay      = 0.050000
[ INFO] [1495547605.260835932]: rtabmap: tf_tolerance  = 0.100000
[ INFO] [1495547605.261256194]: rtabmap: odom_sensor_sync   = false
[ INFO] [1495547608.268132919]: RTAB-Map detection rate = 1.000000 Hz
[ INFO] [1495547608.268467996]: rtabmap: Deleted database "/home/mathieu/.ros/rtabmap.db" (--delete_db_on_start or -d are set).
[ INFO] [1495547608.268529583]: rtabmap: Using database from "/home/mathieu/.ros/rtabmap.db".
[ INFO] [1495547608.604228880]: rtabmap: Database version = "0.12.5".
[ INFO] [1495547608.711678390]: /rtabmap: queue_size    = 10
[ INFO] [1495547608.712141040]: /rtabmap: rgbd_cameras = 1
[ INFO] [1495547608.712382657]: /rtabmap: approx_sync   = true
[ INFO] [1495547608.712752272]: Setup depth callback
[ INFO] [1495547608.950773787]: 
/rtabmap subscribed to (approx sync):
   /my_odom_topic,
   /camera/rgb/image_rect_color,
   /camera/depth_registered/image_raw,
   /camera/rgb/camera_info
[ INFO] [1495547608.961648508]: rtabmap 0.12.5 started...

cheers,
Mathieu
skn
Reply | Threaded
Open this post in threaded view
|

Re: Change topic names in RTAB-Map node

skn
Thank you, this reply works.
I have another question about RTAB-Map, is it possible to use a topic of type sensor_msgs/Range (an ultrasound topic) instead of a topic of type sensor_msgs/LaserScan?

Thank you for your time and help.
Reply | Threaded
Open this post in threaded view
|

Re: Change topic names in RTAB-Map node

matlabbe
Administrator
Hi,

no, it is not possible.