Closed yetongumich closed 3 years ago
@gchenfc take a look at cable robot failures above.
I think they're jumping-robot failures?
/home/runner/work/GTDynamics/GTDynamics/build/python/jumpingrobot.cpp: In lambda function:
/home/runner/work/GTDynamics/GTDynamics/build/python/jumpingrobot.cpp:75:389: error: invalid initialization of reference of type ‘const KeyVector&’ {aka ‘const std::vector<long unsigned int, tbb::tbb_allocator<long unsigned int> >&’} from expression of type ‘const std::vector<long unsigned int>’
75 | m_.def("AddSourceMassCollocationFactor",[](gtsam::NonlinearFactorGraph* graph, const std::vector<gtsam::Key>& mdot_prev_keys, const std::vector<gtsam::Key>& mdot_curr_keys, gtsam::Key source_mass_key_prev, gtsam::Key source_mass_key_curr, gtsam::Key dt_key, bool isEuler, const boost::shared_ptr<gtsam::noiseModel::Base> cost_model){ gtdynamics::AddSourceMassCollocationFactor(graph, mdot_prev_keys, mdot_curr_keys, source_mass_key_prev, source_mass_key_curr, dt_key, isEuler, cost_model);}, py::arg("graph"), py::arg("mdot_prev_keys"), py::arg("mdot_curr_keys"), py::arg("source_mass_key_prev"), py::arg("source_mass_key_curr"), py::arg("dt_key"), py::arg("isEuler"), py::arg("cost_model"));
| ^~~~~~~~~~~~~~
In file included from /home/runner/work/GTDynamics/GTDynamics/build/python/jumpingrobot.cpp:22:
/home/runner/work/GTDynamics/GTDynamics/gtdynamics/jumpingrobot/factors/JRCollocationFactors.h:40:65: note: in passing argument 2 of ‘void gtdynamics::AddSourceMassCollocationFactor(gtsam::NonlinearFactorGraph*, const KeyVector&, const KeyVector&, gtsam::Key, gtsam::Key, gtsam::Key, bool, const shared_ptr&)’
40 | gtsam::NonlinearFactorGraph* graph, const gtsam::KeyVector& mdot_prev_keys,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
make[2]: *** [python/CMakeFiles/gtdynamics_py.dir/jumpingrobot.cpp.o] Error 1
python/CMakeFiles/gtdynamics_py.dir/build.make:119: recipe for target 'python/CMakeFiles/gtdynamics_py.dir/jumpingrobot.cpp.o' failed
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:1273: recipe for target 'python/CMakeFiles/gtdynamics_py.dir/all' failed
Makefile:145: recipe for target 'all' failed
make[1]: *** [python/CMakeFiles/gtdynamics_py.dir/all] Error 2
make: *** [all] Error 2
Error: Process completed with exit code 2.
The errors were just listed directly after cablerobot.cpp
probably because the -j
make option is turned on on the CI.
Nevertheless @yetongumich, taking a look, I think you can just use const gtsam::KeyVector&
instead of const std::vector<gtsam::Key>&
in the .i file. Since it's defined in gtsam's preamble/specializations with implicitly_convertible
(and handles TBB allocator), then it should still be transparent in python and won't get these TBB errors
See the first half of #208
Ignore part about MacOS needing TBB
Passing all CI tests and merge.
Adding jumping robot to ci, and update according to new api changes.