[Documentation] [TitleIndex] [WordIndex

  Documentation Status

pr2_mechanism: pr2_controller_interface | pr2_controller_manager | pr2_hardware_interface | pr2_mechanism_diagnostics | pr2_mechanism_model | pr2_mechanism_msgs | realtime_tools

Package Summary

Documented

The controller manager (CM) package provides the infrastructure to run controllers in a hard realtime loop. In every cycle of the control loop, all controllers loaded into CM will get triggered. The order in in which the controllers are triggered is determined by the CM scheduler. CM provides ROS services to load/start/stop/unload controllers.

The controller manager also enforces low level safety limits on the effort/velocity/position of each joint.

pr2_mechanism: pr2_controller_interface | pr2_controller_manager | pr2_hardware_interface | pr2_mechanism_diagnostics | pr2_mechanism_model

Package Summary

Documented

The controller manager (CM) package provides the infrastructure to run controllers in a hard realtime loop. In every cycle of the control loop, all controllers loaded into CM will get triggered. The order in in which the controllers are triggered is determined by the CM scheduler. CM provides ROS services to load/start/stop/unload controllers.

The controller manager also enforces low level safety limits on the effort/velocity/position of each joint.

pr2_mechanism: pr2_controller_interface | pr2_controller_manager | pr2_hardware_interface | pr2_mechanism_diagnostics | pr2_mechanism_model

Package Summary

Documented

The controller manager (CM) package provides the infrastructure to run controllers in a hard realtime loop. In every cycle of the control loop, all controllers loaded into CM will get triggered. The order in in which the controllers are triggered is determined by the CM scheduler. CM provides ROS services to load/start/stop/unload controllers.

The controller manager also enforces low level safety limits on the effort/velocity/position of each joint.

Package Summary

Released Continuous integration No API documentation

The controller manager (CM) package provides the infrastructure to run controllers in a hard realtime loop.

  • Maintainer status: maintained
  • Maintainer: Devon Ash <dash AT clearpathrobotics DOT com>
  • Author: Eric Berger berger@willowgarage.com, Stuart Glaser, Wim Meeussen
  • License: BSD
  • External website: http://ros.org/pr2_controller_manager
Cannot load information on name: pr2_controller_manager, distro: kinetic, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: pr2_controller_manager, distro: lunar, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.

What is PR2 Controller Manager?

Hard realtime control loop

The pr2_controller_manager provides a hard realtime loop to control the robot mechanism. The robot mechanism is represented by a set of effort controlled joints (see pr2_mechanism_model for details). For the PR2 robot, we run the control loop at 1000 Hz. The controller manager provides the infrastructure to load your own realtime controller into its control loop. Every controller that is loaded into the controller manager will get triggered once every mili-second. To find out how to write your own hard realtime controller, take a look at this tutorial.

Safety limits

The controller manager ensures that none of the loaded controllers can command a joint past its safety limits. If necessary, the controller manager reduces the commanded joint effort, or even applies an effort in the opposite direction. For more details, take a look at the safety limits page.

Joint State Publishing

The controller manager publishes the state of all joints over ROS, as sensor_msgs/JointState messages. These messages appear on the joint_state topic, at 100 Hz. You can change this publishing frequency by setting the joint_state_publish_rate parameter.

Tools for running controllers

controller state.png

The controller manager provides the infrastructure to interact with controllers. Depending on if you're running controllers form a launch file, from the command line or from a ROS node, the controller manager provides different tools to run controllers.

Command-line tools

pr2_controller_manager

To interact with controllers from the command line, use the pr2_controller_manager tool. To interact with a specific controller, use:

 $ rosrun pr2_controller_manager pr2_controller_manager <command> <controller_name>

The following commands are available:

To get the state of the controllers, use:

 $ rosrun pr2_controller_manager pr2_controller_manager <command>

The following commands are available:

spawner

To automatically load and start a set of controllers at once, and automatically stop and unload those same controllers at once, use the spawner tool:

  $ rosrun pr2_controller_manager spawner [--stopped] name1 name2 name3 

When you run spawner, the listed controllers will get loaded and started (unless you specify --stopped). Spawner will keep running while the controllers are up. When you kill spawner (ctrl-c) it will automatically stop and unload all controllers it initially started.

unspawner

To automatically stop a set of controllers, and restart them later, you can use the unspawner tool:

  $ rosrun pr2_controller_manager unspawner name1 name2 name3

The listed controllers will be stopped, but not unloaded. Once spawner is shut down, the controllers will be restarted.

Creating launch files

You could run pr2_controller_manager to start controllers from within a launch file. However, the controller would then stay up even after the launch file is taken down. Instead, use the spawner tool to automatically load, start, stop and unload a controller from within a launch file. When you start spawner, it will load and start the controller. When you stop spawner (when the launch file is taken down) it will stop and unload the controller. Your launch file would look something like this:

 <launch>
   <node pkg="pr2_controller_manager" 
         type="spawner" 
         args="controller_name1 controller_name2" />
 </launch>

or, if you just want to load the controller, but not start it yet:

 <launch>
   <node pkg="pr2_controller_manager" 
         type="spawner" 
         args="--stopped controller_name1 controller_name2" />
 </launch>

ROS API

To interact with controllers form another ROS node, the controller manager provides five service calls:

pr2_controller_manager

Published Topics

joint_states (sensor_msgs/JointState) mechanism_statistics (pr2_mechanism_msgs/MechanismStatistics)

Services

pr2_controller_manager/load_controller (pr2_mechanism_msgs/LoadController) pr2_controller_manager/unload_controller (pr2_mechanism_msgs/UnloadController) pr2_controller_manager/switch_controller (pr2_mechanism_msgs/SwitchController) pr2_controller_manager/list_controllers (pr2_mechanism_msgs/ListControllers) pr2_controller_manager/list_controller_types (pr2_mechanism_msgs/ListControllerTypes) pr2_controller_manager/reload_controller_libraries (pr2_mechanism_msgs/ReloadControllerLibraries)

Parameters

pr2_controller_manager/joint_state_publish_rate (double, default: 100.0) pr2_controller_manager/mechanism_statistics_publish_rate (double, default: 1.0)


2017-10-21 13:04