-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2D state example #8
Comments
Instead of deriving your state from State<double> derive it from State<pos> |
You can also check the unit tests for more examples |
Thank you for your fast answer. I created a new state class based on the example's existing one :
` also made observations class :
` and then runned the optimization wich worked :
But i'm feeling like not doing it the good way. in : ` internal class State : State
I don't get what the dimension argument of base(initialValue, 3) is meant for. |
Sorry, my first comment was not rendered correctly due to special characters... I have updated the comment and should make more sense now. |
You are on the right track, you have to fix the base of your State class. |
Hi, PrecisionMatrixTest helped me a lot. But i still not sure how to use "Point2DObservation". When doing this, optimisation doesn't change anything on estimations. |
Odometry measurements would require 2 states (points). And the measurement would be the measured travelled distance between those points (or vector, if you know direction - making it a 2D error). And in the OnComputeError() you compute an error based on the difference between the estimates of those two states and the measured distance. So, you need to make another Observation class, pretty similar to Point2DObservation, but maybe returning a 1D array. And in the constructor, provide 2 states (e.g. fromPoint and toPoint) - DO NOT FORGET to pass both states to the base constructor! Else the framework does not know about the dependency of that observation to both states. |
Hi there,
Would it be possible to get an example of graph optimization with 2D state and 2D measurment and so on...
I'm trying to models my problem where each nodes is a Robot's Pos (x,y) and each nodes has an odometry constraint (dx, dy) with respective covariance matrix, and a loop closure adds an observation (tx, ty) between two nodes.
I get confused when trying to apply the given exemple in more than 1 dim. I can't manage to properly derive my own state class and observation class for 2D problems.
Thanks,
TD
The text was updated successfully, but these errors were encountered: