ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Hi,
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 \
rviz:=true
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.
cheers,
Mathieu