Skip to content

R1 Teleop ROS2 Usage Tutorial

Download ROS2 SDK and use Unbuntu 22.04 Host system, then proceed to the following processes.

1. Software Preparation

1.1 Install Software Dependencies

Please install the required software dependencies on the R1 Pro-T host computer.

sudo apt install tmuxp
sudo apt install tmux

1.2 Multi-device Communication Configuration

Note: When R1Pro and R1Pro-T are on the same gateway, separately modify the ~/.bashrc file of the host computer environment of R1 Pro and R1 Pro-T.

  1. Add the following command to the end of the ~/.bashrc file on the R1 Pro ECU:

    export ROS_DOMAIN_ID=79
    

  2. Add the following command to the end of the /.bashrc file on the R1 Pro-T host computer:

    export ROS_DOMAIN_ID=79
    

  3. Example:

    When the host computers of R1 Pro and R1 Pro-T are both on the same gateway, separately modify the ~/.bashrc for both.

    R1Pro-T_2.1

2. R1 Pro Teleop Connection

2.1 Securing the Device

Use the M6x16 screws and G-clips to secure the R1 Pro-T Base to the desktop, as shown in the diagram below:

R1Pro-T_2.1_base_mount

2.2 Connecting the Device

Following the hardware connection architecture diagram:

R1Pro-T_2.2_conection

  1. Connect one end of the 2-pin plug to the port on R1 Pro-T Box and the other end to the XT60-F port on the power adapter.
  2. Connect one end of the 4-pin plug to the port on R1 Pro-T Box and the other end to the XT30(2+2)-F port to the motor on the torso of R1 Pro-T.
  3. Connect one end of the blue USB-CAN adaptor cable to R1 Pro-T Box and the other end to the USB port on the host computer.

Note: After completing the connections, do not power on immediately. Please follow the steps below to proceed.

2.3 Powering On

After securing the R1 Pro-T Base to the desktop, place the arms and torso in the initial position as shown in the diagram below. Ensure that the J5, J6, and J7 joints of both arms, as well as the R1 Pro-T Base, are at zero-point (initial posture), then you may insert the power unit into the power outlet and press the power button on the R1 Pro-T Box to turn it on.

R1Pro-T_2.3_initial_position

Note: Before starting the R1 Pro-T every time, make sure to adjust to its initial posture. Failing to do so may pose a risk during operation.

2.4 Connect Bluetooth Remote Controller

Please be sure to connect two arms to the R1 Pro-T host conputer in sequence, ensuring that the left arm is connected first, followed by the right arm. Due to program settings, to streamline the operation process, if the controller connection sequence is incorrect, please turn off the power and power it on again, then follow the correct sequence for connection..

2.4.1 Bluetooth Controller

R1Pro-T_2.4.1_controller

2.4.2 Connection Steps

  1. Press the power switch to turn on the handle Bluetooth.
  2. Turn on the host computer's Bluetooth and connect to the two devices named HID.
  3. After connection, "Device Connected" will be displayed. Enter the following command to check whether the connection is successful:

    ls /dev/input/ | grep js
    

    When bothjs0 (left arm) and js1 (right arm) are returned simultaneously, the connection is successful. R1Pro-T_2.4.2_grep_js

3. Launch SDK

3.1 Start R1

Use the following script to launch R1 Pro with one click:

cd ${SDK_path}/install/startup_config/share/startup_config/script/
./robot_startup.sh boot ../sessions.d/ATCStandard/R1PROIsomorphicTeleop.d/

This script will launch the HDAS (communication protocol node), Mobiman (motion control nodes for dual arms, torso, chassis, grippers, etc.), sensors (cameras, radar), and data collection nodes (data_collection).

R1Pro-T_3.1_r1prosdk

3.2 Start R1 Pro-T SDK

Note: This step must be performed on the R1 Pro-T host computer.

  1. Start TMUX.
    tmux
    
  2. Start FDCAN Communication
    sudo ip link set dev can0 type can bitrate 1000000 dbitrate 5000000 fd on
    sudo ip link set up can0
    
  3. Use the quick start script to launch all nodes on the R1 Pro-T host computer.
    cd ${R1Pro-T_SDK_path}/install
    source setup.bash
    roslaunch mobiman r1_pro_teleoperation.launch
    

After completing the above steps, wait 3-5 seconds and you will be able to control R1 Pro-T.

4. Data Collection Process

4.1 Introduction to Data Format

The file format for data acquisition is rosbag,and the file suffix is *.bag.

4.2 Data Acquisition

Default storage path:/home/nvidia/GalaxeaDataset/{date}/.

4.3 Data Write-to-Disk Files

The data is saved in rosbag + json format, and each file corresponds to one another. For example:

# For example, the two files below represent a data bag.

S2R12000P18245_20240213173320125_RAW.bag
S2R12000P18245_20240213173320125_RAW.json

# The format is "robot_serial_number + timestamp + RAW"
# robot_serial_number:the serial number of robot which is located in the path "/opt/galaxea/body/RSN". The robot is pre-configured;if not, contact technical support.
# timestamp:The timestamp of data collection in ms.
# RAW: the raw data.

4.4 Start Recording

Perform data recording operation through the left controller:

Function Operation Description
Start recording Click button C on the left controller Start data recording.
Stop recording Click button D on the left controller Stop data recording.
Delete the current recording Click button C on the left controller If a recording is already in progress, click button C again will stop and delete the current recording (leave at least 5sec gap), and it will not be written to disk.

If you encounter any issues during installation or startup, please contact us at support@galaxea.ai or call 4008 780 980 for technical support !