In this lesson we will launch TurtleBot follower demo. We will launch two TurtleBots in Gazebo Concert, then you will drive the first TurtleBot and the second will follow it.
1. This lesson is a continuation of the previous lesson:
“Multiple TurtleBots in Concert”.
If you have not done instructions from
prerequisites section, you should do
2. We will use
2.1 Change directory.
2.2 Clone the
NOTE: We will use this repository until this pull request will be merged.
The original repository is https://github.com/turtlebot/turtlebot_apps.
2.3 Change directory.
2.4 Change git branch.
The opportunity to launch follower application in simulation was added in
3. Build package.
If you have an error then use
CATKIN_IGNORE for all packages except
If you run catkin_make, it will ignore any package in the directory with
Launching Turtlebot Follower
gamza1 will be controlled using joystick, TurtleBot named
gamza2 will follow
gamza1 in this example.
1. Launch Gazebo Concert (steps 1-10 from the previous lesson).
gamza1 in the resource list and capture it.
3. Open a new terminal and change the path.
4. Launch turtlebot_follower demo.
NOTE: __ns is a substitute for ROS_NAMESPACE. You can find more information on wiki ros.
5. To initiate following,
gamza1 has to be in front of
gamza1 using joystick to place it in front of
gamza2 tries to keep the center of the observed object
directly in front of itself and a fixed distance away.
gamza1 is very close to
gamza2 will go backward away. If
distance between them is increasing then
gamza2 will go forward after
to reduce the distance.
You should move
gamza1 slowly. If you move
gamza1 too quickly, then
will lose it and stop.
NOTE: Other objects could confuse the follower. You should avoid them.
6. Interrupt the processes. Close the windows.
You can watch these steps in the video:
You can find more information about turtlebot_follower package on wiki ros.