Simulation Setup Tutorial 1: Starting, Stopping and Troubleshooting

Overview

From a software perspective, the simulation setup consists of:

  • a simulated world with a PR2 robot inside it. This component is highly resource intensive, and it simulates the physics of the real world. It is a substitute for a real PR2 - all other components below have no idea that the robot they are dealing with is simulated instead of a real one.

  • interactive manipulation software running on the robot. These are our manipulation algorithms running on the robot itself. Other than having to be started and stopped, should be completely invisible to the user.

  • the "User Interface": the visual interface that the user controls the robot through. It is based on the RViz robot visualizer. This is the user's main interface with the system.

From a hardware perspective, the simulation setup consists of :

  • the Server: a headless desktop computer. The Server runs the first two components in the list above. It is a powerful computer, but needs no monitor, mouse or keyboard, as the user is never intended to directly interact with it.

  • the Laptop: the only component that runs on the Laptop is the User Interface. It does not need to be very powerful, but needs a large screen and a decent graphics card.

Step-by-step

In general, performing Interactive Manipulation in this setup implies:

  • starting the simulated robot
  • starting the manipulation tools
  • doing some mobile manipulation task
  • shutting down

Keyboard access

Use the built-in Ubuntu mouse-to-keyboard interface to type at the command line. We have tried hard to keep typing to a minimum, but some commands could not be avoided. We have also added a button to provide easy access to the keyboard:

keyboard.png

Which comes up looking like this:

Keyboard

Starting the simulated robot

Since the simulated robot is started on the Server, this step begins with opening a terminal on the Server. The icon below creates a new terminal already logged in on the server:

server.png

After clicking that icon, the terminal opens up:

Text

Inside the terminal, type ./sim_launch.bash. Note that typing ./s followed by Tab is usually enough to auto-complete. The simulation starts, and you should see many lines scrolling through the terminal. Wait a little (less than a minute usually) until the scrolling finishes, meaning that the simulation is ready.

simstarted.png

In general, look for the words Kalman filter initialized with odom measurement somewhere towards the end of the spam that the simulation prints out as it starts. They mean that everything is OK and good to go.

Starting the Manipulation Tools

This component also runs on the Server. Use the same button as before to open a new terminal on the Server. In this new terminal, type ./manipulation_launch.bash. Note that ./m Tab is usually enough to Auto-complete.

You will again a whole bunch of spam scrolling by. Give it half a minute to finish starting. You can minimize or kill the on-screen keyboard at this point, ending up with something looking like this:

Text

Starting the User Interface

A button provides easy access to the User Interface:

ui.png

... which comes up and looks like this:

Text

System test

A quick system check that all is OK is to left-click anywhere in the "camera image" on the lower left corner of the User Interface. The simulation robot should move its head to "look" in the direction of the click.

Stopping the User Interface

This button kills the User Interface:

ui_kill.png

Note that starting or stopping the User Interface does not affect the simulation in any way. The User Interface can be stopped and restarted as many times as you want, and you should find the simulated robot in the same spot where you left it.

Stopping the Simulation

To stop the simulation, click this button:

server_kill.png

Both terminal windows on the Server (the ones used earlier to start the simulation and the manipulation tools) will start printing various shutdown commands, and end up back at the command line. At that point, the simulation can be restarted exactly as above.

Troubleshooting

Important: most of the robot control is done with the "Interact" button selected in RViz, like so:

interact.png

When the interact button is active, you should see two arrows (green/red) behind the torso, a little white cube above the head, and the upper arms should highlight when moused over:

markers.png

If this is not the case, something is wrong.

Simulation does not start

Sometimes, the simulation refuses the start, and the terminal in which you type ./sim_launch.bash gets stuck saying something like Waiting for model table_1 again and again. Give it a minute to see if it makes it past it. If it does not, stop the simulation (the usual "Stop simulation" button used above), wait for the command prompt to come back, and try starting it again.

If this starts happening every time, or at least often enough that it's annoying, let us know and we'll look into it.

The next troubleshooting tips assume that the simulation and manipulation tools have been started and the User Interface is up.

Troubleshooting tip: click "Reset"

reset.png

This is particularly helpful when the whole screen seems to go crazy with random triangles, like so:

Text

After clicking "Reset", the user interface takes a few seconds to come back.

Troubleshooting tip: disable / re-enable the "Robot Control" check box

Here it is:

redcontrols.png

This is particularly helpful when, even though the "Interact" button is selected, the arrows behind the torso do not show up. It should also be done when the "Robot Control" entry in the list glows red, as in the image above.

Movie

A movie illustrating all these concepts can be found on the Desktop of the simulation laptop. The movie can also be downloaded here: 1_getting_started.ogv.

Wiki: robhum/startstop (last edited 2011-10-24 04:49:12 by MateiCiocarlie)