We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I am getting seg faults or ValuesKeyDoesNotExist errors when using rekey on the LinearFactorContainer.
As the linearization point is optional and there are checks for linearizationPoint_ in some methods, the rekey method is missing these checks. https://github.com/borglab/gtsam/blob/develop/gtsam/nonlinear/LinearContainerFactor.cpp#L180
linearizationPoint_
#include <gtsam/linear/HessianFactor.h> #include <gtsam/nonlinear/LinearContainerFactor.h> int main(int argc, char *argv[]) { double mu = 1e10; size_t dim = 3; gtsam::Key key = 0; gtsam::HessianFactor H(key, mu * gtsam::Matrix::Identity(dim, dim), gtsam::Vector::Zero(dim), 0.0); gtsam::LinearContainerFactor factor(H); gtsam::Key new_key = 1; std::map<gtsam::Key, gtsam::Key> rekey_mapping = {{key, new_key}}; factor.rekey(rekey_mapping); gtsam::KeyVector rekey_vector = {new_key}; factor.rekey(rekey_vector); return 0; }
Remap the keys of the GaussianFactor and only modify linearizationPoint_ if it has a value.
C++, Ubuntu 20.04, gtsam develop branch commit: 164c354
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I am getting seg faults or ValuesKeyDoesNotExist errors when using rekey on the LinearFactorContainer.
Description
As the linearization point is optional and there are checks for
linearizationPoint_
in some methods, the rekey method is missing these checks.https://github.com/borglab/gtsam/blob/develop/gtsam/nonlinear/LinearContainerFactor.cpp#L180
Steps to reproduce
Expected behavior
Remap the keys of the GaussianFactor and only modify
linearizationPoint_
if it has a value.Environment
C++, Ubuntu 20.04, gtsam develop branch commit: 164c354
The text was updated successfully, but these errors were encountered: