This repository provides the necessary tools to create a controller package for the GO1 robot using ROS2 within the Gazebo simulation environment. It simplifies the process of integrating the GO1 robot into Gazebo and setting up ROS2 control, specifically using effort_controller
.
- Controller Package Creation: Easily create a controller package for the GO1 robot.
- Pre-configured Simulation and Control: Integration of the GO1 robot into Gazebo and the setup of ROS2 control are already completed.
- Custom Controller Development: Develop your own controllers in the
quadruped_controller
package. - Efficient Setup: Quickly set up the Gazebo world and ROS2 control in ROS2.
- go1_description: Contains URDF files for the GO1 robot. Replace these files with different URDFs to use other robots.
- go1_gazebo: Includes a config file with the ROS2 controller YAML file. Modify the PID and other settings in this file. Currently, it uses
effort_controllers/JointGroupEffortController
. - quadruped_controller: Write the controller for the robot here. You need to specify effort values for each joint.
self.joint_effort_publisher = self.create_publisher(Float64MultiArray, '/joint_effort_controller/commands', 10)
def publish_joint_effort(self):
msg = Float64MultiArray()
msg.data = [float(pos) for pos in self.torques[0]]
self.joint_effort_publisher.publish(msg)
Ensure you have ROS2 Humble installed and follow these steps:
git clone https://github.com/KimJiHong190/gazebo_quadruped.git
cd gazebo_quadruped
colcon build --symlink-install
source install/setup.bash
ros2 launch go1_gazebo go1_gazebo.launch.py
If you encounter any issues while using this package, please feel free to report them.