Simulation Setup Tutorial 1: Starting, Stopping and Troubleshooting


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.


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:


Which comes up looking like this:


Starting the simulated robot and the manipulation tools

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:


After clicking that icon, the terminal opens up:


Inside the terminal, type ./sim_launch.bash. Note that typing ./s followed by Tab is usually enough to auto-complete. You will get prompted with a list of the simulation worlds that are available to be used. Choose on of them and click Enter.

The script will then start the simulation, followed by the manipulation tools. You should see the following output:

Choose a simulation world:
1: Small shelf full of objects
2: Candy world
3: Home setting, table with some objects
4: Home setting, object retrieval from cabinet
0: Exit
Select: 4
Launching simulation world...
Simulation started.
Launching manipulation modules...
Manipulation modules ready. Launch RViz to start operation.

The last line will tell you that everything has come up correctly and it's ready to go.

Starting the User Interface

A button provides easy access to the User Interface:


... which comes up and looks like this:


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:


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:


The terminal window on the Server (the one used earlier to start the simulation and the manipulation tools) should print:

Shutting down...
Shutdown complete

At that point, the simulation can be restarted exactly as above.


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


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:


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 never gets to the "Launch RViz..." line. 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"


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


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:


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.

Wiki: robhum/startstop (last edited 2013-12-03 20:08:37 by TullyFoote)