From 90533e6b9fc50f495f150529b681697d880dfe59 Mon Sep 17 00:00:00 2001 From: Steven Palma Date: Wed, 26 Mar 2025 13:21:40 +0100 Subject: [PATCH 1/6] fix(docs): hot-fix updating installation instructions after #883 (#907) --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index effbb08b..60989322 100644 --- a/README.md +++ b/README.md @@ -98,9 +98,14 @@ conda create -y -n lerobot python=3.10 conda activate lerobot ``` +When using `miniconda`, if you don't have `fffmpeg` in your environment: +```bash +conda install ffmpeg +``` + Install 🤗 LeRobot: ```bash -pip install -e . +pip install --no-binary=av -e . ``` > **NOTE:** Depending on your platform, If you encounter any build errors during this step From 78fd1a1e04f87f3ec52428f72c29485124472fbc Mon Sep 17 00:00:00 2001 From: Steven Palma Date: Thu, 27 Mar 2025 09:55:06 +0100 Subject: [PATCH 2/6] chore(docs): update docs (#911) --- README.md | 7 +++---- examples/10_use_so100.md | 2 +- examples/11_use_lekiwi.md | 4 ++-- examples/11_use_moss.md | 2 +- examples/2_evaluate_pretrained_policy.py | 2 +- examples/7_get_started_with_real_robot.md | 2 +- examples/8_use_stretch.md | 2 +- examples/9_use_aloha.md | 2 +- lerobot/common/policies/pi0/modeling_pi0.py | 2 +- 9 files changed, 12 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 60989322..465306e4 100644 --- a/README.md +++ b/README.md @@ -108,9 +108,8 @@ Install 🤗 LeRobot: pip install --no-binary=av -e . ``` -> **NOTE:** Depending on your platform, If you encounter any build errors during this step -you may need to install `cmake` and `build-essential` for building some of our dependencies. -On linux: `sudo apt-get install cmake build-essential` +> **NOTE:** If you encounter build errors, you may need to install additional dependencies (`cmake`, `build-essential`, and `ffmpeg libs`). On Linux, run: +`sudo apt-get install cmake build-essential python-dev pkg-config libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev pkg-config`. For other systems, see: [Compiling PyAV](https://pyav.org/docs/develop/overview/installation.html#bring-your-own-ffmpeg) For simulations, 🤗 LeRobot comes with gymnasium environments that can be installed as extras: - [aloha](https://github.com/huggingface/gym-aloha) @@ -119,7 +118,7 @@ For simulations, 🤗 LeRobot comes with gymnasium environments that can be inst For instance, to install 🤗 LeRobot with aloha and pusht, use: ```bash -pip install -e ".[aloha, pusht]" +pip install --no-binary=av -e ".[aloha, pusht]" ``` To use [Weights and Biases](https://docs.wandb.ai/quickstart) for experiment tracking, log in with diff --git a/examples/10_use_so100.md b/examples/10_use_so100.md index b854f69c..8fb6d3b5 100644 --- a/examples/10_use_so100.md +++ b/examples/10_use_so100.md @@ -59,7 +59,7 @@ git clone https://github.com/huggingface/lerobot.git ~/lerobot #### 5. Install LeRobot with dependencies for the feetech motors: ```bash -cd ~/lerobot && pip install -e ".[feetech]" +cd ~/lerobot && pip install --no-binary=av -e ".[feetech]" ``` Great :hugs:! You are now done installing LeRobot and we can begin assembling the SO100 arms :robot:. diff --git a/examples/11_use_lekiwi.md b/examples/11_use_lekiwi.md index 798b7bd3..b8d134f9 100644 --- a/examples/11_use_lekiwi.md +++ b/examples/11_use_lekiwi.md @@ -69,7 +69,7 @@ git clone https://github.com/huggingface/lerobot.git ~/lerobot #### 5. Install LeRobot with dependencies for the feetech motors: ```bash -cd ~/lerobot && pip install -e ".[feetech]" +cd ~/lerobot && pip install --no-binary=av -e ".[feetech]" ``` ## C. Install LeRobot on laptop @@ -110,7 +110,7 @@ git clone https://github.com/huggingface/lerobot.git ~/lerobot #### 5. Install LeRobot with dependencies for the feetech motors: ```bash -cd ~/lerobot && pip install -e ".[feetech]" +cd ~/lerobot && pip install --no-binary=av -e ".[feetech]" ``` Great :hugs:! You are now done installing LeRobot and we can begin assembling the SO100 arms and Mobile base :robot:. diff --git a/examples/11_use_moss.md b/examples/11_use_moss.md index 48d5dfb6..7b1be232 100644 --- a/examples/11_use_moss.md +++ b/examples/11_use_moss.md @@ -33,7 +33,7 @@ git clone https://github.com/huggingface/lerobot.git ~/lerobot 5. Install LeRobot with dependencies for the feetech motors: ```bash -cd ~/lerobot && pip install -e ".[feetech]" +cd ~/lerobot && pip install --no-binary=av -e ".[feetech]" ``` ## Configure the motors diff --git a/examples/2_evaluate_pretrained_policy.py b/examples/2_evaluate_pretrained_policy.py index edbbad38..24b5ea2c 100644 --- a/examples/2_evaluate_pretrained_policy.py +++ b/examples/2_evaluate_pretrained_policy.py @@ -18,7 +18,7 @@ training outputs directory. In the latter case, you might want to run examples/3 It requires the installation of the 'gym_pusht' simulation environment. Install it by running: ```bash -pip install -e ".[pusht]"` +pip install --no-binary=av -e ".[pusht]"` ``` """ diff --git a/examples/7_get_started_with_real_robot.md b/examples/7_get_started_with_real_robot.md index cf103968..5b12e903 100644 --- a/examples/7_get_started_with_real_robot.md +++ b/examples/7_get_started_with_real_robot.md @@ -33,7 +33,7 @@ First, install the additional dependencies required for robots built with dynami Using `pip`: ```bash -pip install -e ".[dynamixel]" +pip install --no-binary=av -e ".[dynamixel]" ``` Using `poetry`: diff --git a/examples/8_use_stretch.md b/examples/8_use_stretch.md index 02f1ddc1..d02e7ef3 100644 --- a/examples/8_use_stretch.md +++ b/examples/8_use_stretch.md @@ -45,7 +45,7 @@ git clone https://github.com/huggingface/lerobot.git ~/lerobot 6. Install LeRobot with stretch dependencies: ```bash -cd ~/lerobot && pip install -e ".[stretch]" +cd ~/lerobot && pip install --no-binary=av -e ".[stretch]" ``` > **Note:** If you get this message, you can ignore it: `ERROR: pip's dependency resolver does not currently take into account all the packages that are installed.` diff --git a/examples/9_use_aloha.md b/examples/9_use_aloha.md index dad8e1c9..1f7aee3c 100644 --- a/examples/9_use_aloha.md +++ b/examples/9_use_aloha.md @@ -32,7 +32,7 @@ git clone https://github.com/huggingface/lerobot.git ~/lerobot 5. Install LeRobot with dependencies for the Aloha motors (dynamixel) and cameras (intelrealsense): ```bash -cd ~/lerobot && pip install -e ".[dynamixel, intelrealsense]" +cd ~/lerobot && pip install --no-binary=av -e ".[dynamixel, intelrealsense]" ``` ## Teleoperate diff --git a/lerobot/common/policies/pi0/modeling_pi0.py b/lerobot/common/policies/pi0/modeling_pi0.py index 7599fa63..4462f162 100644 --- a/lerobot/common/policies/pi0/modeling_pi0.py +++ b/lerobot/common/policies/pi0/modeling_pi0.py @@ -24,7 +24,7 @@ Designed by Physical Intelligence. Ported from Jax by Hugging Face. Install pi0 extra dependencies: ```bash -pip install -e ".[pi0]" +pip install --no-binary=av -e ".[pi0]" ``` Example of finetuning the pi0 pretrained model (`pi0_base` in `openpi`): From ae9c81ac391ba4c7c2238a10b51ec16d901603f3 Mon Sep 17 00:00:00 2001 From: Yongjin Cho Date: Sat, 29 Mar 2025 01:43:33 +0900 Subject: [PATCH 3/6] fix(docs): correct spelling of 'ffmpeg' in installation instructions (#914) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 465306e4..4483940d 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ conda create -y -n lerobot python=3.10 conda activate lerobot ``` -When using `miniconda`, if you don't have `fffmpeg` in your environment: +When using `miniconda`, if you don't have `ffmpeg` in your environment: ```bash conda install ffmpeg ``` From b568de35ad40aa0cb1c89dea483e844de887c2b5 Mon Sep 17 00:00:00 2001 From: Steven Palma Date: Fri, 28 Mar 2025 18:08:12 +0100 Subject: [PATCH 4/6] fix(datasets): cast imgs_dir as Path (#915) --- lerobot/common/datasets/video_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lerobot/common/datasets/video_utils.py b/lerobot/common/datasets/video_utils.py index 4f696861..c38d570d 100644 --- a/lerobot/common/datasets/video_utils.py +++ b/lerobot/common/datasets/video_utils.py @@ -257,6 +257,7 @@ def encode_video_frames( ) -> None: """More info on ffmpeg arguments tuning on `benchmark/video/README.md`""" video_path = Path(video_path) + imgs_dir = Path(imgs_dir) video_path.parent.mkdir(parents=True, exist_ok=True) ffmpeg_args = OrderedDict( From e004247ed42008ff309b606aa2bb7124a8ae7c41 Mon Sep 17 00:00:00 2001 From: Mariusz Dubielecki Date: Mon, 31 Mar 2025 18:44:05 +1100 Subject: [PATCH 5/6] docs: add tip for Mac users regarding Terminal permissions for keyboard (#917) Signed-off-by: cranberrysoft --- examples/11_use_lekiwi.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/11_use_lekiwi.md b/examples/11_use_lekiwi.md index b8d134f9..215419e1 100644 --- a/examples/11_use_lekiwi.md +++ b/examples/11_use_lekiwi.md @@ -393,6 +393,10 @@ python lerobot/scripts/control_robot.py \ ``` # F. Teleoperate + +> [!TIP] +> If you're using a Mac, you might need to give Terminal permission to access your keyboard. Go to System Preferences > Security & Privacy > Input Monitoring and check the box for Terminal. + To teleoperate SSH into your Raspberry Pi, and run `conda activate lerobot` and this script: ```bash python lerobot/scripts/control_robot.py \ From 145fe4cd17971ea27188df23b2fe9d87e8e5128b Mon Sep 17 00:00:00 2001 From: Steven Palma Date: Tue, 1 Apr 2025 15:51:59 +0200 Subject: [PATCH 6/6] fix(deps): avoid torchcodec in macos x86_64 (#925) --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1fa7b246..6b9b6802 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ dependencies = [ "rerun-sdk>=0.21.0", "termcolor>=2.4.0", "torch>=2.2.1", - "torchcodec>=0.2.1; sys_platform != 'win32' and (sys_platform != 'linux' or (platform_machine != 'aarch64' and platform_machine != 'arm64' and platform_machine != 'armv7l'))", + "torchcodec>=0.2.1; sys_platform != 'win32' and (sys_platform != 'linux' or (platform_machine != 'aarch64' and platform_machine != 'arm64' and platform_machine != 'armv7l')) and (sys_platform != 'darwin' or platform_machine != 'x86_64')", "torchvision>=0.21.0", "wandb>=0.16.3", "zarr>=2.17.0",