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:
mon launch 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
- After start the controller, you can command the robot by two terminal created by step 3.