Hello,
I'm running Ubuntu 12.04, Ros Hydro, I have rtabmap_ros compiled from source (as per instructions). I am using a stereo camera with (I think) the Stereo B configuration. I have modified the demo_stereo_outdoor.launch file accordingly, by removing the node republishing, remapping to stereo_camera namespace, and set use_sim_time to false. The rtabmap node is running when I launch this file. I also changed base_footprint to base_link.
I also set up a tf broadcaster between base_link frame and camera, and set it to a constant value (0 translation), since I am holding the camera. Now the issue is that all my rtabmap/cloud_map, rtabmap/map rtabmap/path ... (blah blah blah) topics are empty when I echo them. In rviz, my camera frame is moving around with respect to the map frame, but I cannot view the map, the path, or any clouds (optimized or not).
I think the issue could be arising from the following -
- rviz file could be incorrectly set up since it is the one being used for the demo stereo outdoor.
- tf tree / frame ID's could be incorrect. This is surprising, since my tf tree is - map --> odom --> base_link --> camera, which seems correct to me.
Also, another glitch that is occurring (but should not make a difference), is that I am supplying the camera frame id, which is an optical frame, but pointcloud frames are defined with a different orientation.
- Any suggestions on how to solve the mapping issue?
- Can anyone confirm what frame I am expected to supply to the node?
Here is my rqt_graph:
Here is my tf tree:
Thanks!
[UPDATE]
Hi Mathieu,
Sorry to bother you, my RTAB is now giving me this graph output after setting up my approximate stereo camera pair. I modified the approx params as you mentioned. I added a queue size to the rtabmap, rtabmap optimizer, and rtabmap assembler nodes. Notice how the odometry still seems to be working - I get the position of the camera too. However, I can only view /camera/points2 cloud, not the rtabmap/mapData topics or assembled clouds, etc.
Any suggestions?
I just updated the rqt_graph by adding topics to the display - here it is. It seems to be connected correctly as far as I can tell, but still no output.
Here is my launch file just in case.
<launch>
-->
<!-- <remap from="left/image_rect" to="/camera/left/image_rect"/>
<remap from="right/image_rect" to="/camera/right/image_rect"/>
<remap from="left/camera_info" to="/camera/left/camera_info"/>
<remap from="right/camera_info" to="/camera/right/camera_info"/> -->
<remap from="odom" to="/stereo_odometer/odometry"/>
<param name="frame_id" type="string" value="base_link"/>
<param name="odom_frame_id" type="string" value="odom"/>
<param name="queue_size" type="int" value="100"/>
<!-- <param name="approximate_sync" type="bool" value="true"/> -->
<param name="approx_sync" type="bool" value="true"/>
<param name="Odom/InlierDistance" type="string" value="0.1"/>
<param name="Odom/MinInliers" type="string" value="10"/>
<param name="Odom/RoiRatios" type="string" value="0.03 0.03 0.04 0.04"/>
<param name="Odom/MaxDepth" type="string" value="10"/>
<!-- <param name="OdomBow/NNDR" type="string" value="0.8"/> -->
<param name="GFTT/MaxCorners" type="string" value="500"/>
<param name="GFTT/MinDistance" type="string" value="5"/>
<param name="Odom/FillInfoData" type="string" value="$(arg rtabmapviz)"/>
</node>
<remap from="left/image_rect" to="/camera/left/image_rect_color"/>
<!-- <remap from="left/image_rect" to="/camera/left/image_rect"/> -->
<!-- <remap from="right/image_rect" to="/camera/right/image_rect"/> -->
<remap from="right/image_rect" to="/camera/right/image_rect_color"/>
<remap from="left/camera_info" to="/camera/left/camera_info"/>
<remap from="right/camera_info" to="/camera/right/camera_info"/>
<remap from="odom" to="/stereo_odometer/odometry"/>
<!-- <remap from="odom" to="/camera/odometry"/> -->
<param name="queue_size" type="int" value="100"/>
<param name="approximate_sync" type="bool" value="true"/>
<param name="approx_sync" type="bool" value="true"/>
<!-- <param -->
<param name="stereo_approx_sync" type="bool" value="true"/>
<!-- RTAB-Map's parameters -->
<param name="Rtabmap/TimeThr" type="string" value="700"/>
<param name="Rtabmap/DetectionRate" type="string" value="1"/>
<param name="Kp/WordsPerImage" type="string" value="200"/>
<param name="Kp/RoiRatios" type="string" value="0.03 0.03 0.04 0.04"/>
<param name="Kp/DetectorStrategy" type="string" value="0"/> <!-- use SURF -->
<param name="Kp/NNStrategy" type="string" value="1"/> <!-- kdTree -->
<param name="SURF/HessianThreshold" type="string" value="1000"/>
<param name="LccBow/MaxDepth" type="string" value="5"/>
<param name="LccBow/MinInliers" type="string" value="10"/>
<param name="LccBow/InlierDistance" type="string" value="0.02"/>
<param name="LccReextract/Activated" type="string" value="true"/>
<param name="LccReextract/MaxWords" type="string" value="500"/>
<!-- Disable graph optimization because we use map_optimizer node below -->
<!-- <param name="RGBD/ToroIterations" type="string" value="0"/> -->
<param name="RGBD/OptimizeIterations" type="string" value="0"/>
</node>
<!-- Optimizing outside rtabmap node makes it able to optimize always the global map -->
<node pkg="rtabmap_ros" type="map_optimizer" name="map_optimizer">
<param name="approximate_sync" type="bool" value="true"/>
<param name="approx_sync" type="bool" value="true"/>
<param name="queue_size" type="int" value="100"/>
<!-- <param -->
<param name="stereo_approx_sync" type="bool" value="true"/>
</node>
<node if="$(arg rviz)" pkg="rtabmap_ros" type="map_assembler" name="map_assembler">
<param name="occupancy_grid" type="bool" value="true"/>
<remap from="mapData" to="/rtabmap/mapData_optimized"/>
<remap from="grid_projection_map" to="/rtabmap/map"/>
<param name="approximate_sync" type="bool" value="true"/>
<param name="approx_sync" type="bool" value="true"/>
<!-- <param -->
<param name="stereo_approx_sync" type="bool" value="true"/>
<param name="queue_size" type="int" value="100"/>
<!-- </node> -->
</node>
<!-- Visualisation RTAB-Map -->
<node if="$(arg rtabmapviz)" pkg="rtabmap_ros" type="rtabmapviz" name="rtabmapviz" args="-d $(find rtabmap_ros)/launch/config/rgbd_gui.ini" output="screen">
<param name="subscribe_stereo" type="bool" value="true"/>
<param name="subscribe_odom_info" type="bool" value="true"/>
<param name="queue_size" type="int" value="10"/>
<param name="frame_id" type="string" value="base_link"/>
<remap from="left/image_rect" to="/camera/left/image_rect_color"/>
<remap from="right/image_rect" to="/camera/right/image_rect_color"/>
<remap from="left/camera_info" to="/camera/left/camera_info"/>
<remap from="right/camera_info" to="/camera/right/camera_info"/>
<remap from="odom_info" to="/odom_info"/>
<remap from="odom" to="/odometry"/>
<remap from="mapData" to="mapData_optimized"/>
</node>
There is some redundancy, but it should work all the same.
Originally posted by Tanmay on ROS Answers with karma: 110 on 2015-06-04
Post score: 1