Hi Mathieu,
I followed your tutorial to bring up RTAB-Map on a computer connected to a mobile robot with ASUS Xtion + Odometry + laser (clearpath husky). I have launched the camera with the opennni2.launch file. The laser is launched via the urg_laser.launch file. This works and I can display the laserscan as well as the images in rviz. But I am failing to get Rtabmap to work. I am doing the following: 1. export ROS_MASTER_URI of the robot 2. start rtabmap and rtabmap viz on the computer via this launch file: <launch> <!-- Visualization mode --> <arg name="rviz" default="false" /> <arg name="rtabmapviz" default="true" /> <!-- RTAB-Map --> <group ns="rtabmap"> <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start"> <param name="queue_size" type="int" value="50"/> <!-- Fixed frame on the robot --> <param name="frame_id" type="string" value="base_link"/> <param name="subscribe_scan" type="bool" value="true"/> <remap from="husky_velocity_controller/odom" to="/base_controller/odom"/> <remap from="scan" to="/base_scan"/> <!-- Depth information from sensors --> <param name="subscribe_depth" type="bool" value="true"/> <remap from="camera/rgb/image" to="/camera/rgb/image_rect_color"/> <remap from="camera/depth/image" to="/camera/depth_registered/image_raw"/> <remap from="camera/rgb/camera_info" to="/camera/rgb/camera_info"/> </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_depth" type="bool" value="true"/> <param name="subscribe_scan" type="bool" value="true"/> <param name="frame_id" type="string" value="base_link"/> <param name="wait_for_transform" type="bool" value="true"/> <remap from="camera/rgb/image" to="/camera/rgb/image_rect_color"/> <remap from="camera/depth/image" to="/camera/depth_registered/image_raw"/> <remap from="camera/rgb/camera_info" to="/camera/rgb/camera_info"/> <remap from="husky_velocity_controller/odom" to="/base_controller/odom"/> <remap from="scan" to="/base_scan"/> </node> </group> </launch> This brings up rtab-map displaing nothing: Console: [ INFO] [1501497138.858241498]: /rtabmap/rtabmapviz subscribed to: /rtabmap/rgb/image/compressed, /rtabmap/depth/image/compressedDepth, /rtabmap/rgb/camera_info, /rtabmap/odom, /base_scan, /rtabmap/odom_info I have checked that the input is published via: $ rostopic hz /base_controller/odom $ rostopic hz /camera/rgb/image_rect_color $ rostopic hz /camera/depth_registered/image_raw $ rostopic hz /camera/rgb/camera_info $ rostopic hz /camera/rgb/camera_info $ rostopic hz /scan "rosrun tf view_frames creates following pdf": frames.pdf Also the /map node does not show up when I start the launch file. This is also the case, if I start rtabmap on the robot itself and only the visualization on the computer. However this brings up the following warning from rtabmap: [ WARN] [1501496314.304435045]: /rtabmap/rtabmap: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). If topics are not published at the same rate, you could increase "queue_size" parameter (current=50). /rtabmap/rtabmap subscribed to (approx sync): /rtabmap/odom, /rtabmap/rgb/image, /rtabmap/depth/image, /rtabmap/rgb/camera_info, /base_scan All these topics are published and I dont know what I am missing... Do you know what I am doing wrong? Thanks in advance! |
This post was updated on .
Hi,
I'm perhaps misunderstanding, but you are talking about checking: $ rostopic hz /scan whereas the launch file/rtabmap scan topic seems to be /base_scan. Shouldn't you remap from /base_scan to /scan (the latter being the actual topic) ? Sorry if misunderstood your information & good luck with ROS ! EDIT: see here on this forum Matthieu talks about You should set "/jn0/base_can" to "/scan" (with '/') for rtabmap node. for a similar situation |
Administrator
|
Hi,
As Blupon said, there is a problem with topic remapping. Based on your actual topics, the remapping should look like something like this: <launch> <!-- Visualization mode --> <arg name="rviz" default="false" /> <arg name="rtabmapviz" default="true" /> <!-- RTAB-Map --> <group ns="rtabmap"> <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start"> <param name="queue_size" type="int" value="50"/> <!-- Fixed frame on the robot --> <param name="frame_id" type="string" value="base_link"/> <param name="subscribe_scan" type="bool" value="true"/> <remap from="odom" to="/base_controller/odom"/> <remap from="scan" to="/scan"/> <!-- Depth information from sensors --> <param name="subscribe_depth" type="bool" value="true"/> <remap from="rgb/image" to="/camera/rgb/image_rect_color "/> <remap from="depth/image" to="/camera/depth_registered/image_raw"/> <remap from="rgb/camera_info" to="/camera/rgb/camera_info"/> </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_depth" type="bool" value="true"/> <param name="subscribe_scan" type="bool" value="true"/> <param name="frame_id" type="string" value="base_link"/> <param name="wait_for_transform" type="bool" value="true"/> <remap from="rgb/image" to="/camera/rgb/image_rect_color "/> <remap from="depth/image" to="/camera/depth_registered/image_raw"/> <remap from="rgb/camera_info" to="/camera/rgb/camera_info"/> <remap from="odom" to="/base_controller/odom"/> <remap from="scan" to="/scan"/> </node> </group> </launch> cheers, Mathieu |
This post was updated on .
Thank you both for the fast replies! Appreciate your help a lot!! :)
rtabmap subscribes now to the right topics: /rtabmap/rtabmapviz subscribed to: /camera/rgb/image_rect_color, /camera/depth_registered/image_raw, /camera/rgb/camera_info, /odometry/filtered, /scan All these toppics are streaming data (and I can view these topics in rviz). But rtabmapviz does still not show anything... Launch File: <launch> <!-- Visualization mode --> <arg name="rviz" default="false" /> <arg name="rtabmapviz" default="true" /> <!-- RTAB-Map --> <group ns="rtabmap"> <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start"> <param name="frame_id" type="string" value="base_link"/> <param name="subscribe_depth" type="bool" value="true"/> <param name="subscribe_scan" type="bool" value="true"/> <remap from="odom" to="/odometry/filtered"/> <remap from="scan" to="/scan"/> <remap from="rgb/image" to="/camera/rgb/image_rect_color"/> <remap from="depth/image" to="/camera/depth_registered/image_raw"/> <remap from="rgb/camera_info" to="/camera/rgb/camera_info"/> <param name="queue_size" type="int" value="10"/> <!-- RTAB-Map's parameters --> <param name="RGBD/NeighborLinkRefining" type="string" value="true"/> <param name="RGBD/ProximityBySpace" type="string" value="true"/> <param name="RGBD/AngularUpdate" type="string" value="0.01"/> <param name="RGBD/LinearUpdate" type="string" value="0.01"/> <param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/> <param name="Optimizer/Slam2D" type="string" value="true"/> <param name="Reg/Strategy" type="string" value="1"/> <!-- 1=ICP --> <param name="Reg/Force3DoF" type="string" value="true"/> <param name="Vis/MinInliers" type="string" value="5"/> <param name="Vis/InlierDistance" type="string" value="0.1"/> <param name="Rtabmap/TimeThr" type="string" value="700"/> <param name="Mem/RehearsalSimilarity" type="string" value="0.45"/> </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_depth" type="bool" value="true"/> <param name="subscribe_scan" type="bool" value="true"/> <param name="frame_id" type="string" value="base_link"/> <param name="wait_for_transform" type="bool" value="true"/> <remap from="odom" to="/odometry/filtered"/> <remap from="scan" to="/scan"/> <remap from="rgb/image" to="/camera/rgb/image_rect_color"/> <remap from="depth/image" to="/camera/depth_registered/image_raw"/> <remap from="rgb/camera_info" to="/camera/rgb/camera_info"/> </node> </group> </launch> Console log:
Thank you! |
Administrator
|
Hi,
What is the frame rate of the input topics (shown by "rostopic hz")? For example, if scan topic is at 1 Hz, and camera topics are at 30 Hz, you should increase "queue_size" parameter at least 30 or more. cheers, Mathieu |
This post was updated on .
Thank you, that was the problem! It works now!
But it stops updating the map after the first frames even if i start to move the robot around... To reduce latency I have tried to use the freenect_throttle launch file you provided in the tutorials. This itself works as expected. Remapping to the throttled topics however does not apper to be sucessfull as rtabmapviz shows in the console that it is still subscribe to the normal camera topics. Rtabmap however does subscribe to the throttled ones and the <remap> is exactly the same... <!-- RTAB-Map --> <group ns="rtabmap"> <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start"> <param name="frame_id" type="string" value="base_link"/> <param name="subscribe_depth" type="bool" value="true"/> <param name="subscribe_scan" type="bool" value="true"/> <remap from="odom" to="/odometry/filtered"/> <remap from="scan" to="/scan"/> <remap from="rgb/image" to="/camera/data_throttled_image"/> <remap from="depth/image" to="/camera/data_throttled_image_depth"/> <remap from="rgb/camera_info" to="/camera/data_throttled_camera_info"/> <param name="queue_size" type="int" value="60"/> <!-- RTAB-Map's parameters --> <param name="RGBD/NeighborLinkRefining" type="string" value="true"/> <param name="RGBD/ProximityBySpace" type="string" value="true"/> <param name="RGBD/AngularUpdate" type="string" value="0.01"/> <param name="RGBD/LinearUpdate" type="string" value="0.01"/> <param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/> <param name="Optimizer/Slam2D" type="string" value="true"/> <param name="Reg/Strategy" type="string" value="1"/> <!-- 1=ICP --> <param name="Reg/Force3DoF" type="string" value="true"/> <param name="Vis/MinInliers" type="string" value="5"/> <param name="Vis/InlierDistance" type="string" value="0.1"/> <param name="Rtabmap/TimeThr" type="string" value="700"/> <param name="Mem/RehearsalSimilarity" type="string" value="0.45"/> </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_depth" type="bool" value="true"/> <param name="subscribe_scan" type="bool" value="true"/> <param name="frame_id" type="string" value="base_link"/> <param name="wait_for_transform" type="bool" value="true"/> <remap from="odom" to="/odometry/filtered"/> <remap from="scan" to="/scan"/> <remap from="rgb/image" to="/camera/data_throttled_image"/> <remap from="depth/image" to="/camera/data_throttled_image_depth"/> <remap from="rgb/camera_info" to="/camera/data_throttled_camera_info"/> </node> </group> </launch> Keep up your good work! Moritz |
Administrator
|
Hi,
the remaping seems okay, not sure why rtabmapviz is not using the new topic names. Well, you can set for rtabmapviz: <param name="subscribe_depth" type="bool" value="false"/> <param name="subscribe_scan" type="bool" value="false"/>as they are optional. rtabmapviz will only subscribe to rtabmap/mapData. For the problem "But it stops updating the map after the first frames even if i start to move the robot around... ": What are you showing in the terminal "average rate", is it the laser scan topic? If so it is indeed very slow, which would be difficult to synchronize with the camera or odometry topics. What is the framerate of odometry (/odometry/filtered)? If odometry is over 30 Hz, it will be indeed difficult to synchronize the topics. You may show what is the frame rate for all input topics to rtabmap. cheers, Mathieu cheers, Mathieu |
Free forum by Nabble | Edit this page |