[Noetic]Errors when using Rtabmap are not resolved.
I am trying to use T265 and D455 with Rtabmap to do SLAM.
However, when I run the launch file for Rtabmap, I get the following error: "The launch file for Rtabmap is not available.
[ WARN] [1666770145.346296763]: /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=10).
/rtabmap/rtabmap subscribed to (approx sync):
/t265/odom/sample \
/rtabmap/rgbd_image
I asked this question because I have tried the following methods and they did not lead to a solution.
$rostopic hz /t265/odom/sample
subscribed to [/t265/odom/sample]
average rate: 199.918
min: 0.000s max: 0.048s std dev: 0.01357s window: 194
As a reference, below are the camera launch files for the T265 and D455.
<launch>
<arg name="device_type_camera1" default="t265"/>
<arg name="device_type_camera2" default="d455"/> <!-- Note: using regular expression. match D435, D435i, D415... -->
<arg name="serial_no_camera1" default=""/>
<arg name="serial_no_camera2" default=""/>
<arg name="camera1" default="t265"/>
<arg name="camera2" default="d455"/>
<arg name="tf_prefix_camera1" default="$(arg camera1)"/>
<arg name="tf_prefix_camera2" default="$(arg camera2)"/>
<arg name="initial_reset" default="false"/>
<arg name="enable_fisheye" default="false"/>
<arg name="color_width" default="640"/>
<arg name="color_height" default="480"/>
<arg name="depth_width" default="640"/>
<arg name="depth_height" default="480"/>
<arg name="clip_distance" default="-2"/>
<arg name="topic_odom_in" default="odom_in"/>
<arg name="calib_odom_file" default=""/>
<group ns="$(arg camera1)">
<include file="$(find realsense2_camera)/launch/includes/nodelet.launch.xml">
<arg name="device_type" value="$(arg device_type_camera1)"/>
<arg name="serial_no" value="$(arg serial_no_camera1)"/>
<arg name="tf_prefix" value="$(arg tf_prefix_camera1)"/>
<arg name="initial_reset" value="$(arg initial_reset)"/>
<arg name="enable_fisheye1" value="$(arg enable_fisheye)"/>
<arg name="enable_fisheye2" value="$(arg enable_fisheye)"/>
<arg name="topic_odom_in" value="$(arg topic_odom_in)"/>
<arg name="calib_odom_file" value="$(arg calib_odom_file)"/>
<arg name="enable_pose" value="true"/>
</include>
</group>
<group ns="$(arg camera2)">
<include file="$(find realsense2_camera)/launch/includes/nodelet.launch.xml">
<arg name="device_type" value="$(arg device_type_camera2)"/>
<arg name="serial_no" value="$(arg serial_no_camera2)"/>
<arg name="tf_prefix" value="$(arg tf_prefix_camera2)"/>
<arg name="initial_reset" value="$(arg initial_reset)"/>
<arg name="align_depth" value="true"/>
<arg name="filters" value="pointcloud"/>
<arg name="color_width" value="$(arg color_width)"/>
<arg name="color_height" value="$(arg color_height)"/>
<arg name="depth_width" value="$(arg depth_width)"/>
<arg name="depth_height" value="$(arg depth_height)"/>
<arg name="clip_distance" value="$(arg clip_distance)"/>
</include>
</group>
<node pkg="tf" type="static_transform_publisher" name="t265_to_d400" args="0 0 0 0 0 0 /$(arg tf_prefix_camera1)_link /$(arg tf_prefix_camera2)_link 100"/>
<node pkg="tf" type="static_transform_publisher" name="real1" args="0 0 0.6 0 0 0 t265_pose_frame t265_link 100"/>
<node pkg="tf" type="static_transform_publisher" name="real2" args="-0.184 0 0 0 0 0 t265_pose_frame robot_center 100"/>
</launch>
And below are the Rtabmap startup files.
<launch>
<!-- Choose visualization -->
<arg name="rtabmapviz" default="false" />
<arg name="rviz" default="true" />
<!-- Localization-only mode -->
<arg name="localization" default="false"/>
<!-- Corresponding config files -->
<arg name="rtabmapviz_cfg" default="$(find rtabmap_ros)/launch/config/rgbd_gui.ini" />
<arg name="rviz_cfg" default="$(find rtabmap_ros)/launch/config/rgbd.rviz" />
<arg name="frame_id" default="robot_center"/>
<arg name="odom_topic" default="/t265/odom/sample"/>
<arg name="rgbd_sync" default="true"/>
<arg name="approx_rgbd_sync" default="false"/>
<arg name="visual_odometry" default="false"/>
<arg name="rgb_topic" default="/d400/color/image_raw" />
<arg name="depth_topic" default="/d400/aligned_depth_to_color/image_raw" />
<arg name="camera_info_topic" default="/d400/color/camera_info" />
<param name="Mem/UseOdomGravity" type="string" value="true"/>
<param name="Optimizer/GravitySigma" type="string" value="0.3"/>
<param name="Vis/MaxDepth" type="string" value="3.5"/>
<param name="cloud_noise_filtering_radius" value="0.1"/>
<param name="cloud_noise_filtering_min_neighbors" value="2"/>
<!-- param name = "proj_max_ground_height" value = "0.2" / -->
<include file="$(find rtabmap_ros)/launch/rtabmap.launch">
<arg name="rtabmapviz" value="$(arg rtabmapviz)" />
<arg name="rviz" value="$(arg rviz)" />
<arg name="localization" value="$(arg localization)"/>
<arg name="gui_cfg" value="$(arg rtabmapviz_cfg)" />
<arg name="rviz_cfg" value="$(arg rviz_cfg)" />
<arg name="odom_topic" value="$(arg odom_topic)"/>
<arg name="frame_id" value="$(arg frame_id)"/>
<arg name="rgbd_sync" value="$(arg rgbd_sync)"/>
<arg name="depth_topic" value="$(arg depth_topic)"/>
<arg name="rgb_topic" value="$(arg rgb_topic)"/>
<arg name="camera_info_topic" value="$(arg camera_info_topic)"/>
<arg name="approx_rgbd_sync" value="$(arg approx_rgbd_sync)"/>
<arg name="visual_odometry" value="$(arg visual_odometry)"/>
</include>
</launch>
Please help me with my poor attempts.
Thank you.
Asked by donguri on 2022-10-28 02:13:49 UTC
Answers
There are two synchronizations going on. One for the d400 topics, make sure they are all published:
rostopic hz /d400/color/image_raw \
/d400/aligned_depth_to_color/image_raw \
/d400/color/camera_info
then another one for rgbd_image and odom:
rostopic hz /t265/odom/sample \
/rtabmap/rgbd_image
Asked by matlabbe on 2022-11-06 20:34:56 UTC
Comments
Thank you, matlabbe.
I was able to resolve the error regarding d400.
The problem was that the topic names were different in the camera launch file and the RTABMap launch file.
<arg name="camera2" default="d455"/>
↓
<arg name="camera2" default="d400"/>
I changed the camera launch file as described above and it works.
The error about t265 was also resolved for some reason. For this, it is unclear why it was resolved. I'm terribly sorry.
rostopic hz /t265/odom/sample \
/rtabmap/rgbd_image
Incidentally, entering the above code produced the following output, which is the same as the question text.
$rostopic hz /t265/odom/sample
subscribed to [/t265/odom/sample]
average rate: 199.918
min: 0.000s max: 0.048s std dev: 0.01357s window: 194
Asked by dondon on 2022-11-07 00:47:22 UTC
Comments