0
$\begingroup$

Rosanswers logo

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/Tutorials/StereoOutdoorMapping).

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.


Originally posted by F.Brosseau on ROS Answers with karma: 379 on 2015-05-21

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by matlabbe with karma: 6409 on 2015-05-21

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by F.Brosseau on 2015-05-26:
I just set filter_radius and filter_angle to 0 and it works. Thanks a lot

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.