ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Can't keep pointcloud in Rviz when building a map with rtabmap_ros

asked 2015-05-21 10:24:06 -0600

F.Brosseau gravatar image

Hello everybody,

I have a problem with the rtabmap. I am able to see "parts" of the map created in Rviz on mapData topic. Actually, I have a stereo camera and I can see the result of rtabmap. But I move the camera the previous results is not staying visible.

To launch rtabmap node, I am using the parameters which are in the rtabmap_ros/launch/demo/demo_stereo_outdoor.launch and I am also using the following configuration file for rviz rtabmap_ros/launch/config/demo_stereo_outdoor.rviz . These two files works whe I use them to open a bag file like in the stereo_outdoor_mapping tutorial ( http://wiki.ros.org/rtabmap_ros/Tutor... ).

But when I am using rosrtabmap-databaseViewer on the database created, I can see all the images taken during the last execution of Rviz.

Question : Is there any call to make to some rtabmap services (like publish_map) or is there another option to add in an other file ?

ps : i have a warning on the TF_OLD_DATA again even if I am using the following line in the rtabmap node :

<param name="wait_for_transform" type="bool" value="true"/>

I have also tried to use a map_assembler node without success :

<!-- Grid map assembler for rviz -->
<node pkg="rtabmap_ros" type="map_assembler" name="map_assembler">
     <param name="occupancy_grid" type="bool" value="true"/>
     <remap from="mapData" to="mapData_optimized"/>
     <remap from="grid_projection_map" to="/map"/>
</node>

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-05-21 13:35:11 -0600

matlabbe gravatar image

Hi,

For the "some parts of the map disappearing" with the rtabmap_ros/MapCloud rviz plugin, you can disable its node filtering parameters to keep all clouds shown:

  • Set "Node filtering radius (m)" to 0.
  • Set "Node filtering angle (degrees)" to 0.

The demo stereo launch files you are referring are working only for the specified bags (which require "use_sim_time=true"). On a robot, you should remap the topics sent from the ros bag and set "use_sim_time=false". When simulating the clock, the TF_OLD_DATA warning can happen when you are replaying the same rosbag: the second time, all timestamps are in the past.

In the demo launch file, the map_assembler subscribes to /rtabmap/mapData_optimized topic (note the rtabmap namespace). If mapData_optimized is not published, map_assembler will do nothing.

For your specific question: " Is there any call to make to some rtabmap services (like publish_map) or is there another option to add in an other file ?", which kind of file do you want to add? If you want to process another bag file with the same launch file, record a bag with the same topics recorded in the demo bag files. Example:

$ rosbag info stereo_outdoorA.bag 
path:        stereo_outdoorA.bag
version:     2.0
duration:    3:55s (235s)
start:       Nov 11 2014 15:28:20.90 (1415737700.90)
end:         Nov 11 2014 15:32:16.65 (1415737936.65)
size:        668.3 MB
messages:    54083
compression: none [848/848 chunks]
types:       sensor_msgs/CameraInfo      [c9a58c1b0b154e0e6da7578cb991d214]
             sensor_msgs/CompressedImage [8f7a12909da2c9d3332d540a0977563f]
             tf2_msgs/TFMessage          [94810edda583a504dfda3829e70d7eec]
topics:      /stereo_camera/left/camera_info_throttle              3741 msgs    : sensor_msgs/CameraInfo     
             /stereo_camera/left/image_raw_throttle/compressed     3753 msgs    : sensor_msgs/CompressedImage
             /stereo_camera/right/camera_info_throttle             3741 msgs    : sensor_msgs/CameraInfo     
             /stereo_camera/right/image_raw_throttle/compressed    3745 msgs    : sensor_msgs/CompressedImage
             /tf                                                  39103 msgs    : tf2_msgs/TFMessage          (2 connections)

cheers

edit flag offensive delete link more

Comments

I just set filter_radius and filter_angle to 0 and it works. Thanks a lot

F.Brosseau gravatar image F.Brosseau  ( 2015-05-26 02:47:33 -0600 )edit

Question Tools

Stats

Asked: 2015-05-21 10:24:06 -0600

Seen: 838 times

Last updated: May 21 '15