5.1 Installation
Follow these steps to set up the Le Robot Library on your computer and unlock the full potential of your KikoBot C1. This guide ensures that everything is tailored for smooth integration with your robot.
Step 1: Install Miniconda
Miniconda is essential for managing Python environments. Let’s get it installed:
i. Create a directory for Miniconda:
mkdir -p ~/miniconda3
ii. Download the appropriate installer:
Linux:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
Mac:
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh
Mac (Intel):
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh
iii. Run the installer:
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
iv. Clean up the installer:
rm ~/miniconda3/miniconda.sh
v. Initialize Miniconda:
~/miniconda3/bin/conda init bash
Step 2: Refresh Your Shell
Restart your terminal to apply the changes. Alternatively, run the appropriate command based on your shell:
Bash:
source ~/.bashrc
Mac (Bash Profile):
source ~/.bash_profile
Step 3: Set Up a New Conda Environment
To keep things organized, create a fresh environment for the Le Robot Library:
conda create -y -n lerobot python=3.10 && conda activate lerobot
Step 4: Clone the Le Robot Repository
Download the library directly from GitHub:
git clone https://github.com/huggingface/lerobot.git
cd lerobot
Step 5: Install Le Robot for KikoBot C1
Navigate to the library directory and install it with the required dependencies for KikoBot C1’s Waveshare motors:
cd lerobot && pip install -e ".[waveshare]"
Step 6: Additional Setup for Linux
If you’re using Linux and plan to record datasets, install the following extra dependencies:
Install ffmpeg
:
conda install -y -c conda-forge ffmpeg
Update OpenCV:
pip uninstall -y opencv-python
conda install -y -c conda-forge "opencv>=4.10.0"
Your setup is now complete! With the Le Robot Library ready to go, your KikoBot C1 is equipped to take on advanced tasks, from imitation learning to reinforcement learning, making robotics development seamless and efficient.