Skip to content
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

Is the NonlinearFactorGraph addPrior function deprecated? #1683

Closed
zhao-zhibo opened this issue Dec 6, 2023 · 3 comments
Closed

Is the NonlinearFactorGraph addPrior function deprecated? #1683

zhao-zhibo opened this issue Dec 6, 2023 · 3 comments
Labels
cleanup Help clean up old/obsolete aspects of GTSAM

Comments

@zhao-zhibo
Copy link

I saw that the addPrior function in the header file of NonlinearFactorGraph has been deprecated, but the cpp in gtsam.pdf and other examples given still use the addPrior function, which causes the example to fail to compile. Please correct it.

@ProfFan ProfFan added the cleanup Help clean up old/obsolete aspects of GTSAM label Dec 8, 2023
@varunagrawal
Copy link
Collaborator

Where do you see addPrior being deprecated? I just looked at NonlinearFactorGraph.h and don't see any deprecation markings.

@varunagrawal
Copy link
Collaborator

Closing this issue since it is invalid.

@zhao-zhibo
Copy link
Author

@varunagrawal Because when I use it, the addprior function is not available, and one yuan factor cannot be added normally, but I already contain nonlinearfactorgraph.h head files. It will not report an error if you replace it with the ADD function. The code is shown below.The code comes from this CPP testGtsam.

gtsam::NonlinearFactorGraph graph;
auto priorNoise = gtsam::noiseModel::Diagonal::Sigmas(gtsam::Vector3(0.3, 0.3, 0.1));
// graph.addPrior(1, gtsam::Pose2(0,0,0), priorNoise); addPrior函数已经被删除了,用add函数即可
 graph.add(gtsam::PriorFactor<gtsam::Pose2>(1, gtsam::Pose2(0,0,0), priorNoise));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Help clean up old/obsolete aspects of GTSAM
Projects
None yet
Development

No branches or pull requests

3 participants