Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Virtual Environment use and Fix syntax. #22

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 41 additions & 36 deletions docs/operation/lerobot_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,31 @@
LeRobot X Aloha User Guide
==========================

Virtual Environment Setup
=========================

Containerization is crucial for running machine learning models to avoid dependency conflicts.
You can either use a Virtual Environment (venv) or Conda for this purpose.

Using Virtual Environment (venv)
--------------------------------

#. Install the virtual environment package:

.. code-block:: bash

$ sudo apt-get install python3-venv

#. Create a virtual environment:

.. code-block:: bash

$ python3 -m venv ~/lerobot # Creates a venv "lerobot" in the home directory
Setting up Conda Environment
============================

#. Activate the virtual environment:

.. code-block:: bash
Download and Install Miniconda
------------------------------

$ source ~/lerobot/bin/activate
To begin, follow the official `Miniconda Installation Guide <https://docs.anaconda.com/miniconda/miniconda-install/>`_
to download and install Miniconda on your system.

Using Conda
-----------
Environment Setup
-----------------

#. Create a virtual environment:

.. code-block:: bash

$ conda create -n lerobot python=3.10
conda create -n lerobot python=3.10

#. Activate the virtual environment:

.. code-block:: bash

$ conda activate lerobot
conda activate lerobot

.. note::

Use either `venv` or `Conda` based on your preference, but **do not** mix them to avoid dependency issues.

Clone Repository
================
Expand All @@ -69,6 +49,12 @@ Build and Install LeRobot Models

$ cd lerobot && pip install -e .

#. As we are working with real robots we will require to install dependencies for :guilabel:`intelrealsense` camera's and :guilabel:`dynamixel` servos.

.. code-block:: bash

$ cd lerobot && pip install .[intelrealsense,dynamixel]

Teleoperation
=============

Expand Down Expand Up @@ -152,7 +138,7 @@ The system supports episode-based data collection, where episodes are time-bound
#. The :guilabel:`--num-episodes` defines the total number of episodes to be collected.
Therefore it will check the existing output directories for any previously recorded episodes and will start recording from the last recorded episode.

#. The recorded data is pushed to hugging face hub by default you can set this false by using :guilabel:`--push_to_hub 0`.
#. The recorded data is pushed to hugging face hub by default you can set this false by using :guilabel:`--push-to-hub 0`.

.. note::

Expand Down Expand Up @@ -339,7 +325,8 @@ Troubleshooting
.. warning::
If you encounter issues, follow these troubleshooting steps:

#. **OpenCV Installation Issues (Linux)**
OpenCV Installation Issues (Linux)
----------------------------------

If you encounter OpenCV installation issues, uninstall it via :guilabel:`pip` and reinstall using Conda:

Expand All @@ -348,7 +335,8 @@ Troubleshooting
$ pip uninstall opencv-python
$ conda install -c conda-forge opencv=4.10.0

#. **FFmpeg Encoding Error (`unknown encoder libsvtav1`)**
FFmpeg Encoding Error (:guilabel:`unknown encoder libsvtav1`)
-------------------------------------------------------------

Install FFmpeg with :guilabel:`libsvtav1` support via Conda-Forge or Homebrew:

Expand All @@ -362,10 +350,27 @@ Troubleshooting

$ brew install ffmpeg

#. **Arrow Keys Not Working During Data Recording (Linux)**
Arrow Keys Not Working During Data Recording (Linux)
----------------------------------------------------

Ensure that the :guilabel:`$DISPLAY` environment variable is set correctly.

#. Checkout LeRobot Documentation for further help and details.
Frequency drops during evaluation
---------------------------------

This happens on low-performance systems due to their inability to handle multi-threaded I/O operations.
Checkout the following version for a smoother operation.
Changes will be integrated soon in the newer version of the repository.
`Low Frequency Fix <https://github.com/Interbotix/lerobot/pull/3>`_

Compute Dataset Statistic Failure
---------------------------------

It is noticed that on low-performance systems the compute statistic fails due to high batch size and number of workers.
Checkout the following version with lower batch size and number of workers.
`Compute Statistic Fix <https://github.com/Interbotix/lerobot/pull/4>`_

Checkout LeRobot Documentation for further help and details
-----------------------------------------------------------

`LeRobot Github <https://github.com/huggingface/lerobot>`_
`LeRobot Github <https://github.com/huggingface/lerobot>`_