Skip to content

Latest commit

 

History

History
124 lines (81 loc) · 2.56 KB

File metadata and controls

124 lines (81 loc) · 2.56 KB

Unitree G1 Setup Guide

This guide provides detailed instructions for setting up and using the OM1 ROS2 SDK with the Unitree G1 robot.

Hardware Setup

[To be added: Hardware setup instructions specific to G1]

Installation

1. Clone the repository

cd ~/ros2_ws/src
git clone https://github.com/OpenMind/OM1-ros2-sdk.git

2. Install dependencies

cd ~/ros2_ws
rosdep install --from-paths . --ignore-src -r -y

3. Install Python dependencies

pip install -r requirements.txt

4. Build the packages

colcon build --packages-select unitree_api unitree_hg g1_sdk

5. Source the workspace

source install/setup.bash

6. Set up RPLiDAR permissions

# Option 1: Temporary permission (needs to be run each time)
sudo chmod 777 /dev/ttyUSB0

# Option 2: Add user to dialout group (permanent, requires logout/login)
sudo usermod -a -G dialout $USER

# Option 3: Create udev rule (permanent)
echo 'KERNEL=="ttyUSB*", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", GROUP="dialout", MODE="0666"' | sudo tee /etc/udev/rules.d/99-rplidar.rules
sudo udevadm control --reload-rules && sudo udevadm trigger

Usage

Launch SLAM System

To start the complete SLAM system:

ros2 launch g1_sdk slam_launch.py

Once you have done the mapping, you can save the map through the RViz2 interface by clicking on the Save Map button and the Serialize Map button in the SlamToolboxPlugin panel.

Launch Navigation System

To start the navigation system with SLAM:

ros2 launch g1_sdk nav2_launch.py map_yaml_file:=<path_to_your_map_yaml_file>

Launch the Sensor System

[To be added: Sensor launch instructions for G1]

Control the Robot

[To be added: G1-specific control instructions]

Visualize in RViz

Launch RViz with the provided configuration:

rviz2 -d config/rviz.rviz

Troubleshooting

[To be added: G1-specific troubleshooting tips]

RPLiDAR Connection Issues

  1. Check USB connection:
ls -la /dev/ttyUSB*
  1. Verify permissions:
sudo chmod 777 /dev/ttyUSB0
  1. Add user to dialout group:
sudo usermod -a -G dialout $USER

SLAM Performance Issues

  • Reduce scan_buffer_size if experiencing dropped messages
  • Adjust correlation_search_space_dimension for better loop closure
  • Modify loop_search_maximum_distance based on environment size

Transform Issues

  • Ensure all required transforms are being published
  • Check TF tree with: ros2 run tf2_tools view_frames
  • Verify timing with: ros2 topic echo /tf