Is there RGB-D sync? (Melodic)
Just wanted to ask if someone can explain to me if is there the RGB-D sync in this code got from the file: demoturtlebot3navigation.launch from the package rtabmap. Then if someone is interested to what robot I want to apply this I will be very grateful to show it, 'cause even that has got problems.
Sorry for the edit, but I just did a great mistake to what file to attach :)
<launch>
<!--
$ sudo apt install ros-melodic-turtlebot3* ros-melodic-dwa-local-planner
To avoid TF warning about leading '/' in frame name, remove it in:
- "/opt/ros/melodic/share/turtlebot3_navigation/param/global_costmap_params.yaml"
- "/opt/ros/melodic/share/turtlebot3_navigation/param/local_costmap_params.yaml"
Example Gazebo:
$ export TURTLEBOT3_MODEL=waffle
$ roslaunch turtlebot3_gazebo turtlebot3_world.launch
$ export TURTLEBOT3_MODEL=waffle
$ roslaunch rtabmap_ros demo_turtlebot3_navigation.launch
-->
<!-- Arguments -->
<arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>
<arg name="open_rviz" default="true"/>
<arg name="rtabmapviz" default="true"/>
<arg name="move_forward_only" default="false"/>
<arg name="with_camera" default="true"/>
<arg name="localization" default="false"/>
<arg name="database_path" default="~/.ros/rtabmap.db"/>
<arg if="$(arg localization)" name="rtabmap_args" default=""/>
<arg unless="$(arg localization)" name="rtabmap_args" default="-d"/>
<!-- Turtlebot3 -->
<include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch">
<arg name="model" value="$(arg model)" />
</include>
<group ns="rtabmap">
<node if="$(eval model=='waffle')" pkg="rtabmap_ros" type="rgbd_sync" name="rgbd_sync" output="screen">
<remap from="rgb/image" to="/camera/rgb/image_raw"/>
<remap from="depth/image" to="/camera/depth/image_raw"/>
<remap from="rgb/camera_info" to="/camera/rgb/camera_info"/>
</node>
<node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="$(arg rtabmap_args)">
<param name="database_path" type="string" value="$(arg database_path)"/>
<param name="frame_id" type="string" value="base_footprint"/>
<param name="subscribe_rgb" type="bool" value="false"/>
<param name="subscribe_depth" type="bool" value="false"/>
<param if="$(eval model=='waffle')" name="subscribe_rgbd" type="bool" value="true"/>
<param unless="$(eval model=='waffle')" name="subscribe_rgbd" type="bool" value="false"/>
<param name="subscribe_scan" type="bool" value="true"/>
<param name="approx_sync" type="bool" value="true"/>
<!-- use actionlib to send goals to move_base -->
<param name="use_action_for_goal" type="bool" value="true"/>
<remap from="move_base" to="/move_base"/>
<!-- inputs -->
<remap from="scan" to="/scan"/>
<remap from="odom" to="/odom"/>
<remap from="rgbd_image" to="rgbd_image"/>
<!-- output -->
<remap from="grid_map" to="/map"/>
<!-- RTAB-Map's parameters -->
<param name="Reg/Strategy" type="string" value="1"/>
<param name="Reg/Force3DoF" type="string" value="true"/>
<param name="GridGlobal/MinSize" type="string" value="20"/>
<!-- localization mode -->
<param if="$(arg localization)" name="Mem/IncrementalMemory" type="string" value="false"/>
<param unless="$(arg localization)" name="Mem/IncrementalMemory" type="string" value="true"/>
</node>
<!-- visualization with rtabmapviz -->
<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_scan" type="bool" value="true"/>
<param name="subscribe_odom" type="bool" value="true"/>
<param name="frame_id" type="string" value="base_footprint"/>
<param name="approx_sync" type="bool" value="true"/>
<remap from="odom" to="/odom"/>
<remap from="scan" to="/scan"/>
</node>
</group>
<!-- move_base -->
<include file="$(find turtlebot3_navigation)/launch/move_base.launch">
<arg name="model" value="$(arg model)" />
<arg name="move_forward_only" value="$(arg move_forward_only)"/>
</include>
<!-- rviz -->
<group if="$(arg open_rviz)">
<node pkg="rviz" type="rviz" name="rviz" required="true"
args="-d $(find turtlebot3_navigation)/rviz/turtlebot3_navigation.rviz"/>
</group>
</launch>
Asked by Giuseppe_ on 2021-02-10 09:55:44 UTC
Answers
rgbd_sync node is used to combine RGB-D data into a single topic. We would use it if rtabmap is also subscribed to a scan topic.
For example, if you have a camera streaming at 30Hz with exactly syncrhonized images and a lidar publishng at 10 Hz, you don't want to approximately synchronize scan and camera images. To make sure camera images are exactly synchronized together, we use rgbd_sync (with approx_sync:=false), then approximately synchronize scan with rgbd_image topic. See Fig.6 for example: https://introlab.3it.usherbrooke.ca/mediawiki-introlab/images/7/7a/Labbe18JFR_preprint.pdf
If depth and RGB are not synchronized, there is still an advantage to synchronize them at 30 Hz before synchronizing with lidar at different rate.
cheers
Asked by matlabbe on 2021-02-12 13:28:05 UTC
Comments
@matlabbe if I use a kinect, I would have rgb and depth at the same rate right? salute and thanks for answering
Asked by Giuseppe_ on 2021-02-13 09:09:41 UTC
Yes, but I don't think all kinect versions provide synchronized RGB and depth data. The topics are indeed published at the same rate, but not exactly synchronized (rostopic the header of the messages and see the stamps are not exactly the same between RGB and Depth for the same frame). My last comment was about that, it is still better to synchronize them at 30 Hz, then synchronize with lidar afterwards. rtabmap still support RGB+Depth+lidar approx synchronization (without using rgbd_sync), but may be more difficult to debug if RGB+depth are less correctly synchronized because of a lidar topic with different publishing rate.
See Fig.6 of this paper https://introlab.3it.usherbrooke.ca/mediawiki-introlab/images/7/7a/Labbe18JFR_preprint.pdf
Asked by matlabbe on 2021-02-14 16:38:08 UTC
If your kinect has exact stmaps between RGB and Depth, you should use approx_sync:=false
for rgbd_sync
.
Asked by matlabbe on 2021-02-14 16:39:09 UTC
Comments