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.
- 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;
- Set your robot type(a1 or aliengo) as an environment variable: ROBOT_TYPE
export ROBOT_TYPE=a1
- Run the simulation:
roslaunch unitree_description empty_world.launch
- Load the controller:
roslaunch legged_controllers load_controller.launch
- You can start the controller using
rqt_controller_manager
sudo apt install ros-noetic-rqt-controller-manager
rosrun rqt_controller_manager rqt_controller_manager
-
Start the
legged_controller
orlegged_cheater_controller
, NOTE that you are not allowed to start thelegged_cheater_controller
in real hardware! -
Set the gait in the terminal of
load_controller.launch
, then use RViz and other tools to control the robot
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 |