Skip to content

Commit 989c1d3

Browse files
committed
eliminated docker install explanation, added pixi
1 parent c4303bb commit 989c1d3

6 files changed

Lines changed: 32 additions & 100 deletions

File tree

README_install.md

Lines changed: 5 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -108,90 +108,13 @@ ctrl -> set zero all velocities
108108
---
109109
110110
111-
## Docker Installation
111+
## Pixi Installation
112112
113-
> [!WARNING]
114-
> Currently, the Docker installation only supports **Integrated GPUs** and the **ROS 2 Humble** environment. CUDA integration and support for other environments are under development (WIP).
113+
1. install [pixi](https://pixi.prefix.dev/latest/installation/)
115114
116-
1. Clone the repository - Ensure you download all submodules during cloning:
117-
118-
```bash
119-
git clone --recursive https://github.com/iit-DLSLab/Quadruped-PyMPC.git
120-
cd Quadruped-PyMPC
121-
```
122-
123-
2. Build the image - Build the environment using Docker Compose:
124-
125-
```bash
126-
docker compose build
127-
```
128-
129-
---
130-
131-
### How to Run - Simulation
132-
133-
1. Deploy the container - Start the container in detached mode:
134-
135-
```bash
136-
docker compose up -d
115+
2. repone the shell, and run
137116
```
138-
139-
2. Access the container - Navigate to the project folder and shell into the running container:
140-
141-
```bash
142-
docker compose exec pympc bash
143-
```
144-
145-
> [!NOTE]
146-
> * **Byobu/Tmux:** We recommend using Byobu (already installed) for a better experience.
147-
> * **Conda:** Every new shell session inside the container automatically activates the required Conda environment.
148-
149-
3. Run the simulation - Execute the following scripts in their respective terminals:
150-
151-
```bash
152-
python3 simulation/simulation.py
153-
154-
```
155-
156-
4. Clean up - To stop and remove the containers, run this command in your host terminal:
157-
158-
```bash
159-
docker compose down
117+
pixi install
160118
```
161119
162-
---
163-
164-
### How to run - ROS2
165-
1. Deploy the container - Start the container in detached mode:
166-
167-
```bash
168-
docker compose up -d
169-
```
170-
171-
2. Access the container - Navigate to the project folder and shell into the running container:
172-
173-
```bash
174-
docker compose exec pympc bash
175-
```
176-
177-
3. Run the controller - Execute the following scripts in their respective terminals:
178-
179-
* **Terminal 1 (Controller):**
180-
```bash
181-
python ros/run_controller.py
182-
183-
```
184-
185-
4. Access the container - open a second terminal. This if you want to test the above node with a simulator, for example, to test ros2 delay, you can run
186-
187-
* **Terminal 2 (Simulator):**
188-
```bash
189-
python ros/run_simulator.py
190-
191-
```
192-
193-
5. Clean up - To stop and remove the containers, run this command in your host terminal:
194-
195-
```bash
196-
docker compose down
197-
```
120+
3. Follow from step 5. above

installation/mamba/integrated_gpu/mamba_environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ dependencies:
3030
- mujoco
3131
- readchar
3232
- liecasadi
33-
- gym-quadruped
33+
- gym-quadruped>=1.1.5
3434

installation/mamba/nvidia_cuda/mamba_environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ dependencies:
3131
- mujoco
3232
- readchar
3333
- liecasadi
34-
- gym-quadruped
34+
- gym-quadruped>=1.1.5
3535

pixi.lock

Lines changed: 16 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ classifiers=[
3232
"License :: OSI Approved :: Apache Software License",
3333
"Programming Language :: Python :: 3.10",
3434
]
35+
dependencies = ["gym-quadruped==1.1.5"]
3536

3637

3738
# ____________________________________________________________________________________________________________________
@@ -73,7 +74,7 @@ quadruped_pympc = { path = ".", editable = true }
7374
mujoco = "*"
7475
readchar = "*"
7576
liecasadi = "*"
76-
gym-quadruped = "*"
77+
gym-quadruped = { version = ">=1.1.5" }
7778

7879
[tool.pixi.feature.no-cuda.dependencies]
7980
jaxlib = "*"

quadruped_pympc/config.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# These are used both for a real experiment and a simulation -----------
88
# These are the only attributes needed per quadruped, the rest can be computed automatically ----------------------
9-
robot = 'go2' # 'aliengo', 'go1', 'go2', 'b2', 'hyqreal1', 'hyqreal2', 'mini_cheetah', 'spot' # TODO: Load from robot_descriptions.py
9+
robot = 'go2' # 'aliengo', 'go1', 'go2', 'b2', 'hyqreal1', 'hyqreal2', 'mini_cheetah', 'spot', 'pegasus'
1010

1111
from gym_quadruped.robot_cfgs import RobotConfig, get_robot_config
1212
robot_cfg: RobotConfig = get_robot_config(robot_name=robot)
@@ -65,6 +65,12 @@
6565
[-0.0014987128245817424, 1.4485084687476608, 0.0004641447134275615],
6666
[-0.021400468992761768, 0.0004641447134275615, 1.503217877350808]])
6767

68+
elif (robot == 'pegasus'):
69+
mass = 87.43
70+
inertia = np.array([[0.2310941359705289, -0.0014987128245817424, -0.021400468992761768],
71+
[-0.0014987128245817424, 1.4485084687476608, 0.0004641447134275615],
72+
[-0.021400468992761768, 0.0004641447134275615, 1.503217877350808]])
73+
6874

6975
gravity_constant = 9.81 # Exposed in case of different gravity conditions
7076
# ----------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)