Show EOL distros: 

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

Package Summary

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 | pr2_mechanism_msgs | realtime_tools

Package Summary

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

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

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

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
pr2_mechanism: pr2_controller_interface | pr2_controller_manager | pr2_hardware_interface | pr2_mechanism_diagnostics | pr2_mechanism_model

Package Summary

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

pr2_mechanism: pr2_controller_interface | pr2_controller_manager | pr2_hardware_interface | pr2_mechanism_diagnostics | pr2_mechanism_model

Package Summary

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

PR2 コントローラーマネージャーとは何か?

ハードリアルタイムコントロールループ

pr2_controller_managerはロボットメカニズムをコントロールするためにhard realtimeループを提供します。ロボットメカニズムは Effort によって制御される Joint の集合によって表されます(詳細について pr2_mechanism_model参照)。PR2 ロボットに対して、我々は1000 Hzにおけるコントロールループを走らせます。 コントローラーマネージャーはそのコントロールループにあなた自身のリアルタイムコントローラーをロードするためのインフラを提供します。コントローラーマネージャーの中にロードされるすべてのコントローラーはミリ秒毎に1度トリガされるでしょう。どのようにあなた自身のハードリアルタイムコントローラーを書くべきか見つけだすために、 このチュートリアルをひと目見てください。

セーフティリミット

コントローラーマネージャーはロードされたコントローラーのいずれもそのsafety limitsを過ぎてJointを命令することができないことを保証します。もし必要なら、コントローラーマネージャーは命令されたJointのEffortを減らすか、あるいは反対方向にEffortを適用しさえします。もっと多くの詳細については、safety limitsページをひと目見てください。

Joint状態の配信

コントローラーマネージャーは、sensor_msgs/JointStateメッセージとして、ROSの上にすべてのJointの状態を配信します。これらのメッセージは、100ヘルツで、joint_state トピックに現われます。あなたは、joint_state_publish_rateパラメータをセットすることによって、周波数を配信してこれを変えることができます。

Tools for running controllers

controller state.png

コントローラーマネージャーはコントローラーを相互作用するインフラを提供します。 あなたがlaunchファイルからコントローラーを稼働しているかどうかに依存して、コマンドラインからあるいはROSノードから、コントローラーマネージャーはコントローラーを稼働する異なったツールを提供します。

Command-line tools

pr2_controller_manager

特定のコントローラーとやりとりするために、使います:

 $ rosrun pr2_controller_manager pr2_controller_manager <command> <controller_name>

次のコマンドが利用可能です:

  • load: load a controller (construct and initialize)

  • unload: unload a controller (destruct)

  • start: start a controller

  • stop: stop a controller

  • spawn: load and start a controller

  • kill: stop and unload a controller

コントローラーの状態を得るために、使います:

 $ rosrun pr2_controller_manager pr2_controller_manager <command>

次のコマンドが利用可能です:

  • list: list all the controllers in the order they are executed, and give the state of each controller

  • list-types: list all the controller types the controller manager knows about. If your controller is not in this list, you won't be able to spawn it.

  • list-joints: lists all the joint and actuator names that are used by the controller manager.

  • reload-libraries: Reloads all the controller libraries that are available as plugins. This is convenient when you are developing a controller and you want to test your new controller code, without restarting the robot every time. This does not restart controllers which were running before.

  • reload-libraries --restore: Reloads all the controller libraries that are available as plugins and restores all controllers to their original state.

spawner

すぐに自動的にコントローラーのセットをロードして、そしてそれでスタートして、そして自動的にストップして、そしてすぐにそれらの同じコントローラーをアンロードするために、spawnerツールを使ってください:

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

あなたがspawnerを動かすとき、リストされたコントローラーはロードされるでしょう、そして、(あなたが指定するなら - ストップ)、スタートしました。コントローラーが起きている間に、Spawnerは走り続けるでしょう。あなたがspawner(Ctrl -c)を殺すとき、それは自動的にストップして、そしてそれが初めにスタートしたすべてのコントローラーをアンロードするでしょう。

unspawner

コントローラーのセットについて自動的にストップして、そして後にそれらを再起動するために、あなたはunspawnerツールを使うことができます:

  $ rosrun pr2_controller_manager unspawner name1 name2 name3

リストされたコントローラーはstoppedされますが、アンロードはされないでしょう。 spawnerがシャットダウンされる途端に、コントローラーが再起動されるでしょう。

Creating launch files

あなたはスタートするpr2_controller_managerにlaunchファイルの中からのコントローラーを稼働することができました。しかしながら、launchファイルが止められた後さえ、コントローラーはそれから起きているでしょう。その代わりに、spawnerツールを自動的にロードするために使って、スタートして、ストップして、そしてlaunchファイルの中からコントローラーをアンロードしてください。あなたがspawnerでスタートするとき、それはコントローラーをロードして、そしてそれでスタートするでしょう。あなたがストップするとき、spawner(launchファイルが止められるとき)それはストップして、そしてコントローラーをアンロードするでしょう。 あなたのlaunchファイルはこのように見えるでしょう:

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

あるいは、もしあなたがただコントローラーをロードするけれどもまだそれでスタートしないことを望むなら:

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

ROS API

もう1つのROSノードから、コントローラーでやり取りするために、コントローラーマネージャーは5つのサービスコールを提供します::

pr2_controller_manager

Published Topics

joint_states (sensor_msgs/JointState)
  • the measured position, velocity and effort of each joint
mechanism_statistics (pr2_mechanism_msgs/MechanismStatistics)
  • this message contains statistics about the joints, the controllers and the actuators.

Services

pr2_controller_manager/load_controller (pr2_mechanism_msgs/LoadController)
  • the service request contains the name of the controller to load, and the response contains a boolean indicating success or failure.
pr2_controller_manager/unload_controller (pr2_mechanism_msgs/UnloadController)
  • the service request contains the name of the controller to unload, and the response contains a boolean indicating success or failure. A controller can only be unloaded when it is in the stopped state.
pr2_controller_manager/switch_controller (pr2_mechanism_msgs/SwitchController)
  • the service request contains a list of controller names to start, a list of controller names to stop and an int to indicate the strictness (BEST_EFFORT or STRICT). STRICT means that switching will fail if anything goes wrong (an invalid controller name, a controller that failed to start, etc. ). BEST_EFFORT means that even when something goes wrong with on controller, the service will still try to start/stop the remaining controllers. The service response contains a boolean indicating success or failure. The list of controllers to stop or start can be an empty list, if you are only stopping or only starting controllers.
pr2_controller_manager/list_controllers (pr2_mechanism_msgs/ListControllers)
  • the service returns all the controller names that are loaded in pr2_controller_manager at that time. Also, the service returns the state of each controller: running or stopped.
pr2_controller_manager/list_controller_types (pr2_mechanism_msgs/ListControllerTypes)
  • the service returns all the controller types that are known to pr2_controller_manager. Only the controller types that are known can be constructed. To let pr2_controller_manager know about your own controller type, use the pluginlib as explained in this tutorial.
pr2_controller_manager/reload_controller_libraries (pr2_mechanism_msgs/ReloadControllerLibraries)
  • the service reloads all the controller libraries that are available as plugins. This is convenient when you are developing a controller, and you want to test your new controller code without restarting the robot every time. This service only works when there are NO controller loaded.

Parameters

pr2_controller_manager/joint_state_publish_rate (double, default: 100.0)
  • the publish frequency of messages on the joint_states topic
pr2_controller_manager/mechanism_statistics_publish_rate (double, default: 1.0)
  • the publish frequency of messages on the mechanism_statistics topic

Wiki: ja/pr2_controller_manager (last edited 2016-08-27 05:04:24 by Crescent)