Clone this repo in the src
directory of your catkin workspace.
~/catkin_ws/src$ git clone --recursive https://github.com/ethz-asl/sampling_based_control.git
Install some system dependenices
sudo apt-get install libyaml-cpp-dev libglfw3-dev`
Install ROS dependencies. We manage them with rosdep
. In the root of you catkin workspace do:
~/catkin_ws$ rosdep init
~/catkin_ws$ rosdep install --from-paths src/sampling_based_control --ignore-src -y
Finally, the manipulation example requires the installation of the raisim
simulator. Visit its README and follow the described procedure.
For improved performance, make sure to change the build type and then build all packages.
~/catkin_ws$ config --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo
~/catkin_ws$ build
The mppi_examples
folder contains a set of examples that show how to use the control suite. In general each example needs to implement the following functions and classes:
mppi_ros
provides some utilities classes to simplify the task. Generally, a controller interface istanciate a cost, dynamics (previously defined), a policy (only Gaussian currently supported) and build a solver class. You can find an example here. In each example, the system dynamics is used also outside the controller as "a simulator" of the system which is controlled. This is a good check, as the model (dynamics in the controller) exactly matches the controlled system (dynamics receiving the input from the controller). See this for an example.