giafranchini / fuse

The fuse stack provides a general architecture for performing sensor fusion live on a robot. Some possible applications include state estimation, localization, mapping, and calibration.
Other
2 stars 1 forks source link

New motion models #20

Closed giafranchini closed 2 months ago

giafranchini commented 9 months ago

We should add three new motion models:

And implement a method to change the behavior at runtime.

giafranchini commented 8 months ago

Models corresponding to different kinematic modes can be implemented in a single class that derives from fuse_core::AsyncMotionModel. To this end, it should be sufficient to:

Problem: how to "remember" which kinematic mode was active between 2 specific timestamps where we would like to compute the transaction? This problem arises since we are able to read the current active kinematic mode from a dedicated ROS topic, but the optimizer will not ask immediately to generate a motion model transaction: applyMotionModels() is called at the start every optimization loop.

Possible solutions:

roncapat commented 8 months ago

Which is the time window of each optimization loop? Because there will be for sure a "consistent" amount of time between two mode switching, where the rover will be steady.

giafranchini commented 8 months ago

It can be configured with a frequency parameter. In tests I set it to 30hz so the loop is binded to a timer with that frequency. The thing is, nothing is preventing the loop to take more than this time interval (this is for example what was happening on the rover last week). In general, these kind of delays are minimal (some ms) and can be avoided decreasing the frequency, but what if for some reason one iteration takes some seconds to finish, and in between there is a change in locomotion mode?

roncapat commented 8 months ago

I think we can at least for now ignore the issue, and if then it becomes evident that there is a practical problem, we can:

but at least we have workarounds for this corner cases.

roncapat commented 8 months ago

About: "create a map time - locomotion mode" can you expand a bit?

giafranchini commented 8 months ago

About: "create a map time - locomotion mode" can you expand a bit?

Something like a std::map with timestamp as keys and locomotion mode as values