Saturday, April 19, 2014

Using the Tele NP Hangout with the Turtlebot


Appendix C:

Using the Tele NP Hangout with the Turtlebot

This section is meant to describe the actual operation of the robot with the Hangout extension. We start by describing the startup procedure. Then we give tips for actually using the extension html interface. As before we outline the information that we are about to present.

  1. Start The Robot and Launch the ROS Package (and Google Chrome)
  2. Start The Controlling Computer (and Google Chrome)
  3. Launch Google Hangouts and The Hangout Extension on Both Computers
  4. Establish for the Hangout Extensions which computer is the Turtlebot
  5. Test Teleop
  6. Start Gmapping
  7. Save Map
  8. Start Navigation (Load A Map)
  9. Tell the Navigation Software Where the Turtlebot Is
  10. Tell the Navigation Software Where the Desired Goal Is
  11. Specify Additional Goals

Though there are several parts to the Hangout Extension and they do not all look the same, the entire Extension is confined to a band along the right side of the Hangout screen. On the central portion of the screen is the video from the robot. Along the top of that gray band on the right is a set of three tabs. The tabs are 'controls' , 'setup', and 'map'. You will be presented with the 'controls' tab first.

  1. Start The Robot and Launch the ROS Package (and Google Chrome)
    Plug the kinect device in to the Turtlebot's laptop computer. Remember that the kinect must be plugged into the adapter which itself plugs in to the Turtlebot for power and the laptop for data. Plug the Turtlebot itself into the laptop via the USB cable. Turn on the Turtlebot and the laptop, and make sure you are booting into the Ubuntu 12.04 LTS/ROS partition. The password for the laptop is usually 'turtlebot'. When the Turtlebot is on there will be a bright green light on its control panel. Check network connectivity on the laptop. You need access to the internet in general. 
     
    On the turtlebot computer start the Google Chrome Browser. Also start a terminal window. Type the following in the terminal window:
     
    $ roslaunch tele_presence app_manager.launch

  2. Start The Controlling Computer (and Google Chrome)
    Start the computer that you want to use as the controller. Your computer must have Google Chrome and Google Hangouts installed. Start Google Chrome at this time.

  3. Launch Google Hangouts and The Hangout Extension on Both Computers
    At this time you need to use the credentials that you set up for the tele presence robot. The two users that you choose to use at this time must be established as developers for the App Engine project. For the turtlebot computer log in with one user, and for the controller computer log in with the other user. Start Hangouts and the TeleNP extension on both computers. The TeleNP extension can be found in the left bar that shows up on Hangouts when you hover over that area with the mouse. You may have to choose the 'more extensions' button and then go to the 'developers' section to find your own project. You should then see the video connection between the computers now easily.

  4. Establish for the Hangout Extensions which computer is the Turtlebot
    On the screen of the laptop connected to the Tutlebot you should see the direction buttons for the extension, and also some options. One of the options, under the heading 'Start' is a checkbox that is labled 'Turtlebot Node'. On the Turtlebot laptop, click the 'Turtlebot Node' checkbox. The screen on both computers should change slightly. The direction pad will disappear from the screen on the Turtlebot Computer. At the same time the 'Turtlebot Node' checkbox will disappear from the controller computer's screen. You should hear a series of tones from the Turtlebot itself. There will be a checkbox on the controller computer's screen that says 'Controller Node'. On the controller computer, click this checkbox. 
     
  5. Test Teleop
    On the controller computer, click the arrow pictures on the screen. The turtlebot should move.

  6. Start Gmapping
    On the controller computer, click on the tab marked 'MAP'. You will see a panel of buttons arranged vertically. The top option, under the heading 'Do This:' will be the 'Make Test Map' button. Click this button. The sidebar will change to the 'Make Test Map' screen. There are two main buttons here, one marked 'NEW TEST MAP' and one marked 'NEW G MAP'. Click the 'NEW G MAP' button. At this time the turtlebot will reconfigure itself for g-mapping. This reconfiguration takes some time. The turtlebot will emit a tone, seem to pause, and then emit a second tone. After the second tone there will be a wait, and then a yellow box will appear on the controlling computer's screen that will tell you that the reconfiguration was completed successfully. Click the 'Done' button. You can now go to the tabs at the top of the sidebar and click 'CONTROLS'. From the 'Controls' tab you can direct the turtlebot around the area to be mapped. The robot will use its laser to record information about solid objects in its path. You cannot see the map as it is being made, so try to be thorough. You cannot go back and add to a map that is already made. If a map is incomplete you must start g-mapping over again and make an entirely new map.

  7. Save Map
    Go back to the 'MAP' tab, at the top of the sidebar, when you are done. You should see a series of buttons again. (If you are not seeing the vertical button panel, look for a 'Done' or 'Return' button.) The 'Save Map' button, second from the top, should be ready for you to click. DO NOT click the 'STOP/SWITCH SERVICE' button at the bottom of the row as you are not done g-mapping. When you click the 'Save Map' button you will be given a screen for naming the map in the library. Use simple names without spaces or special characters. Click the 'SAVE' button. Wait again for the yellow box that tells you that the process completed without error. Once you see the yellow box, you can click 'Done'. Your map should now be part of the turtlebot map library.

  8. Start Navigation (Load A Map)
    Back at the 'MAP' sidebar the 'Load Map' function is disabled. Click 'STOP/SWITCH SERVICE', and wait while the turtlebot reconfigures from g-mapping to teleop. The switch takes about a minute. When it is done you will notice that the 'Load Map' button is enabled. (There is no yellow box to tell you that the operation is finished.) Click the 'Load Map' button. The sidebar will change to show the Load Map options. The Load Map screen is used to launch the 'navigation' configuration for the turtlebot. There are many buttons on this screen. There is a horizontal line on the screen which you should note the position of. Try to use the buttons below the horizontal line. Next to the text that reads 'Load this file:' is a dropdown box that will allow you to select your map. After selecting your map, click the 'LOAD' button. At this time the turtlebot will reconfigure itself for the navigation function. This configuration takes some time. You should hear a series of tones, and a pause, and then another series of tones. After another short wait a yellow box with a confirmation message appears in the sidebar. When you see the yellow box you know you can proceed. Do not click DONE at this time. Click 'RUN NAV TOOLS'. This will take you to the screen where you can specify starting and ending coordinates for your navigation. After clicking the 'RUN NAV TOOLS' button the nav tools are visible on the 'View Current Map' page. You are automatically taken to that page now.

  9. Tell the Navigation Software Where the Turtlebot Is
    Click 'Refresh Current Map' at the top of the sidebar. Wait for a period of time while the map is loaded. When the map is ready an alert box appears on the screen with the xy location of the origin for your map. The numbers you see should not be zeros, but they are not user modifiable. Click OK on the alert and you should see the map appear in the window of the sidebar. Scroll until you see the main part of the map in the center of the window. Mentally figure out where the turtlebot robot is and what direction it is facing. The orientation of the map is determined by what direction the turtlebot was facing when the g-mapping process was started. The map cannot be rotated in the window. Click the 'START COORDS' button. Hover the cursor over the map, and specifically over the spot where the turtlebot is to start from. This should be it's location in the room. Click the mouse button and a small blue square is placed on the map. You can move it by hovering over another part of the map, and clicking again. Now you should click on the button that allows you to specify the starting angle. With every click the angle of the button changes. Twelve positions are available. Choose the one that best reflects the turtlebot's orientation on the map. Click the 'SEND START' button.

  10. Tell the Navigation Software Where the Desired Goal Is
    Click the 'STOP COORDS' button. Hover the cursor over the map in the spot you want the turtlebot to end up in. Click the mouse button. A red square is placed on the screen. Choose an angle using the button on the right side of the sidebar. This is the angle you want the turtlebot to be facing when it stops moving. If you click 'SEND GOAL' now the turtlebot will attempt to navigate from the starting location to the stop location. The process will be abandoned if it cannot figure a path, or if the start location as defined by the map does not match what it sees around it.

  11. Specify Additional Goals
    You can repeat step 10 as often as you like. Disregard the blue square after the robot has reached its destination. Place the red square in the next destination, and click the 'SEND GOAL' button.

No comments:

Post a Comment