This repository contains ROS 2 packages for simulating and controlling a quadruped robot, including inverse kinematics, trajectory generation, and hardware integration.
| Branch | Description |
|---|---|
main |
Simulation of a single leg of the quadruped robot. |
full_quad |
Complete simulation of the full quadruped robot. |
quad_hardware |
Hardware integration of the quadruped robot using ros2_control on devices like Jetson Nano or Raspberry Pi. |
- quad_description – URDF, Gazebo, and RViz setup for the robot.
- ik – C++ implementation of analytical inverse kinematics for a leg.
cd ~/ros2_ws/src
git clone https://github.com/DJIITBH/Quadruped_ROS2.git
cd ~/ros2_ws
colcon build --packages-select quad_description ik
source install/setup.bashfor main branch :
# Launch Gazebo and ros2_control for single leg
ros2 launch quadruped_description gazebo.launch.py
# Run custom IK service
ros2 run ik ik
# Run trajectory planning and execution
ros2 run quadruped_description traj_bezier
# Visualize in RViz with joint GUI
ros2 launch quadruped_description display.launch.pyFor full_quad branch :
git checkout full_quad
colcon build
source install/setup.bashros2 launch quadruped_description gazebo.launch.py
ros2 run ik ik
ros2 run quadruped_description traj_bezier
ros2 launch quadruped_description display.launch.py🤖 Hardware Integration (quad_hardware branch) This branch deploys the robot on actual hardware (e.g., Jetson Nano, Raspberry Pi).
# Launch hardware interface (simulation time disabled)
ros2 launch quadruped_description hardware.launch.py
# Run trajectory planning and execution
ros2 run quadruped_description traj_bezier
# Launch LiDAR data publisher
ros2 launch sllidar_ros2 view_sllidar_a1_launch.py
# Launch joystick control
ros2 launch quadruped_description joystick.launch.pyWatch the robot in action:
YouTube: Quadruped ROS2
The analytical inverse‐kinematics derivation and controller design are detailed here:
Drive – Full Paper PDF