borglab / GTDynamics

Full kinodynamics constraints for arbitrary robot configurations with factor graphs.
BSD 2-Clause "Simplified" License
39 stars 10 forks source link

LM with QR fails in Python #202

Closed yetongumich closed 3 years ago

yetongumich commented 3 years ago

Solving with the same factor graph and same initial values, when specifying the optimizer LM with option QR, it works in C++, but fails in Python.

I've created a branch that exposes this issue. I've made 2 test (testPneumaticActuator.cpp and test_lm_cpp.py) which are essentially the same tests, one in Python, one in C++.

To compile the code, you need to specify GTDYNAMICS_BUILD_CABLE_ROBOT and GTDYNAMICS_BUILD_JUMPING_ROBOT, as follows: cmake .. -DGTDYNAMICS_BUILD_CABLE_ROBOT=ON -DGTDYNAMICS_BUILD_JUMPING_ROBOT=ON

varunagrawal commented 3 years ago

Can you update the branch? The C++ tests for testPneumaticFactors don't pass for me and there are some compilation issues such as PneumaticActuator::PriorValues.

varunagrawal commented 3 years ago

Fun fact: Both the C++ and Python tests run without any problem for me. What is the error message you get?

varunagrawal commented 3 years ago

I pushed some fixes I had to make to your branch.

yetongumich commented 3 years ago

Thanks! It's also due to an environment problem on my mac. I was calling different GTSAMs in C++ and Python.