Read-only mirror of https://github.com/ethz-asl/sampling_based_control — ETHZ ASL. Issues & pull requests at the source.
  • Jupyter Notebook 50%
  • C++ 46%
  • Python 2.5%
  • CMake 1.2%
  • HTML 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Giuseppe Rizzi 2b6b337e77
Merge pull request #30 from ethz-asl/feature/robot_control
Ros manipulation controller for Royalpanda
2022-03-07 17:16:44 +01:00
mppi linting 2021-10-07 12:52:52 +02:00
mppi_examples linting 2022-03-07 17:15:06 +01:00
mppi_pinocchio updated READMe 2021-10-07 16:48:54 +02:00
mppi_ros updated READMe 2021-10-07 16:48:54 +02:00
mppi_tools updated READMe 2021-10-07 16:48:54 +02:00
submodules leaving only mobile dynamics, first silo integration and log processing test script 2021-07-28 18:01:12 +02:00
.clang-format more linting 2021-03-02 17:07:40 +01:00
.gitignore ignore vscode config 2022-03-07 17:12:12 +01:00
.gitmodules leaving only mobile dynamics, first silo integration and log processing test script 2021-07-28 18:01:12 +02:00
.linterconfig.yaml linting file 2021-03-02 17:08:40 +01:00
imgui.ini formatting and comment 2021-04-24 15:21:51 +02:00
LICENSE license and removed cmake based formatting 2021-03-02 15:19:57 +01:00
README.md fix readme 2021-10-07 17:15:16 +02:00

sampling_based_control

Installation

  1. 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
    
  2. Install some system dependenices

    sudo apt-get install libyaml-cpp-dev libglfw3-dev`
    
  3. 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
    
  4. Finally, the manipulation example requires the installation of the raisim simulator. Visit its README and follow the described procedure.

Build

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

Introdcution

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:

  • a stage cost: a function that maps the current state and input to a scalar cost value. You can find a simple implementation of the cost class for a first order mass here. Cost classes must inherit from the cost base class
  • system dynamics: given the currently stored state and applied input predict the next state. You can find a simple implementation of the cost class for a first order mass here. Dynamics classes must inherit from the cost base class
  • controller interface: finally cost and dynamics can be used in a stochastic controller which uses a gaussian policy to control the system. The 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.