Skip to content

Developing robot description model for Unitree Go2 robot configured with Champ Legged Robots Research Repository

Notifications You must be signed in to change notification settings

anujjain-dev/unitree-go2-ros2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unitree go2 ros2 - champ config

This package contains the configuration files for the Unitree Go2 robot configured with the CHAMP controller in ROS 2 (humble). It includes development of config package along with upgrade in robot description model for ROS 2 Humble distribution.

Unitree Go2:

Unitree Robotics is focusing on the R&D, production, and sales of consumer and industry-class high-performance general-purpose legged and humanoid robots, six-axis manipulators, and so on. We attaches great importance to independent research and development and technological innovation, fully self-researching key core robot components such as motors, reducers, controllers, LIDAR and high-performance perception and motion control algorithms, integrating the entire robotics industry chain.

CHAMP Controller:

champ

CHAMP is an open source development framework for building new quadrupedal robots and developing new control algorithms. The control framework is based on "Hierarchical controller for highly dynamic locomotion utilizing pattern modulation and impedance control : implementation on the MIT Cheetah robot".

Resources:

Tested on:

  • Ubuntu 22.04 (ROS2 Humble)

Current state of package:

  • ✓ Configure go2 robot with champ config
  • ✓ Robots Configurations.
    • ✓ Porting of robot description packages to ROS 2.
    • ✓ Porting of robot URDF to ROS2 (add new ros2_control tag).
    • ✓ Porting of robot configurationf to ROS2.
    • ✓ Porting of robot launch Files to ROS2.
  • ✓ Upgrade go2 description model for ros2 humble
  • ✓ Spawning go2 in gazebo environment.
  • ✓ Working rviz only demo.
  • ✓ Working Gazebo with teleoperated robot.
  • ✓ Adding IMU and 2D LiDAR.
  • ✓ Adding 3D LiDAR (Velodyne).
  • ✗ Working Gazebo demo with SLAM.
  • ✗ Working Gazebo demo with nav2 integration.

1. Installation

1.0 Install ROS-based dependencies:

sudo apt install ros-humble-gazebo-ros2-control
sudo apt install ros-humble-xacro
sudo apt install ros-humble-robot-localization
sudo apt install ros-humble-ros2-controllers
sudo apt install ros-humble-ros2-control
sudo apt install ros-humble-velodyne
sudo apt install ros-humble-velodyne-gazebo-plugins
sudo apt-get install ros-humble-velodyne-description

1.1 Clone and install all dependencies:

sudo apt install -y python3-rosdep
rosdep update

cd <your_ws>/src
git clone https://github.com/anujjain-dev/unitree-go2-ros2.git
cd <your_ws>
rosdep install --from-paths src --ignore-src -r -y

1.2 Build your workspace:

cd <your_ws>
colcon build
. <your_ws>/install/setup.bash

2. Quick Start

You don't need a physical robot to run the following demos. Make sure you have ros2_control, gazebo ros, controller manager packages installed in your ros2 setup.

2.1 Gazebo demo: Run the Gazebo environment

ros2 launch go2_config gazebo.launch.py

Go2 Gazebo Launch

2.2 Walking demo in RVIZ: Run the gazebo along with rviz

ros2 launch go2_config gazebo.launch.py rviz:=true

Go2 Gazebo RViz Launch

2.3 Run the teleop node:

ros2 run teleop_twist_keyboard teleop_twist_keyboard
go2_teleop.mp4

2.4 Go2 Velodyne Config Gazebo demo: Run the Gazebo environment

ros2 launch go2_config gazebo_velodyne.launch.py 

Go2 Velodyne Gazebo Launch

2.5 Go2 Veldyne Config Walking/PointCloud demo in RVIZ: Run the gazebo along with rviz

ros2 launch go2_config gazebo_velodyne.launch.py rviz:=true

Note: set point cloud topic to /velodyne_points

Go2 Velodyne Gazebo RViz Launch

2.6 Go2 Hokoyu 2D LiDAR Config Gazbeo demo: Run the Gazebo environment

NOTE: To use Laser instead of 3D Velodyne LiDAR, comment <xacro:include filename="$(find go2_description)/xacro/velodyne.xacro"/> and uncomment <xacro:include filename="$(find go2_description)/xacro/laser.xacro"/> in robot_VLP.xacro file located inside robots/description/go2_description/xacro/ folder.

ros2 launch go2_config gazebo_velodyne.launch.py 

To Run the gazebo along with rviz

ros2 launch go2_config gazebo_velodyne.launch.py rviz:=true

3. Tuning gait parameters

The gait configuration for your robot can be found in <my_robot_config>/gait/gait.yaml.

CHAMP Setup Assistant

  • Knee Orientation - How the knees should be bent. You can can configure the robot to follow the following orientation .>> .>< .<< .<> where dot is the front side of the robot.

  • Max Linear Velocity X (meters/second) - Robot's maximum forward/reverse speed.

  • Max Linear Velocity Y (meteres/second) - Robot's maximum speed when moving sideways.

  • Max Angular Velocity Z (radians/second)- Robot's maximum rotational speed.

  • Stance Duration (seconds)- How long should each leg spend on the ground while walking. You can set this to default(0.25) if you're not sure. The higher the stance duration the further the displacement is from the reference point.

  • Leg Swing Height (meters)- Trajectory height during swing phase.

  • Leg Stance Height (meters)- Trajectory depth during stance phase.

  • Robot Walking Height (meters) - Distance from hip to the ground while walking. Take note that setting this parameter too high can get your robot unstable.

  • CoM X Translation (meters) - You can use this parameter to move the reference point in the X axis. This is useful when you want to compensate for the weight if the center of mass is not in the middle of the robot (from front hip to rear hip). For instance, if you find that the robot is heavier at the back, you'll set a negative value to shift the reference point to the back.

  • Odometry Scaler - You can use this parameter as a multiplier to the calculated velocities for dead reckoning. This can be useful to compensate odometry errors on open-loop systems. Normally this value ranges from 1.0 to 1.20.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'feat: Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Acknowledgements

This project builds upon and incorporates work from the following projects:

  • Unitree Robotics - For the Go2 robot description (URDF model).
  • CHAMP - For the quadruped controller framework.
  • CHAMP Robots - For robot configurations and setup examples.

We are grateful to the developers and contributors of these projects for their valuable work.

About

Developing robot description model for Unitree Go2 robot configured with Champ Legged Robots Research Repository

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published