Many things can cause problems when interacting with controllers. Always check the PR2 dashboard first, every failure should print one or more error messages that give very useful information about the problem.
Understanding error messages
A controller named xxx was already loaded inside the controller manager
- You are trying to load a controller with a name that matches one of the controllers already loaded inside the controller manager. This is not allowed since every controller needs to have a unique name. To get a list of all controllers that are loaded, type:
$ rosrun pr2_controller_manager pr2_controller_manager list
- You are trying to load a controller with a name that matches one of the controllers already loaded inside the controller manager. This is not allowed since every controller needs to have a unique name. To get a list of all controllers that are loaded, type:
Could not load controller xxx because the type was not specified. Did you load the controller configuration on the parameter server?
- In order to spawn a controller, you need to load the controller configuration on the parameter server first. One of these parameters is the controller type. This parameter should be specified as parameter 'xxx/type'. However, you did not specify this parameter on the parameter server. For information on how to load this parameter on the parameter server, take a look at the instructions for spawning a controller.
Could not spawn controller xxx because controller type yyy does not exist or Could not load class yyy
- The controller manager does not know about a controller type named 'yyy'. To list the controller types known to the controller manager, type:
$ rosrun pr2_controller_manager pr2_controller_manager list-types
- The controller manager does not know about a controller type named 'yyy'. To list the controller types known to the controller manager, type:
Initializing controller xxx failed
- The controller manager tried to initialize the controller, but the controller itself returned an error. Check the controller specific documentation to find out how to solve this problem.
Scheduling controller xxx failed
- When two controllers directly communicate with each other, one controller will depend on the other to function. This type of dependencies specify the order in which controllers are executed. However, when e.g. a circular dependency exists between controllers, the scheduling of the execution order will fail. To fix this problem, read the controller specific documentation to find out which controllers depend on which controllers.
Cannot unload controller xxx because controller yyy still depends on it
- When two controllers directly communicate with each other, one controller will depend on the other to function. This type of dependencies specify the order in which controllers are executed. When controller yyy depends on controller xxx, it is not possible to unload controller xxx. First unload controller yyy, and then unload controller xxx.
Could not unload/start/stop controller with name xxx because no controller with this name exists
- You tried to unload/start/stop a controller that is not loaded inside the controller manager. To get a list of all controllers that are loaded, type:
$ rosrun pr2_controller_manager pr2_controller_manager list
- You tried to unload/start/stop a controller that is not loaded inside the controller manager. To get a list of all controllers that are loaded, type:
Could not unload controller with name xxx because it is still running
- A controller can only be unloaded when it is in a stopped state. To unload a running controller, first stop it.
NaN Values in Joint States
If pr2_controller_manager ever calculates a NaN or Inf value for a joint state--position, velocity, effort, etc--then pr2_controller_manager will be unable to control the mechanism. A restart of pr2_controller_manager is the only way to revert this condition.
This condition usually means there is a serious hardware or software problem, and should be reported immediately.