Ask Your Question
1

What should be considered when estimating the covariance matrix of an optical flow sensor?

asked 2016-01-13 19:00:45 -0500

sloretz gravatar image

I want to use data from a px4flow optical flow sensor using ekf_localization_node from robot_localization for odometry.

This requires a node to convert the px_comm/OpticalFlow messages to geometry_msgs/TwistWithCovarianceStamped. The covariance matrix values are unknown, but I understand that they can be estimated using the sample mean covariance.

I can get samples by mounting the sensor to a robot and moving it around, but it looks like how the robot moves while collecting samples will greatly effect the scale of the matrix.

If I collect samples while the robot moves at a constant speed, will all samples be close to the mean? Will the values in the covariance matrix then be very small? If the robot moved equal distances in all directions and back to it's starting position will the mean for each variable be zero? Then won't the values in the resulting covariance matrix be very large? Which matrix will give more accurate odometry?

Taking a step back, is the true covariance matrix constant? Would the filtered odometry be more accurate if I kept a lookup table of covariance matrices for each expected base velocity?

What's a typical workflow for determining covariance matrix values?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-02-05 08:15:37 -0500

Tom Moore gravatar image

If I collect samples while the robot moves at a constant speed, will all samples be close to the mean?

It depends on how noisy the sensor is, but that's exactly what you're trying to determine.

Will the values in the covariance matrix then be very small?

Maybe! If so, that's good news for you.

If the robot moved equal distances in all directions and back to it's starting position will the mean for each variable be zero?

When the direction of the robot changes (e.g., forward-to-backward, or forward-to-left), I think you'll need to "reset" your collection, as you'll have a new mean. For example, if you drive forward and you get a mean of N m/s, then drive backward with the same velocity, your new mean should be around -N m/s. Unless the sensor is better in one direction than another, though, you may not need to do this.

Taking a step back, is the true covariance matrix constant?

Again, that depends on the sensor. I would expect the covariance to be in some way proportional to the velocity in this case, so that the faster you go, the greater the error in your measurement, but don't take my word for it.

What's a typical workflow for determining covariance matrix values?

I can't speak to that, really, but I can speak to the trade-off between under- and over-estimating the covariance. If you make it too low, you're going to trust those measurements more than you should, and the filter output will more rapidly converge, but it will potentially be less accurate, and the velocity output may appear to be as noisy as the input. If you over-estimate, it will take longer to converge, but the velocity output will be "smoother".

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2016-01-13 19:00:45 -0500

Seen: 338 times

Last updated: Feb 05 '16