Teleoperation can be thought of as operating a machine at a distance, similar to the term “remote control”. Let’s look at what it takes to control a JetsonBot with a Bluetooth game controller. Looky here:
If you think back to the Gigantor example in the first part of this series, 12 year old Jimmie Sparks was able to control a 5 story tall, rocket powered robot with a small joystick controller that he held in his hands. This is quite an impressive feat. Unfortunately schematics for the device were not provided, so we’ll have to make a best effort to replicate the functionality.
Robot Operating System (ROS) provides several examples for teleoperation in the TurtleBot software stack. While the demonstration is for a Bluetooth game controller, analogous scripts exist for regular joystick and keyboard control from a remote computer. In our example, a Nyko game controller is being used. This was originally used with a Amazon Fire TV. However, a new controller is suggested for the Fire TV, the Amazon Fire Game Controller which may indicate that there is something mo’ better out there.
In either case, the idea is that it pairs with an Intel 7260 Wireless/BT NIC card installed on the Jetson TK1 of the JetsonBot over Bluetooth.
Note: Other game controllers, such as the XBOX 360 controller can be used with the Jetson TK1, but may require an extra adaptor as they are not Bluetooth.
Installation should be straightforward, pair the game controller with the Jetson TK1 that is going to go on the JetsonBot. Then launch the TurtleBot bring up script:
$ roslaunch turtlebot_bringup minimal.launch
either in a Terminal on the Jetson or remotely on the Jetson through a SSH connection as demonstrated in the video. This script launches ROS. Make sure that the Create 2 base is on before launching the script.
Next, turn on the game controller and in a separate Terminal on the JetsonBot launch the teleoperation node:
$ roslaunch turtlebot_teleop nyko_teleop.launch
Once everything is running you can control the JetsonBot with the left joystick on the game controller. There is what is called a ‘dead man switch’ which must be depressed in order for the left joystick to become active. The dead man switch is the ‘Y’ button on the game controller.
You may ask why is this interesting, you’ve seen many children’s toys that have remote controls associated with them.
Most devices that we think of as ‘remote controlled’ or ‘radio controlled’ have radio transmitters that the user communicates with radio receivers aboard the device. The signals transmitted usually directly control servos or other electro-mechanical devices on the device, sometimes with a small computer processor handling the communication.
In the case of the JetsonBot, the user is actually communicating with a ROS server (onboard the JetsonBot), which is then instructing the robot subsystems to carry out the desired commands. This seemingly small, but distinct, difference means that the communication is scalable. The user can control a JetsonBot or just as easily a 50 foot tall rocket powered robot using this scalable architecture. Computer folks call this concept ‘abstraction’, which most people see in use as the term Application Programming Interface (API). In other words, if you are writing a program which communicates through the API with ROS, you do not have to be concerned with the actual implementation details of talking to the motors, or speed controllers, or rockets. It just works transparently.
This also means that someone implementing different hardware/software interfaces from the other side of the interface have a known interface to work with. This ‘meet in the middle’ approach to interfacing can make everyones lives much easier because you don’t have to know the whole hardware/software stack of the entire system, only the subsystem that you’re working on and the specific part of the API that is being interfaced against. The API is designed so that a variety of subsystems can all work together through a known interface, which means that the system can have a large number of subsystems or a small number of them. This is just one of the cool things about ROS, the idea of scalability.