Skip to content

SpaceEnstar01/Aloha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 

Repository files navigation

Aloha

Experiments & demos with LeRobot Aloha robot arm

๐Ÿ–ฅ๏ธ System Information

  • Operating System: Ubuntu 20.04 (via Windows WSL)
  • GPU: NVIDIA GeForce RTX 4060, Driver Version 576.52, CUDA 12.9 ใ€Train in RTX4090D 24G or AutoDL platformใ€‘
  • Hardware: Logitech C920 Webcam, Xuanya hardware robotic arm based on Aloha ๏ผˆhttps://github.com/Xuanya-Robotics/lerobot๏ผ‰

๐Ÿ“ฆ Features

  • Simulation & real-world control
  • Imitation learning & reinforcement learning
  • Dataset collection & analysis

๐ŸŽฅ camera

  • ไป‹็ปไฝ ไฝฟ็”จ็š„ๆ‘„ๅƒๅคดๅž‹ๅทใ€ๅˆ†่พจ็އใ€ๅฎ‰่ฃ…ๆ–นๅผ
  • ็คบไพ‹๏ผš
    # ๆŸฅ็œ‹ๅฏ็”จๆ‘„ๅƒๅคด
    ls /dev/video*
    # ๅฏๅŠจๆ‘„ๅƒๅคด้‡‡้›†่„šๆœฌ
    python scripts/camera_setup.py
    
    

๐Ÿงช AutoDL Training Setup

๐Ÿ›  Installation

git clone https://github.com/yourusername/aloha-project.git
cd aloha-project
# install dependencies etc.


````markdown
#

This section documents the training environment setup and execution on the **AutoDL platform**, including conda environment setup, code installation, Hugging Face integration, and training script usage.

---

### ๐Ÿ”ง Environment Setup

1. **Initialize Conda**
```bash
conda env list
conda activate base
conda init

Restart the terminal after initializing conda.

  1. Create and activate environment
conda create -y -n lerobot python=3.10
conda activate lerobot
  1. Enable Network Turbo (AutoDL Specific)
source /etc/network_turbo
# Output: Successfully enabled. Note: Academic use only, no stability guaranteed.

๐Ÿ“ฆ Project Setup

  1. Clone project repositories
git clone https://github.com/Xuanya-Robotics/lerobot.git
cd lerobot
git clone https://github.com/Xuanya-Robotics/Alicia_duo_sdk.git Alicia_duo_sdk
  1. Install dependencies
conda install ffmpeg -c conda-forge
pip install -e .

๐Ÿ” Hugging Face Configuration

  1. Set Git Credential Helper
git config --global credential.helper store
  1. Login using token
hf auth login --token <your_token>
# Example:
# hf auth login --token hf_..................... 

After login, the token will be saved locally. You may add --add-to-git-credential if needed.

  1. Set Hugging Face username environment variable
HF_USER=$(hf auth whoami | head -n 1) && echo $HF_USER
# Example output: Enstar07

๐Ÿ‹๏ธ Training Examples

๐Ÿ“ก Training from Hugging Face cloud dataset

python lerobot/scripts/train.py \
  --dataset.repo_id Enstar07/demo_dataset3 \
  --policy.type act \
  --output_dir outputs/train/act_alicia_duo_model_final \
  --job_name alicia_duo_act_training_final \
  --policy.device cuda \
  --batch_size 32 \
  --steps 2000 \
  --save_freq 500 \
  --eval_freq 500 \
  --log_freq 100

โš ๏ธ Cloud-based dataset training may suffer from network delays. For large datasets, consider using FileZilla to upload local data directly to AutoDL.


๐Ÿ’พ Training from Local Dataset (uploaded via FileZilla)

python lerobot/scripts/train.py \
  --dataset.repo_id /root/lerobot/data/zhuiPick3 \
  --policy.type act \
  --output_dir outputs/train/act_alicia_duo_model_final \
  --job_name alicia_duo_act_training_final \
  --policy.device cuda \
  --batch_size 32 \
  --steps 2000 \
  --save_freq 500 \
  --eval_freq 500 \
  --log_freq 100

๐Ÿš€ Full-scale Training (successful)

python lerobot/scripts/train.py \
  --dataset.repo_id /root/lerobot/data/zhuiPick3 \
  --policy.type act \
  --output_dir outputs/train/act_alicia_duo_model_final \
  --job_name alicia_duo_act_training_final \
  --policy.device cuda \
  --batch_size 64 \
  --steps 20000 \
  --save_freq 1000 \
  --eval_freq 1000 \
  --log_freq 500

๐Ÿ“ค Model Export & Deployment

  • After training completes, use FileZilla to download the trained model directory to your local system.
  • Update the deployment script path:
# In dp_inference.py
ckpt_path = "/home/zexuan/Robot/xuanArm/system2/lerobot/outputs/train/filezilla/020000/pretrained_model"
  • Then run deployment:
cd examples/
python dp_inference.py


---

 ## ๐Ÿงช AutoDL Training Notes

About

Experiments & demos with LeRobot Aloha robot arm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published