Note: This tutorial assumes that you have completed the previous tutorials: TurtleBot Bringup, PC Bringup. |
Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
The TurtleBot Follower Demo
Description: This describes how to run the TurtleBot Follower Demo on your TurtleBot.Tutorial Level: BEGINNER
Next Tutorial: Turtlebot Panorama
Follower Demo
The follower demo will cause the TurtleBot to look for objects in a window in front of it. And it will seek to keep the centroid of the observed objects directly in front of it and a fixed distance away. If the centroid of the object is too far away it will drive forward, too close backward, and if offset to the side it will turn toward the centroid.
Start Demo
Start by ssh-ing (ssh help) into the TurtleBot and start the follower demo:
To ssh in to a TurtleBot from a workstation computer:
determine the IP_OF_TURTLEBOT by using ifconfig (Need more help)
To determine a computer's IP address and network interface in linux:
ifconfig
You will see something like:
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:6658055 errors:0 dropped:0 overruns:0 frame:0 TX packets:6658055 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:587372914 (587.3 MB) TX bytes:587372914 (587.3 MB) wlan1 Link encap:Ethernet HWaddr 48:5d:60:75:58:90 inet addr:10.0.129.17 Bcast:10.0.129.255 Mask:255.255.254.0 inet6 addr: fe80::4a5d:60ff:fe75:5890/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:101983 errors:0 dropped:0 overruns:0 frame:0 TX packets:37244 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:49326141 (49.3 MB) TX bytes:7588044 (7.5 MB)
the network interface for the wireless card is wlan1
the IP address of the computer is 10.0.129.17
use ssh to connect to the TurtleBot
ssh turtlebot@IP_OF_TURTLEBOT
roslaunch turtlebot_follower follower.launch
Changing Follower Parameters
- Run the dynamic reconfigure gui on your workstation computer.
# pre-groovy rosrun dynamic_reconfigure reconfigure_gui # groovy or later rosrun rqt_reconfigure rqt_reconfigure
- Select camera/follower on the reconfigure gui
Play with the parameters using the sliders; you will see the TurtleBot's following behavior change as you move the sliders.
Android client
As you will learn in the Turtlebot-Android Pairing, you can also launch the follower demo and start/stop following behavior from your Android device. Exciting? then move on!
What Next?
Panorama demo, that shows you how to take panoramic pictures with your TurtleBot or return to TurtleBot main page.