Rosanswers logo

Hi there. In order to get some hardware acceleration I want to use the isaac_ros_visual_odometry package as a replacement for the rgbd_odometry node of rtabmap_ros. Now the rgbd_odometry node publishes the /odom informations, which in turn are required by rtabmap. isaac_ros_visual_odometry publishes the information in its own format, giving translation and rotation values in x,y,z direction. So unless I'm very much mistaken the information needed is present. Is there any known procedure on how to transpose an IMU-like message to an odometry message format or else, has anyone tried a similar approach to hardware acceleration before and has had some experience on integrating the isaac-ros GEMS to rtabmap?

Ubuntu 20.04 ROS2 Foxy Nvidia Isaac GEMS for ROS

Originally posted by TurBot on ROS Answers with karma: 5 on 2022-02-17

Post score: 0


1 Answer 1


Rosanswers logo


you can use tf directly to get odometry by setting odom_frame_id. Here is an example with a zed2 camera (set those lines to false to avoid zed tf) based on this example:

ros2 launch zed_wrapper zed2.launch.py
ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 1 base_link_smooth base_link
ros2 launch isaac_ros_visual_odometry isaac_ros_visual_odometry_zed2.launch.py

ros2 launch rtabmap_ros rtabmap.launch.py \
    rtabmap_args:="--delete_db_on_start" \
    rgb_topic:=/zed2/zed_node/rgb/image_rect_color \
    depth_topic:=/zed2/zed_node/depth/depth_registered \
    camera_info_topic:=/zed2/zed_node/rgb/camera_info \
    frame_id:=base_link \
    odom_frame_id:=odom \
    odom_tf_angular_variance:=0.001 \
    odom_tf_linear_variance:=0.001 \
    visual_odometry:=false \
    approx_sync:=false \
    wait_imu_to_init:=true \
    imu_topic:=/zed2/zed_node/imu/data \
    qos:=1 \

When using odometry from tf, we don't have a covariance, so we can adjust the fixed covariance with odom_tf_angular_variance and odom_tf_linear_variance parameters.


Originally posted by matlabbe with karma: 6409 on 2022-02-27

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by TurBot on 2022-02-28:
Thanks a heap. I'm using a Realsense but I suppose I shall be able to port the example. I had tried to read the information from TF and build/calculate and publish an odometry message from it, but your suggestion is what I looked for: a clean and straightforward ROSish method instead of a ramshackle workaround.

Edit: http://wiki.ros.org/navigation/Tutorials/RobotSetup/Odom I was following this link in building the odometry message. Since /visual_odometry/imu topic appears to be empty but /visual_odometry/tf_stamped is not, this seemed the way to go.

However: now I am using /imu topic directly from camera and working on including the orientation from /visual_odometry/tf_stamped, since /imu has accelerations but not orientation ... apart form getting things to work I want it to be a clean approach as well

Comment by TurBot on 2022-03-02:
Since /imu doesn't contain the orientation I start a separate node which collects orientation data from the /visual_odometry/tf_stamped topic then publishes /imu_pub, containing orientation and velocity/acceleration informations from the original /imu.

However, on running ros2 launch rtabmap_ros realsense_d400.launch.py
odom_topic:=/odom_pub imu_topic:=/imu_pub

I get the following error: CoreWrapper.cpp:2478::imuAsyncCallback() IMU received doesn't have orientation set, it is ignored.

I don't understand why ROS doesn't "see" the information.

Comment by matlabbe on 2022-03-06:
Look at the D400 examples here: http://wiki.ros.org/rtabmap_ros/Tutorials/HandHeldMapping, to compute the quaternion of D400 imu message, we use imu_filter_madgwick:

rosrun imu_filter_madgwick imu_filter_node \
    _use_mag:=false \
    _publish_tf:=false \
    _world_frame:="enu" \
    /imu/data_raw:=/camera/imu \

Your Answer

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