NVIDIA-ISAAC-ROS / isaac_ros_visual_slam

Visual SLAM/odometry package based on NVIDIA-accelerated cuVSLAM
https://developer.nvidia.com/isaac-ros-gems
Apache License 2.0
864 stars 139 forks source link

Strange Gravity Vector #41

Closed msardonini closed 2 years ago

msardonini commented 2 years ago

Hi,

I'm running with an OakD S2 stereo camera, which has it's IMU mounted in such a way that the rotation from IMU -> base_link is:

0, 0, -1
0, -1, 0
-1, 0, 0

My configuration seems to be accurate, because RViz is showing the coordinate systems of imu and base_link in the correct orientation. Apologies for the cluttered image, it's hard to separate the text for incident coordinate systems image

A typical stationary IMU measurement will look like X = -9.8; Y=0; Z=0

However, the gravity vector quickly converges to the wrong axis. It moves to point in the +X direction of base_link, where it should be pointing in -Z. The gravity vector is shown as the grey line in the zoomed in picture.

It looks like my configuration for imu orientation is correct, Any idea why the gravity vector is behaving this way? Also, does the gravity vector play a significant role in the VO & SLAM algorithm?

hemalshahNV commented 2 years ago

Looking at the coordinate axes, it looks like IMU +X is into the gravity vector cylinder and base_link +X is sticking out of the screen, meaning IMU +X is aligned with base_link -Z. If this is correct, then IMU should be reporting X = +9.8 in its own frame which is Z = -9.8 in base_link/odometry frame (as you expected). The rotation matrix you have seems to be fine for a pi/2 around Y axis followed by a pi radians about X axis leaving the IMU basically upside down relative to the robot.

Did you happen to change the gravity vector in the configuration? The gravity vector does affect Isaac VSLAM but you can try to disable IMU too.