Skip to content

Commit 4fdbf58

Browse files
committed
Document inference.
1 parent 2d6a5c0 commit 4fdbf58

File tree

1 file changed

+31
-21
lines changed

1 file changed

+31
-21
lines changed

README_IHMC.md

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -87,57 +87,67 @@ $ chmod +x Miniconda3-latest-*.sh
8787
$ ./Miniconda3-latest-*.sh
8888
```
8989
```
90-
conda init
90+
$ conda init
9191
```
9292
Close and re-open terminal
9393

9494
2. Install [mamba](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html).
9595
```
96-
conda install mamba -c conda-forge
96+
$ conda install mamba -c conda-forge
9797
```
9898

99-
I needed to make sure this was setup (and restart shell after):
99+
I needed to setup the shell and restart it:
100100
```
101101
$ mamba shell init --shell bash --root-prefix=~/.local/share/mamba
102102
```
103103

104-
For some reason on Arch Linux I needed to do this:
104+
For some reason on Arch Linux I needed to attain more permissions:
105105
```
106106
# chown -R duncan:duncan /opt/miniconda3/
107107
```
108108

109109
1. Install ROS 2 via [Robostack](https://robostack.github.io/GettingStarted.html).
110110
```
111-
mamba create -n ros_env
112-
mamba activate ros_env
113-
114-
conda config --env --add channels conda-forge
115-
conda config --env --remove channels defaults
116-
117-
conda config --env --add channels robostack-humble
118-
mamba install ros-humble-desktop
119-
120-
mamba deactivate
121-
mamba reactivate
111+
$ mamba create -n lerobot_inference
112+
$ mamba activate lerobot_inference
113+
114+
$ conda config --env --add channels conda-forge
115+
$ conda config --env --add channels robostack-humble
116+
$ mamba install ros-humble-desktop
117+
118+
$ mamba deactivate
122119
```
123120
Make sure you can run `rviz2`.
124121
```
125-
mamba activate ros_env
126-
rviz2
122+
$ mamba activate lerobot_inference
123+
$ rviz2
127124
```
128125

129126
1. Setup lerobot dependencies:
130127

131128
```
132-
cd lerobot
129+
$ cd lerobot
133130
134-
mamba install -c conda-forge cmake h5py imageio numba omegaconf opencv \
131+
$ mamba install -c conda-forge cmake h5py imageio numba omegaconf opencv \
135132
packaging pymunk pyzmq termcolor pytorch torchvision zarr flask
136133
137-
pip install datasets deepdiff diffusers draccus==0.10.0 einops gdown gymnasium==0.29.1 \
134+
$ pip install datasets deepdiff diffusers draccus==0.10.0 einops gdown gymnasium==0.29.1 \
138135
"huggingface-hub[hf-transfer,cli]" jsonlines av pynput rerun-sdk wandb torchcodec==0.2.1 pyserial
139136
140-
pip install -e . --no-deps
137+
$ pip install "numpy<2.3"
138+
139+
$ pip install -e . --no-deps
141140
```
142141

143142

143+
Set the domain ID:
144+
```
145+
$ export ROS_DOMAIN_ID=#
146+
```
147+
148+
Run the policy:
149+
```
150+
$ python src/lerobot/robots/ihmc_ros_robot/ihmc_ros_robot.py \
151+
--trained_policy=/path/to/dataset/last/pretrained_model/
152+
```
153+

0 commit comments

Comments
 (0)