Open SahanGura opened 2 years ago
For short term, the odometry probably is still quite accurate because of the imu. But this will get worse in time. The covariance in de odometry topic reflects this (it will increase).
Perhaps rtabmap can use that information (or threshold it?) to determine if the given odometry is good enough to use?
I presume your robot is still moving at the point that the odometry data is lost. How do you plan to cope with this? If the EKF just stops producing output, then when it resumes, the state estimate will not account for any of that "outage" period.
The issue here is that you are not measuring state variables that need to be measured, so your covariance is exploding.
Your feature request notwithstanding, you have two options within the current framework:
vo
data and either make a service call to pause the EKF, or to output dummy messages. Then you could feed those to the EKF as another input.TwistWithCovarianceStamped
message, you could feed those measurements (with large covariance values) as an additional input to the EKF. When the vo
data is available, the filter will trust it more. When it's not available, the filter will still have your commanded velocities to keep it from diverging.@ayrton04 Thank you for your suggestion. I would try the first option you have suggested to deal with this issue.
I presume your robot is still moving at the point that the odometry data is lost. How do you plan to cope with this?
Since I have to use the visual odometry as the primary source of measurement, I should make sure to move the camera in a way it would not lose the odometry. In case of an odometry loss, I should operate the robot in a way it can get back to the track so it can continue providing the visual odometry again. This is the basic method we follow when using rtabmap and rgbd_odometry node in remote mapping.
Feature request
Selecting a primary source of measurement, and using it for conditionally controlling odometry output
Feature description
When using robot localization package to fuse visual odometry and IMU data for getting the visual inertial odometry, I have met with the following issue.
This is the method I used to get the filtered odometry
When the rgbd_odometry node loses the odometry, EKF cannot understand it and it tries to predict odometry using the state transition model without visual odometry. Therefore the generated map starts to distort, from the moment the first odometry loss happened.
In this case, primary source of measurement should be visual odometry. Because, if visual odometry is lost, there is no point of continue predicting odometry using IMU data, as it results generating inaccurate odometry output which leads to generating a distorted map. There should be a way to communicate this odometry losing moment to the EKF, so it can stop predicting inaccurate odometry values. That is what happens when we feed visual odometry generated by rgbd_odometry node to the rtabmap node directly. rtabmap node identifies when odometry is lost, and it stops mapping until odometry is properly given.