Note: This tutorial assumes that you have completed the previous tutorials: TurtleBot Bringup.

TurtleBot Teleoperation

Description: How to teleoperate your TurtleBot with a keyboard, joystick, or rviz.

Tutorial Level: BEGINNER

Next Tutorial: TurtleBot Odometry and Gyro Calibration

This assumes that you have a TurtleBot which has already been brought up in this tutorial. See TurtleBot Bringup if you have not brought up the TurtleBot.

Show Keyboard Instructions     Show Joystick Instructions     Show Rviz Instructions    

Joystick

This assumes you are using a Logitech Wireless Rumblepad 2 plugged into the robot. These example nodes are simple and depending on your joystick you may just need to remap the keys. Show other Joystick Tutorials   

  1. TurtleBot Teleoperation

    How to teleoperate your TurtleBot with a keyboard, joystick, or rviz.

  2. How to Use a SpaceNavigator with the spacenav_node

    This tutorial is an introduction to using the 3DConnexion SpaceNavigator connected to a desktop. After reading this, you should be able to bring up the spacenav_node and display the data.

  3. Writing a Teleoperation Node for the SpaceNavigator

    This tutorial covers how to write a teleoperation node and use it to drive the turtle in the turtlesim.

  4. How to Pair the PS3 Joystick with a Bluetooth Dongle

    This tutorial is an introduction to using the PS3 DualShock 3 Joystick connected via bluetooth to a desktop computer. After reading it, you should be able to bring up the ps3joy node and display the data coming from the joystick.

  5. Writing a Teleoperation Node for the PS3 Joystick

    This tutorial covers how to write a teleoperation node and use it to drive the turtle in the turtlesim.

  6. Configuring and Using a Linux-Supported Joystick with ROS

    This tutorial is an introduction to using the joystick connected to a desktop computer. After reading it, you should be able to bring up the joy node and display the data coming from the joystick over ROS.

  7. Writing a Teleoperation Node for a Linux-Supported Joystick

    This tutorial covers how to write a teleoperation node and use it to drive the turtle in the turtlesim.

  8. Writing a Teleoperation Node for the Wiimote

    This tutorial covers how to write a teleoperation node and use it to drive the turtle in the turtlesim.

  9. How to Recharge the PS3 Joystick

    This tutorial explains how to recharge the PS3 DUALSHOCK 3 or SIXAXIS Joystick. The tutorial includes details on how to simultaneously use the joystick over Bluetooth and recharge it.

  10. Connecting the PS3 Joystick to the PR2

    This tutorial is an introduction to using the PS3 DualShock 3 Joystick connected via bluetooth to a PR2.

  11. How to Write a Generic Teleoperation Node

    This tutorial goes over generic teleoperation code that is used as an example in many of the teleoperation tutorials.

On the TurtleBot

Now ssh (ssh help) into the TurtleBot and start the joystick and teleop nodes

  • 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_teleop joystick_teleop.launch

Note: You will need to use the D pad while pressing and holding the Left Trigger button(5) to control the turtlebot using the Logitech Wireless Rumblepad 2.

Keyboard Teleop

On the TurtleBot

Now ssh (ssh help) into the turtlebot and start the keyboard teleop nodes

  • 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_teleop keyboard_teleop.launch

Key presses in this terminal can now be used to control the robot.

Note: If a new command has not been recieved recently enough the robot will stop. Depending on the keyboard repeated key press speed, holding a button down may be jerky because of this. If this is the case you can either increase the key repeat speed or the timeout.

Rviz Teleop (Interactive Markers)

TurtleBot interactive markers are an alternative way to control your TurtleBot. They allow you to teleoperate the robot from rviz.

Running the Marker Server

Do these steps on the PC, not the TurtleBot for best performance. First, make sure the package has been made:

rosmake turtlebot_interactive_markers

Then launch the turtlebot_marker_server, which will host an interactive_markers server.

rosrun turtlebot_interactive_markers turtlebot_marker_server

Running rviz

Next, start up a copy of rviz displaying the marker topics. On the PC, type:

rosrun rviz rviz -d `rospack find turtlebot_interactive_markers`/config/interactive_markers.vcg

Interact!

Select the "Interact" tool in the tool palette on the top of the screen (shown below) to bring up the interactive markers for the turtlebot.

turtlebot_interactive_rviz.jpg

You can now drag the red arrows to drive the TurtleBot forward and backward, and the green circle to rotate the TurtleBot. You can also drag the green circle to both rotate and translate the TurtleBot at the same time.

Video

Wiki: turtlebot_teleop/Tutorials/Teleoperation (last edited 2011-11-11 00:36:47 by MeloneeWise)