OCS2_ROS2 is developed based on OCS2, it was refactored to be compatible with ROS2 and modern cmake. Below is the current todolist of the project:
- modern cmake
- basic 6 examples in official documents
- WSL2 support
- Fix Quadrotor example's unexpected behavior
- Fix Mobile Manipolator's interactive marker
- perceptive locomotion demo
- tinyxml2 problem in Ubuntu 24.04 ROS2 Jazzy
- raisim demo
- mpc_net demo
The IDE I used is CLion, you can follow the guide to set up the IDE.
Below is my tested platform:
- Intel Nuc X15 (i7-11800H):
- Ubuntu 22.04 ROS2 Humble (WSL2)
- Ubuntu 24.04 ROS2 Jazzy
- Lenovo P16v (i7-13800H):
- Ubuntu 24.04 ROS2 Jazzy
- Jetson Orin Nano
- Ubuntu 22.04 ROS2 Humble (JetPack 6.1)
The OCS2 library is written in C++17. It is tested under Ubuntu with library versions as provided in the package sources.
Tested system and ROS2 version:
- Ubuntu 24.04 ROS2 Jazzy
- Ubuntu 22.04 ROS2 Humble
- C++ compiler with C++17 support
- Eigen (v3.4)
- Boost C++ (v1.74)
- Create a new workspace or clone the project to your workspace
cd ~
mkdir -p ocs2_ws/src
- Clone the repository
cd ~/ocs2_ws/src
git clone https://github.com/legubiao/ocs2_ros2
git submodule update --init --recursive
- rosdep
cd ~/ocs2_ws
rosdep install --from-paths src --ignore-src -r -y
2.4 Basic Examples
Quick start guide:
- Compile legged robot example
cd ~/ocs2_ws colcon build --packages-up-to ocs2_legged_robot_ros
- Run the legged robot example
source ~/ocs2_ws/install/setup.bash ros2 launch ocs2_legged_robot_ros legged_robot_ddp.launch.py