Skip to content

A repository of ROS 2 packages for simulation of the Unitree Go1 legged robot in Gazebo.

Notifications You must be signed in to change notification settings

Atharva-05/unitree_ros2_sim

Repository files navigation

Unitree GO1 Simulation with ROS 2

This repository contains a simulation environment for the Unitree GO1 robot in Gazebo 11 and ROS 2, along with an interface for navigation. The functionality has been tested with ROS Humble on Ubuntu 22.04

Dependencies:

Structure

The repository contains the following ROS 2 packages:

  • go1_sim:

    • go1_description: Contains required xacro and config files to load the robot in simulation. Modified from here.
    • go1_gazebo: Contains the gazebo world and required launch files to initialize the simulation.
    • go1_navigation: Contains scripts, launch and configuration files for interfacing with a navigation stack.
  • ros2_unitree_legged_controller: Contains the implementation of unitree's control plugin in ROS 2. This has been ported from the ROS 1 plugin available here.

  • ros2_unitree_legged_msgs: Contains unitree custom messages for interfacing, source here.

  • unitree_guide2: Provides an interface between the navigation and control framework along with a state machine for different control modes. This has been ported to ROS 2 from here.

Testing

After placing all the packages in a ROS 2 workspace and building it successfully, run the following in order:

  1. (window 1) ros2 launch go1_gazebo spawn_go1.launch.py: This will load the simulation and initialize controllers.

  2. (window 2) ros2 run unitree_guide2 junior_ctrl: This activates the interface and state machine. Run this once the last controller plugin (RL_calf_controller) has loaded successfully

    1. Press 2 to switch the robot to standing mode (fixed_stand)
    2. Press 5 to switch to move_base mode (robot accepts velocity commands in this mode)

Interface

Subscribed topics

Velocity control interface: The robot simulation is configured to navigate as per velocity commands received on the interface topic.

Published topics

Odometry data: Odometry data from the ground truth plugin

2D LiDAR data: 2D lidar data from the gazebo sensor plugin

Transforms: Transforms odom -> base_link and base_link -> base_footprint are provided

About

A repository of ROS 2 packages for simulation of the Unitree Go1 legged robot in Gazebo.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published