Install Environment

From Waveshare Wiki
Jump to: navigation, search
RoArm-M3-AI-Kit
RoArm-M3

UART
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

LeRobot Tutorial Catalog

1. Install Environment

1.1 LeRobot Introduction

LeRobot: Advanced AI for practical robotics technology

900px-Lerobot-logo.png

LeRobot aims to provide models, datasets, and tools for real robot technology in PyTorch. The goal is to lower the barrier to entry for robot technology so that everyone can benefit from shared datasets and pre-trained models.
LeRobot includes state-of-the-art methods that have been proven to transfer to the real world, with a focus on imitation learning and reinforcement learning.
LeRobot has already provided a set of pre-trained models, a dataset with manually collected demonstrations, and a simulation environment, allowing users to get started without assembling a robot.
LeRobot hosts pre-trained models and data sets on this Hugging Face community page:huggingface.co/lerobot

1.2 Virtual Machine Image Installation

  • Applicable to those who purchase the RoArm-M3-S-AI-Kit or RoArm-M3-Pro-AI-Kit and run the virtual machine on a Windows PC and use the CPU for inference.

1.2.1 Download Ubuntu Image with LeRobot Environment Configured

Using the Ubuntu 22.04 image RoArm-M3-AI-Kit that we have configured the LeRobot environment, you don't need to install and configure the environment by yourself, and you can directly control it by connecting the robotic arm according to the subsequent tutorials.

Download and decompress the image, all files are image files. The disk file system of some virtual machines does not support separate files above 4G, so the configured Ubuntu image is divided into multiple files.

1.2.2 Install Oracle VM VirtualBox Virtual Machine

Download and install Oracle VM VirtualBox, which is a free virtual machine software that allows you to run a virtual operating system on your own computer. We run the virtual machine on a Windows system computer to install the Ubuntu operating system, and then install and configure LeRobot on the Ubuntu operating system to control the robotic arm.

The process is simple and you just need to click Next during the installation If it is already installed, skip this step.

1.2.3 Load Image to Virtual Machine

  1. On the left toolbar, click New.
  2. Ros镜像安装-水印.png

  3. Set the name, set the type to Linux, and set the version to Ubuntu (64-bit), click Next.
  4. Ros镜像安装2-水印.png

  5. The memory size and number of processors can be set by yourself. Here are the default settings, then click Next.
  6. Ros镜像安装3-水印.png

  7. Select Do not add a virtual hard disk click Next to display the configuration of the new virtual computer, click Finish and a warning will pop up, then click Continue.
  8. Ros镜像安装4-水印1.png
    Ros镜像安装5-水印1.png

  9. Select the virtual machine you just created and select Settings.
  10. Ros镜像安装6-水印.png

  11. Select Storage and click the + sign on the far right of the controller to add a virtual hard disk.
  12. Ros镜像安装7-水印1.png

  13. Select Register, add the lerobot_cpu.vmdk image file decompressed earlier and click Select in the lower right corner, and confirm to save. Double-click the virtual computer you just created on the left to run it.
  14. Ros镜像安装8-水印1.png
    900px-Lerobot-virtualbox-setup.png

1.3 Jetson Orin Jetson Orin Series Image Installation

  • Applicable to those who have RoArm-M3-S-AI-Kit or RoArm-M3-Pro-AI-Kit kit and run Docker containers using GPU for inference on the Jetson Orin series (with 8G VRAM).
  • Applicable to those who have RoArm-M3-S-ORIN-NANO-AI-Kit, RoArm-M3-Pro-ORIN-NANO-AI-Kit, RoArm-M3-S-ORIN-NX-AI-Kit, or RoArm-M3-Pro-ORIN-NX-AI-Kit.
  • Note: If you purchased the RoArm-M3-S-ORIN-NANO-AI-Kit, RoArm-M3-Pro-ORIN-NANO-AI-Kit, RoArm-M3-S-ORIN-NX-AI-Kit, or RoArm-M3-Pro-ORIN-NX-AI-Kit kit series, you will get a hard drive that has already been flashed the image, and you can skip this step directly.

Using the Ubuntu 22.04 image RoArm-M3-ORIN-AI-Kit that we have configured the LeRobot environment, you don't need to install and configure the environment by yourself, and you can directly control it by connecting the robotic arm according to the subsequent tutorials.

Remove the hard drive from the Jetson Orin product. Download the image to be flashed onto the hard drive on a PC. Flash our system image, which is configured with the software, onto the hard drive.

1.4 MobaXterm Software Configuration

1.4.1 Basic Kit

  • Applicable to those who purchase the RoArm-M3-S-AI-Kit or RoArm-M3-Pro-AI-Kit and run the virtual machine on a Windows PC and use the CPU for inference.

You need to open the virtual machine first, go to the directory, and add executable permissions to the lerobot_remote.sh file:

cd /home/ws && sudo chmod +x lerobot_remote.sh

Execute the script file lerobot_remote.sh to start the Docker remote service:

./lerobot_remote.sh

After the Docker container has successfully started the SSH service, use MobaXterm to remotely log in to the Docker container.

Click Session → SSH, the host IP is the Docker container IP, enter the IP address you want to remote into in the Remote host field, the Port is the assigned port 23, and finally click OK.

900px-Lerobot-remotessh-2.png

After the connection is established, enter the username: root and password: ws. Note: It is normal for the screen to remain unchanged when entering the password, press enter to access the Docker container after the password is entered. The SSH remote connection to the Docker container has been successful since then.

1.4.2 Jetson Orin Kit

  • Applicable to those who purchase RoArm-M3-S-ORIN-NANO-AI-Kit, RoArm-M3-Pro-ORIN-NANO-AI-Kit, RoArm-M3-S-ORIN-NX-AI-Kit, and RoArm-M3-Pro-ORIN-NX-AI-Kit.

When configuring WIFI for the first time, you need to prepare a network cable or USB cable, and you also need to prepare a computer when using a USB cable.

  • Jetson's Type-C port has a default IP address of 192.168.55.1. Users who do not have a screen can connect this Type-C port to a computer and use the MobaXterm software SSH 192.168.55.1 IP address for remote login to Jetson and operations. Connect to the new Wi-Fi:

After the connection is established, enter the username: jetson and password: jetson. Note: It is normal for the screen to remain unchanged when entering the password, press Enter to access the host after the password is entered.

Make sure WiFi is turned on:

sudo nmcli r wifi on

List the surrounding known WIFI networks:

sudo nmcli d wifi list

Connect to a known WIFI:

sudo nmcli d wifi connect <my_wifi_ssid> password <my_wifi_password>

You need to replace the above <my_wifi_ssid> and <my_wifi_password> with your own hotspot name and password according to your situation, for example: sudo nmcli d wifi connect wifi_name password 1234567890

After connecting to the new WiFi, get the IP address of Jetson:

ifconfig

That is, the "inet" displayed in "wlP1p1s0":

Lerobot-remotessh-jetson-ip.png

After obtaining Jetson's IP address, remotely connect to the host machine

900px-Lerobot-remotessh-1.png

Go to the directory, and add executable permissions to the lerobot_remote.sh file:

cd /home/jetson && sudo chmod +x lerobot_remote.sh

Execute the script file lerobot_remote.sh to start the Docker remote service:

./lerobot_remote.sh

After the Docker container has successfully started the SSH service, use MobaXterm to remotely log in to the Docker container.

Click Session → SSH, the host IP is the Docker container IP, enter the IP address you want to remote into in the Remote host field, the Port is the assigned port 23, and finally click OK.

900px-Lerobot-remotessh-2.png

After the connection is established, enter the username: root and password: jetson. Note: It is normal for the screen to remain unchanged when entering the password, press enter to access the Docker container after the password is entered. The SSH remote connection to the Docker container has been successful since then.