stereolabs / zed-ros-wrapper

ROS wrapper for the ZED SDK
https://www.stereolabs.com/docs/ros/
MIT License
447 stars 391 forks source link

Significant tracking drift when not enough features. #817

Closed Srijal97 closed 2 years ago

Srijal97 commented 2 years ago

Preliminary Checks

Description

We had the ZED2i (mounted on a robot) travel a distance of 8m, and then perform a 90-degree turn towards the left. The position tracking of the ZED2i is significantly off (travels only about 4.x meters instead of 8), and further, when performing the turn, the position estimate drifts by several meters sideways (along y, when x is facing forward). This can be seen on both the /odom and /pose_with_covariance topics, and the covariances reported by the ZED do not increase much when outputting this erroneous estimate (still remains in the order of 1e-5). Also, we found that the /odom estimate performs better than /pose_with_covariance

We think this is because of the low amount of features the ZED can see, so we added some extra features in the same environment for the ZED to track. See images of both test scenarios here. When these additional features are added, the position tracking is significantly improved (travels about 6.x meters now), and there is minimal sideways drift during turns.

It seems to me that the tracking should be much better than this, because even in the scenario without added features, there are lines on the ground for the ZED to track. If somehow this is beyond the ZED2i's current ability, differences in the IMU estimate and visual tracking estimate should at least reflect as high covariances so that our EKF node knows when to rely less on the ZED.

Steps to Reproduce

I have attached here, the SVO files for both scenarios along with the ZED and ROS configuration files. For both these .SVO files, the robot starts at the position shown in the images above, travels 8 meters forward, slightly moves back, and then performs a 90 degree turn to the left. Note that it is a "car-like" turn.

Let me know if anything else is needed/

Expected Result

Position tracking gives a better estimate, and/or at least gives out higher covariances when there are low features to track.

Actual Result

Poor linear position estimate, heavy drifting when the robot turns in a low feature environment.

ZED Camera model

ZED2i

Environment

OS: Ubuntu 18, ROS Melodic
Device: Nvidia Jetson Nano 4GB
ZED ROS Wrapper v3.5

Anything else?

We also noticed this issue previously in a slightly different test scenario, where the robot moving along a crosswalk has excellent positional estimates, but when moved on a road with less obvious features, the tracking performance is poor. Further, in one case, the shadow of the robot falls in the frame of the ZED2i, and we think that this degrades the performance even further.

I have attached images here of this test. We moved the robot along the crosswalk and perpendicular to it in both directions. Along the crosswalk, the position estimate was very accurate, but perpendicular to the crosswalk, the ZED thought it moved about 1.5m to 3m when actually moved 5m. The shadow worsens things further, though we do not have a thorough experiment on this. No .SVO files were recorded here, but we could do that if it helps.

Myzhar commented 2 years ago

Hi @Srijal97 This is not a bug related to the ROS wrapper, but something more related to the ZED SDK. Please write an email to support@stereolabs.com to get support by the team.