- qpOASES
- ocs2_ros2
- mujoco
git clone https://github.com/coin-or/qpOASES.git
mkdir build
cd build
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..
make
sudo make install
option -DCMAKE_POSITION_INDEPENDENT_CODE=ON
is necessary. If you already installed qpOASES without this option, you need to reinstall it
mujoco should be installed by building from source.
- Clone the mujoco repository:
git clone https://github.com/deepmind/mujoco.git
- Cd in mujoco path, reate a new build directory and cd into it:
cd mujoco
mkdir build && cd build
- Configure the build, build and install
cmake ..
make
sudo make install
- Clone repository:
mkdir -p mujoco_ocs2_ros2_ws/src
cd src
git clone https://github.com/Zionshang/mujoco_ocs2_quadruped_controller.git
- Cd in ros workspace and build
cd mujoco_ocs2_ros2_ws
colcon build
- Open a terminal to launch the mujoco emulator
ros2 launch mujoco_simulator mujoco.launch.py
- Open a terminal to run controller
ros2 launch ocs2_quadruped_controller controller.launch.py
- Enter the control command in the terminal that receives the keyboard command
r,f : control body height
1 : stance gait
2 : trot gait
3 : walk trot gait
4 : fly trot gait
w,a,b,d : linear velocity control
j,l : yaw velocity control