Skip to content

xie-design/legged_control

 
 

Repository files navigation

legged_control

I haven't had time to write the documentation yet. But I tried my best to keep the whole testing process as simple as possible. And did not change the code of ocs2 itself.

Build

  • ocs2 is a huge monorepo, you just need to compile ocs2_legged_robot_ros and its dependencies!
  • If you only run simulation, you do not need to compile unitree_hw;

Quick Start

  1. Set your robot type(a1 or aliengo) as an environment variable: ROBOT_TYPE
export ROBOT_TYPE=a1
  1. Run the simulation:
roslaunch unitree_description empty_world.launch
  1. Load the controller:
roslaunch legged_controllers load_controller.launch
  1. You can start the controller using rqt_controller_manager
sudo apt install ros-noetic-rqt-controller-manager
rosrun rqt_controller_manager rqt_controller_manager
  1. Start the legged_controller or legged_cheater_controller, NOTE that you are not allowed to start the legged_cheater_controller in real hardware!

  2. Set the gait in the terminal of load_controller.launch, then use RViz and other tools to control the robot

ezgif-5-684a1e1e23.gif

Statistics

The table below shown lab succefully deploy this repo in their real A1 | Lab | Spend Time | | ---- | ---- | | XPeng Robotics | 1 day | | Unitree | - | | Geely Auto | 3 hours | | Hybrid Robotics | 2 hours |

About

Nonlinear MPC and WBC for legged robot based on OCS2 and ros-controls

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 89.5%
  • CMake 10.5%