ROS integration for whole-body MPC
This PR adds ROS support for the whole-body MPC (my branch wjallet/devel). It eliminates a lot of dead code and makes necessary changes to some of the code architecture.
Changes:
- simplify code which creates Crocoddyl OCP (
ocp_croccodyl.py
)- use numpy masks where applicable
- rename ambiguous "task" variable
- do not use np.insert or np.append
- simplify the C++ Params class by:
- removing a lot unused parameters (for centroidal MPC)
- direct parsing of Yaml arrays to C++ Eigen vectors or matrices
- remove or change type data members defined as std::vector only to be converted in Python to numpy
- default constructor default-initializes all data members, does nothing else
- static factory function
create_from_file(filename=default_filename)
replaces older ctor - add static factory
create_from_str()
which allows parsing from a std::string
- enable pickling for the Params class (relevant for multiprocessing on macOS apparently)
- fix the CMake config for macOS
- fix package.xml
- add CMake listfile formatting and linting
- enable conversion from C++
YAML::Node
to Python dicts (for Python-only params) - add utils for converting between ROS multiarrays and NumPy arrays
- change the TaskSpec class:
- some parameters are loaded from the Yaml config file
- renames file problem_data.py to task_spec.py
- rename CrocOCP to AlgtrOCP
- separates AlgtrOCP into a subclass for instantiating ProxDDP, and one for
proxddp.SolverFDDP
- separates AlgtrOCP into a subclass for instantiating ProxDDP, and one for
- update the README
- do not pass around the TaskSpec object
- python: remove qrw.Utils.init_robot() because it modified the Params object without telling the user
- replace by more explicit and self-contained
make_footstep()
- no attributes added to Params object (
params.T
is replaced byparams.N_gait
in C++ and initialized there)
- replace by more explicit and self-contained
We have tested building with Linux, macOS, and macOS with Catkin from robostack.
Thanks to the work of Etienne Arlaud @Inria Paris.
Resolves #3
Edited by Wilson Jallet