Tested on Ubuntu 22.04 ROS2 Humble.
- C++ compiler with C++17 support
- Eigen (v3.4)
- Boost C++ (v1.74)
- pinocchio (up-to-date)
The OCS2 library is written in C++17. It is tested under Ubuntu with library versions as provided in the package sources.
- Eigen
sudo apt update
sudo apt install libeigen3-dev
sudo ln -s /usr/local/include/eigen3 /usr/include/eigen3
sudo ln -s /usr/local/include/eigen3/Eigen/ /usr/local/include/Eigen
- Pinocchio
- Create a new workspace or clone the project to your workspace
cd ~
mkdir -p ocs2_ros2_ws/src
- Clone the repository
cd ~/ocs2_ws/src
git clone https://github.com/Zionshang/ocs2_ros2.git
- build
cd ~/ocs2_ws
colcon build
- Run the legged robot example
source ~/ocs2_ws/install/setup.bash
ros2 launch ocs2_legged_robot_ros legged_robot_ddp.launch.py