@@ -36,40 +36,64 @@ The solver is wrapped by the `MPCControllerWrapper` class, and all the settings
3636> ` MPCWrapper ` is designed to use the whole body model, if you want to use the srbd model, use ` mpc_wrapper_srbd.py ` ; look at examples/srbd_quad.py
3737
3838## Task examples
39- | Acrobot Swing-Up | Quadruped Trot | Humanoid Jump | Quadruped Barrel roll |
40- | ---| ---| ---| ---|
41- | <img src =" https://github.com/user-attachments/assets/af15576c-8fab-4e53-ac06-8f9e648703f6 " width =" 100% " /> | <img src =" https://github.com/user-attachments/assets/51f7eb3e-b344-4a92-9b16-837ca5dc71c6 " width =" 100% " /> | <img src =" https://github.com/user-attachments/assets/7b39eef5-a7d5-4243-a590-a6dab0b12af2 " width =" 100% " /> | <img src =" https://github.com/user-attachments/assets/7a875ce6-ea40-467a-b732-f473e5f40a02 " width =" 100% " /> |
42- > ** Note:**
43- You can switch between two solvers, Primal-dual LQR of GPU-FDDP. Just change the flang in the config ` solver_mode = "fddp" or "primal_dual ` .
39+ | Acrobot Swing-Up | Quadruped Trot | Humanoid Jump | Quadruped Barrel Roll | Obstacle Avoidance |
40+ | ---| ---| ---| ---| ---|
41+ | <img src =" https://github.com/user-attachments/assets/af15576c-8fab-4e53-ac06-8f9e648703f6 " width =" 100% " /> | <img src =" https://github.com/user-attachments/assets/51f7eb3e-b344-4a92-9b16-837ca5dc71c6 " width =" 100% " /> | <img src =" https://github.com/user-attachments/assets/7b39eef5-a7d5-4243-a590-a6dab0b12af2 " width =" 100% " /> | <img src =" https://github.com/user-attachments/assets/7a875ce6-ea40-467a-b732-f473e5f40a02 " width =" 100% " /> |<img width =" 100% " alt =" obstacle_avoidance " src =" https://github.com/user-attachments/assets/fbc6f156-c549-4353-a8c6-4ba43675aac5 " />
42+
43+ ## Available solvers
44+
45+ | Solver | Multiple shooting | Dynamics | Integrator | Stage Equality | Inequality constraints |
46+ | ---| ---| ---| ---| ---| ---|
47+ | ` primal-dual ` | ✔️ | Forward | Semi-implicit | ❎ | ❎ (Soft Cost barrier) |
48+ | ` fddp ` | ✔️ (dynamics defects) | Forward | Semi-implicit | ❎ | ❎ (Soft Cost barrier) |
49+ | ` eq_primal_dual ` | ✔️ | Forwward or Inverse | Explicit or Implicit | ✔️ | ❎ (Soft Cost barrier) |
50+ | ` eq_fddp ` | ✔️ (dynamics defects) | Forwward or Inverse | Explicit or Implicit | ✔️ | ❎ (Soft Cost barrier) |
51+ | ` ip_primal_dual ` | ✔️ | Forwward or Inverse | Explicit or Implicit | ✔️ | ✔️ (interior point) |
52+
4453## Installation
4554
55+ ### Prerequisites
56+ - Install [ Pixi] ( https://pixi.prefix.dev/latest/ ) - a fast conda package manager
57+
4658### Clone the repo
4759```
4860git clone git@github.com:iit-DLSLab/mpx.git
4961cd mpx && git submodule update --init --recursive
5062```
5163
52- ### Set Up Conda Environment
53- Create and activate the conda environment:
64+ ### Set Up Environment with Pixi
65+ Pixi will automatically manage your environment with all dependencies including ROS 2 Humble, JAX, and build tools:
66+
67+ ``` bash
68+ # Initialize the Pixi environment
69+ pixi install
70+
71+ # Activate the environment
72+ pixi shell
5473```
74+
75+ ### Alternative: Traditional Conda Setup (Deprecated)
76+ For reference, the legacy conda setup is:
77+ ``` bash
5578conda create -n mpx_env python=3.13 -y
5679conda activate mpx_env
57- ```
58-
59- ### Install with pip
60- from the repo main folder
61- ```
6280pip install -e .
6381```
6482
6583
6684## RUN example
67- ```
68- conda activate mpx_env
85+ ``` bash
86+ # Using Pixi
87+ pixi run python mpx/examples/mjx_quad.py
88+
89+ # Or activate the environment first
90+ pixi shell
6991python mpx/examples/mjx_quad.py
70- ## Use the keyboard's arrows to control the robot ##
7192```
7293
94+ Use the keyboard's arrows to control the robot.
95+
96+
7397> ** Note:**
7498 The first time running the script it can take more than a minute to JIT the solver
7599
0 commit comments