Coder Social home page Coder Social logo

stonneau / multicontact-locomotion-planning Goto Github PK

View Code? Open in Web Editor NEW

This project forked from loco-3d/multicontact-locomotion-planning

1.0 1.0 0.0 1.76 MB

MLP : a Decoupled and Modular Framework for Multicontact Locomotion Planning

License: BSD 2-Clause "Simplified" License

Dockerfile 0.62% Shell 1.73% Python 97.65%

multicontact-locomotion-planning's Introduction

This project implement the framework for multicontact locomotion planning proposed in the loco-3d project. This framework decompose the global locomotion problem in several subproblems solved sequentially, as shown in the figure below:

Framework proposed by the Loco3D project.

In details, this package implement the following architecture:

Architecture implemented in this package.

Where all the connections between the blocks are made with objects from the multicontact-API package. Thanks to this, we can have a modular architecture with different methods for solving each blocks but with an unified API.

The multicontact-locomotion-planning package doesn't implement any of the solvers/methods for any of the blocks but it contains wrapper for the different blocks of the framework and script to automatically formulate problems, retrieve and store solutions such that the input and output of each wrapper is an object from the multicontact-API package. Then it implement the connection between each block, along with a lot of helpers for visualization or exports.

This wrappers are python script that take a user input or an object from the multicontact-API package, generate a generic problem from the input and call the API of a specific solver. Then it retrieve the solution from the solver and correctly store it in a multicontact-API object.

The goal of this framework is to be modular, allowing the user to select a method for each of the subproblem or add a wrapper for any new method from the state-of-the-art solving one of this subproblem and connect it seamlessly to the rest of the framework.

Slides of a presentation of this package: https://cloud.laas.fr/index.php/s/CFkJbxrC9SYQ34i

Basic tutorials slides are availables: https://cloud.laas.fr/index.php/s/Y4xeJtY1gn3tFN8

Installation procedure :

This package rely on a lot of optionnal packages, see the section 'Available methods' for more information on the installation of this optional packages.

Install depencies from binary repositories :

  1. Add robotpkg to your apt configuration: http://robotpkg.openrobots.org/debian.html
  2. sudo apt update && sudo apt install robotpkg-py27-pinocchio robotpkg-py27-multicontact-api

Install depencies from sources :

Follow the instruction from https://github.com/loco-3d/multicontact-api

Installation procedure :

Once the depencies are correctly installed, clone the repository :

git clone https://github.com/loco-3d/multicontact-locomotion-planning.git

And add the directory multicontact-locomotion-planning/script to your PYTHONPATH.

Usage

Basic usage:

Start background process:

  • If you want a visualization of the motion, you have to start gepetto-gui server before launching any script of this package. Run gepetto-gui in a separate terminal. After execution of any script, you should kill this process and restart it.

  • Most of the scripts require the hpp-rbprm server. Run hpp-rbprm-server in a separate terminal. After execution of any script, you should kill this process and restart it.

Launch the main script:

The main script of this package is https://github.com/loco-3d/multicontact-locomotion-planning/blob/master/scripts/run_mlp.py .This script call all the required solver to compute the complete framework as shown in the figure above. You have to call this script with an additional argument DEMO_NAME :

python run_mlp.py DEMO_NAME

The value of DEMO_NAME can be the name of any file inside the folder script/mlp/demo_configs/ (without the extension and without the complete path).

Understanding configuration files:

The user should never modify the main script (run_mlp.py) but only the various configuration files. When launching the main script, it load three configuration files in the following order:

External configuration file for specific solvers:

Some solvers called as external library by this package may require other configuration files, they are stored in specific folders (eg. momentumopt_configs for momentumopt solver). The file(s) used by this solvers are choosen inside the mlp/demo_configs/DEMO_NAME.py configuration file (https://github.com/loco-3d/multicontact-locomotion-planning/blob/master/scripts/mlp/demo_configs/talos_circle.py#L1).

Load motion from files:

The script https://github.com/loco-3d/multicontact-locomotion-planning/blob/master/scripts/load_motion_from_files.py can load a motion from a *_COM.cs and a *.npz file.

  • Edit the variables path, npzFile and csFile inside the script
  • run gepetto-gui in a separate terminal
  • run python load_motion_from_files.py

This script currently have hardcoded values for the Talos robot. This is done to avoid other depencies. One can remove the class Robot hardcoded in this script and instead load one of the various Robot classes found in HPP-RBPRM.

Available methods :

Currently supported method for each subproblem, you need to install the packages linked separetely if you want to use this methods.

Contact generation :

Centroidal trajectory optimization :

Wholebody motion generation :

Effector trajectories :

  • Basic predefined splines
  • Limb-RRT (geometric path found by path-planning). Require RBPRM
  • Optimized limb-rrt (Dynamically consistent spline based on the results of limb-rrt)

Visualization :

Export :

Contributing

Package organization:

Inside scripts/mlp/ there is one folder for each of the block shown in the figure of the introduction. In each of the subfolder there is one script for each different method that we can use to solve this block. There is also an __init__.py file that choose the correct script to import according to the solver choosen in the configuration files.

Adding new wrapper:

If you want to use a new method to solve one of the subproblem of our proposed framework, you should add a new script in the coresponding folder. This script should implement the method used in the __init__.py file of this subfolder with the same prototype.

Basically, this script should implement a wrapper between the multicontact-api structure and the solver that you want to use. It should call the API of the solver to generically formulate a problem from the given input, solve the problem and store the results in a multicontact-api object.

multicontact-locomotion-planning's People

Contributors

pfernbach avatar jasonchmn avatar

Stargazers

 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.