Leader-follower formation control using ROS+Gazebo.
This repository use 4 robots (turtlebot3) formation control. The main idea is: one turtlebot is leader, the remaining three turtlebots are follower. The followers use PID control algorithm to maintain the pose and distance with leader robot. More detail is on abc_swarm doc.
- Create a ROS workspace
$ mkdir <workspace_name>/src
$ cd <workspace_name>/src
- install dependencies and repository
$ git clone <dependency repository>.git
$ git clone [email protected]:khinggan/turtlebot3_formation.git
dependencies: turtlebot3_msg
, turtlebot3
, turtlebot3_simulation
, dynamic_reconfigure
.
- build
$ cd ../
$ catkin_make
$ source devel/setup.bash
- run
$ roslaunch turtlebot3_formation leader_follower.launch
- test (another terminal)
$ rostopic pub -r 10 /tb3_1/cmd_vel geometry_msgs/Twist "{linear: {x: 0.2, y: 0.0, z: 0.0}, angular: {x: 0.0,y: 0.0, z: 0.1}}"