Getting drift in z-axis in odom while using VSLAM and NVBLOX

I am using realsense 435i camera. I have done all the setup that are mentioned in isaac_ros_vslam github page. I have mounted the realsense in AMR. I am moving the AMR in horizontal plane. I have kept the force_planar_mode to true. one more thing my base_link fame is also at ground plane.

I am using realsense example launch file of nvblox_examples_bringup package for 3d reconstruction and navigation. I am getting major drift in odom in z-axis. And it is not stable drift, It’s fluctuating frequently. I have checked with and without in-built imu of realsense and getting same issue. In the troubleshooting page there is one instruction mentioned that we should keep the emitter of realsense off but when I am trying without emitter then map and 3d mesh are not going to create.

One more thing that I want to ask is there is one odom flattener node in isaac ros vslam. Is it playing any role into it? If no then what is the role of it in this entire pipeline? and what is the use of it?

Please share possible solutions.

Hi @Vatsal_28

Welcome to the Isaac ROS forum

In Isaac ROS 2.0 the force_planar_mode only works for the slam pose, not the odom pose.

I’m still investigating how to fix this issue, because at this time, nvblox requires the RS emitter to get depth images, but cuvslam requires images without the emitter artefacts.

You can use the OdometryFlattenerNode . Where there is an example to use in this launch file

I hope I can help you, I keep you posted for more details, after follow up internally with engineers

Hi @Raffaello, Thank you for your reply.

I am using the Odometry Flattener Node and still getting the drift. What can be the possible reasons for that? And Is there any other way to debug and solve this issue?

Hi @Raffaello, Still waiting for your reply.

hI @Vatsal_28

Thank you for your patience. We are currently working on the release of Isaac ROS 3.0 and experiencing some delays in responding to all topics.

I respond when I have more updates on this subject.

Raffaello

Hi @Raffaello,

Let me give you some brief what we have tried to solve this issue.

We have used the OdometryFlattenerNode. In that we are flattening the tf between odom and base_link. Please refer the Image attached. The odom published by vslam is declared as odom_before_flat. The OdometryFlattenerNode will use the message with frame_id = ‘odom_before_flat’ and child_frame_id = ‘base_link’. It will flat those transforms and re-broadcast with frame_id = ‘odom’ and child_frame_id = ‘base_link’. That we will use further for Mapping and Navigation.

vlsam and OdometryFlattenerNode both are publishing transforms in /tf topic. In /tf topic, we have tf messages with frame_id = ‘odom_before_flat’ child_frame_id = ‘base_link’ (from vslam) and frame_id = ‘odom’ child_frame_id = ‘base_link’ (from OdometryFlattenerNode). So the connection of base_link is shifting with odom_before_flat and odom very frequently.

The issue here is we are getting two separate tf tree where map to odom transform is published by vslam. another one is odom to base_link by OdometryFlattenerNode. Is there any way so we can get a tf tree like map->odom->base_link connected.

Another approach is, the transform of odom is published by vslam. If our AMR movement is fixed in 2D plane then can we make changes in vslam node directly where the odom->base_link trasform is going to publish, we can perform flattening directly over there and we can change z of translation and x, y of rotation to 0 there and then it will publish the transform. If that is possible then please let me know exactly where we have to make changes in vslam node.

waiting for you reply.

Thanks,
Vatsal

Hi @Raffaello ,

We have moved to Isaac ROS 3.0 from 2.1. The issue is still persists. Please refer the screenshots attached.


Some new parameters you have introduced in Issac ROS VSLAM 3.0.

enable_ground_constraint_in_odometry
enable_ground_constraint_in_slam

I have tested by keeping both of them true. Still the result you can see in snapshots attached. Also I haven’t find both these parameters in your documentation here. isaac_ros_visual_slam — isaac_ros_docs documentation Can you please share the latest version of document so we can get the reference how can we use them? Can you please tell how to solve this issue if there is any solution available with you?

Waiting for your timely response.

Thanks,
Vatsal.

Thank you for your detailed message.

I have forwarded this issue to the engineering team. I will keep you informed of any updates.

Raffaello

Thank you @Raffaello for your quick reply.

Can you please share from where we can get the latest document for Isaac ROS VSLAM. So, we will have the idea how to use the new parameters that you have introduced in latest version 3.0?

Hi @Vatsal_28

To better figure out why you are getting this extra drift, can you please share all parameters that are used for vslam?

You can use the command: ros2 param dump <name of your vslam node>

Best,
Raffaello

Hi @Raffaello,

Here it is :

/visual_slam_node:
ros__parameters:
accel_noise_density: 0.001862
accel_random_walk: 0.003
base_frame: base_link
calibration_frequency: 200.0
camera_optical_frames:
- camera_infra1_optical_frame
- camera_infra2_optical_frame
debug_dump_path: /tmp/cuvslam
debug_imu_mode: false
enable_debug_mode: false
enable_ground_constraint_in_odometry: true
enable_ground_constraint_in_slam: true
enable_image_denoising: false
enable_imu_fusion: false
enable_landmarks_view: true
enable_localization_n_mapping: true
enable_observations_view: true
enable_slam_visualization: true
gyro_noise_density: 0.000244
gyro_random_walk: 1.9393e-05
image_buffer_size: 100
image_jitter_threshold_ms: 34.0
image_qos: SENSOR_DATA
img_mask_bottom: 0
img_mask_left: 0
img_mask_right: 0
img_mask_top: 0
imu_buffer_size: 50
imu_frame: front_stereo_camera_imu
imu_jitter_threshold_ms: 10.0
imu_qos: SENSOR_DATA
invert_map_to_odom_tf: false
invert_odom_to_base_tf: false
map_frame: map
min_num_images: 2
multicam_mode: 1
num_cameras: 2
odom_frame: odom
override_publishing_stamp: false
path_max_size: 200
publish_map_to_odom_tf: true
publish_odom_to_base_tf: true
qos_overrides:
/parameter_events:
publisher:
depth: 1000
durability: volatile
history: keep_last
reliability: reliable
/tf:
publisher:
depth: 100
durability: volatile
history: keep_last
reliability: reliable
/tf_static:
publisher:
depth: 1
history: keep_last
reliability: reliable
rectified_images: true
sync_matching_threshold_ms: 5.0
use_sim_time: false
verbosity: 5

Amazing! Thank you!

I will keep you posted when I have any updates from the engineering.

Sure @Raffaello, Thanks.

1 Like

Hi,

I’m experiencing Z-axis drift in the odom frame with Isaac ROS Visual SLAM despite having ground constraints enabled.

**Setup:**

- Isaac ROS Visual SLAM version: [V.3.2]

- Camera: RealSense D435i

**Current Configuration:**

visual_slam_node:

ros__parameters:

enable_ground_constraint_in_odometry: true

enable_ground_constraint_in_slam: true

enable_imu_fusion: true

num_cameras: 2

base_frame: “camera0_link”

odom_frame: “odom”

map_frame: “map”

imu_frame: “camera0_gyro_optical_frame”

**Issue:**

The odom frame is drifting on the Z-axis even with `enable_ground_constraint_in_slam: true` and `enable_ground_constraint_in_odometry`.

1.Are there additional parameters that affect ground constraint effectiveness?

2. Are there known limitations with ground constraints on stereo camera configurations?

5. Is there any Z-axis optimization happening internally that could be causing this drift?

**Available Topics:**

ros2 topic list

/behavior_server/transition_event

/behavior_tree_log

/bond

/bt_navigator/transition_event

/camera0/color/camera_info

/camera0/color/image_raw

/camera0/depth/camera_info

/camera0/imu

/camera0/infra1/camera_info

/camera0/infra2/camera_info

/camera0/realsense_splitter_node/output/depth

/camera0/realsense_splitter_node/output/depth/nitros

/camera0/realsense_splitter_node/output/infra_1

/camera0/realsense_splitter_node/output/infra_1/nitros

/camera0/realsense_splitter_node/output/infra_2

/camera0/realsense_splitter_node/output/infra_2/nitros

/clicked_point

/clock

/cmd_vel

/cmd_vel_nav

/cmd_vel_teleop

/controller_server/transition_event

/diagnostics

/events/read_split

/global_costmap/costmap

/global_costmap/costmap_raw

/global_costmap/costmap_updates

/global_costmap/footprint

/global_costmap/global_costmap/transition_event

/global_costmap/published_footprint

/goal_pose

/initialpose

/local_costmap/costmap

/local_costmap/costmap_raw

/local_costmap/costmap_updates

/local_costmap/footprint

/local_costmap/local_costmap/transition_event

/local_costmap/published_footprint

/nvblox_node/back_projected_depth/camera0_depth_optical_frame

/nvblox_node/color_layer

/nvblox_node/color_layer_marker

/nvblox_node/combined_occupancy_grid

/nvblox_node/dynamic_occupancy_grid

/nvblox_node/esdf_slice_bounds

/nvblox_node/mesh

/nvblox_node/pessimistic_static_esdf_pointcloud

/nvblox_node/pessimistic_static_map_slice

/nvblox_node/shapes_to_clear

/nvblox_node/static_esdf_pointcloud

/nvblox_node/static_map_slice

/nvblox_node/static_occupancy_grid

/nvblox_node/static_occupancy_grid_updates

/nvblox_node/tsdf_layer

/nvblox_node/tsdf_layer_marker

/nvblox_node/workspace_bounds

/odom

/parameter_events

/plan

/plan_smoothed

/planner_server/transition_event

/pose

/preempt_teleop

/rosout

/rune_visualization_marker

/rune_visualization_marker_array

/smoother_server/transition_event

/speed_limit

/tf

/tf_static

/trajectories

/transform

/transformed_global_plan

/unsmoothed_plan

/velocity_smoother/transition_event

/visual_slam/initial_pose

/visual_slam/status

/visual_slam/tracking/odometry

/visual_slam/tracking/slam_path

/visual_slam/tracking/vo_path

/visual_slam/tracking/vo_pose

/visual_slam/tracking/vo_pose_covariance

/visual_slam/trigger_hint

/visual_slam/vis/gravity

/visual_slam/vis/gravity_array

/visual_slam/vis/landmarks_cloud

/visual_slam/vis/localizer

/visual_slam/vis/localizer_loop_closure_cloud

/visual_slam/vis/localizer_map_cloud

/visual_slam/vis/localizer_observations_cloud

/visual_slam/vis/loop_closure_cloud

/visual_slam/vis/observations_cloud

/visual_slam/vis/pose_graph_edges

/visual_slam/vis/pose_graph_edges2

/visual_slam/vis/pose_graph_nodes

/visual_slam/vis/slam_odometry

/visual_slam/vis/velocity

/waypoint_follower/transition_event