-
Notifications
You must be signed in to change notification settings - Fork 767
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
add LAGO (for Pose2) to python wrapper #899
Conversation
|
@dellaert can we change the name of the |
@ProfFan do you think we could get a 2-level namespace like |
The LAGO functions are in their own namespace, so you can do this in the wrapper: #include <gtsam/slam/lago.h>
namespace lago {
gtsam::Values initialize(const gtsam::NonlinearFactorGraph& graph, const gtsam::Values& initialGuess);
gtsam::Values initialize(const gtsam::NonlinearFactorGraph& graph, bool useOdometricPath);
} This will allow you to do |
Cool, thanks Varun |
@varunagrawal
|
Umm I think you're doing something wrong because I pulled this branch and ran the test and I get this:
This is because you haven't passed in a second argument to |
Hi @varunagrawal @dellaert @ProfFan I believe this is good to go now (all tests passing), if you could take a look |
graph, initial = gtsam.readG2o(g2oFile) | ||
|
||
# Add prior on the pose having index (key) = 0 | ||
priorModel = gtsam.noiseModel.Diagonal.Variances(vector3(1e-6, 1e-6, 1e-8)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just call gtsam.Point3
instead of vector3
?
python/gtsam/tests/test_lago.py
Outdated
graph, initial = gtsam.readG2o(g2oFile) | ||
|
||
# Add prior on the pose having index (key) = 0 | ||
priorModel = gtsam.noiseModel.Diagonal.Variances(vector3(1e-6, 1e-6, 1e-8)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same deal here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo 2 comments
Add's LAGO (for Pose2 slam without an initial estimate) to the Python wrapper, and ports the C++ example to Python.