moveit_controller_manager::MoveItControllerManager sub class that interfaces one ros_control controller_manager instance. All services and names are relative to ns_. More...
Public Member Functions | |
virtual void | getActiveControllers (std::vector< std::string > &names) |
Refresh controller list and output all active, managed controllers. | |
virtual moveit_controller_manager::MoveItControllerHandlePtr | getControllerHandle (const std::string &name) |
Find and return the pre-allocated handle for the given controller. | |
virtual void | getControllerJoints (const std::string &name, std::vector< std::string > &joints) |
Read resources from cached controller states. | |
virtual void | getControllersList (std::vector< std::string > &names) |
Refresh controller list and output all managed controllers. | |
virtual ControllerState | getControllerState (const std::string &name) |
Refresh controller state and output the state of the given one, only active_ will be set. | |
MoveItControllerManager () | |
The default constructor. Reads the namespace from ~ros_control_namespace param and defaults to /. | |
MoveItControllerManager (const std::string &ns) | |
Configure interface with namespace. | |
virtual bool | switchControllers (const std::vector< std::string > &activate, const std::vector< std::string > &deactivate) |
Filter lists for managed controller and computes switching set. Stopped list might be extended by unsupported controllers that claim needed resources. | |
Private Types | |
typedef std::map< std::string, ControllerHandleAllocatorPtr > | AllocatorsMap |
typedef std::map< std::string, controller_manager_msgs::ControllerState > | ControllersMap |
typedef std::map< std::string, moveit_controller_manager::MoveItControllerHandlePtr > | HandleMap |
Private Member Functions | |
void | allocate (const std::string &name, const controller_manager_msgs::ControllerState &controller) |
Allocates a MoveItControllerHandle instance for the given controller Might create allocator object first. | |
void | discover (bool force=false) |
Call list_controllers and populate managed_controllers_ and active_controllers_. Allocates handles if needed. Throttled down to 1 Hz, controllers_mutex_ must be locked externally. | |
std::string | getAbsName (const std::string &name) |
get fully qualified name | |
Static Private Member Functions | |
static bool | isActive (const controller_manager_msgs::ControllerState &s) |
Check if given controller is active. | |
Private Attributes | |
ControllersMap | active_controllers_ |
AllocatorsMap | allocators_ |
boost::mutex | controllers_mutex_ |
ros::Time | controllers_stamp_ |
HandleMap | handles_ |
pluginlib::ClassLoader < ControllerHandleAllocator > | loader_ |
ControllersMap | managed_controllers_ |
const std::string | ns_ |
moveit_controller_manager::MoveItControllerManager sub class that interfaces one ros_control controller_manager instance. All services and names are relative to ns_.
Definition at line 83 of file controller_manager_plugin.cpp.
typedef std::map<std::string, ControllerHandleAllocatorPtr> moveit_ros_control_interface::MoveItControllerManager::AllocatorsMap [private] |
Definition at line 90 of file controller_manager_plugin.cpp.
typedef std::map<std::string, controller_manager_msgs::ControllerState> moveit_ros_control_interface::MoveItControllerManager::ControllersMap [private] |
Definition at line 87 of file controller_manager_plugin.cpp.
typedef std::map<std::string, moveit_controller_manager::MoveItControllerHandlePtr> moveit_ros_control_interface::MoveItControllerManager::HandleMap [private] |
Definition at line 93 of file controller_manager_plugin.cpp.
The default constructor. Reads the namespace from ~ros_control_namespace param and defaults to /.
Reimplemented from moveit_controller_manager::MoveItControllerManager.
Definition at line 180 of file controller_manager_plugin.cpp.
moveit_ros_control_interface::MoveItControllerManager::MoveItControllerManager | ( | const std::string & | ns | ) | [inline] |
Configure interface with namespace.
ns | namespace of ros_control node (without /controller_manager/) |
Definition at line 191 of file controller_manager_plugin.cpp.
void moveit_ros_control_interface::MoveItControllerManager::allocate | ( | const std::string & | name, |
const controller_manager_msgs::ControllerState & | controller | ||
) | [inline, private] |
Allocates a MoveItControllerHandle instance for the given controller Might create allocator object first.
name | fully qualified name of the controller |
controller | controller information |
Definition at line 149 of file controller_manager_plugin.cpp.
void moveit_ros_control_interface::MoveItControllerManager::discover | ( | bool | force = false | ) | [inline, private] |
Call list_controllers and populate managed_controllers_ and active_controllers_. Allocates handles if needed. Throttled down to 1 Hz, controllers_mutex_ must be locked externally.
force | force rediscover |
Definition at line 115 of file controller_manager_plugin.cpp.
std::string moveit_ros_control_interface::MoveItControllerManager::getAbsName | ( | const std::string & | name | ) | [inline, private] |
get fully qualified name
name | name to be resolved to an absolute name |
Definition at line 171 of file controller_manager_plugin.cpp.
virtual void moveit_ros_control_interface::MoveItControllerManager::getActiveControllers | ( | std::vector< std::string > & | names | ) | [inline, virtual] |
Refresh controller list and output all active, managed controllers.
[out] | names | list of controllers (with namespace) |
Implements moveit_controller_manager::MoveItControllerManager.
Definition at line 231 of file controller_manager_plugin.cpp.
virtual moveit_controller_manager::MoveItControllerHandlePtr moveit_ros_control_interface::MoveItControllerManager::getControllerHandle | ( | const std::string & | name | ) | [inline, virtual] |
Find and return the pre-allocated handle for the given controller.
name |
Implements moveit_controller_manager::MoveItControllerManager.
Definition at line 201 of file controller_manager_plugin.cpp.
virtual void moveit_ros_control_interface::MoveItControllerManager::getControllerJoints | ( | const std::string & | name, |
std::vector< std::string > & | joints | ||
) | [inline, virtual] |
Read resources from cached controller states.
[in] | name | name of controller (with namespace) |
[out] | joints |
Implements moveit_controller_manager::MoveItControllerManager.
Definition at line 248 of file controller_manager_plugin.cpp.
virtual void moveit_ros_control_interface::MoveItControllerManager::getControllersList | ( | std::vector< std::string > & | names | ) | [inline, virtual] |
Refresh controller list and output all managed controllers.
[out] | names | list of controllers (with namespace) |
Implements moveit_controller_manager::MoveItControllerManager.
Definition at line 216 of file controller_manager_plugin.cpp.
virtual ControllerState moveit_ros_control_interface::MoveItControllerManager::getControllerState | ( | const std::string & | name | ) | [inline, virtual] |
Refresh controller state and output the state of the given one, only active_ will be set.
[in] | name | name of controller (with namespace) |
Implements moveit_controller_manager::MoveItControllerManager.
Definition at line 263 of file controller_manager_plugin.cpp.
static bool moveit_ros_control_interface::MoveItControllerManager::isActive | ( | const controller_manager_msgs::ControllerState & | s | ) | [inline, static, private] |
Check if given controller is active.
s | state of controller |
Definition at line 104 of file controller_manager_plugin.cpp.
virtual bool moveit_ros_control_interface::MoveItControllerManager::switchControllers | ( | const std::vector< std::string > & | activate, |
const std::vector< std::string > & | deactivate | ||
) | [inline, virtual] |
Filter lists for managed controller and computes switching set. Stopped list might be extended by unsupported controllers that claim needed resources.
activate | |
deactivate |
Implements moveit_controller_manager::MoveItControllerManager.
Definition at line 284 of file controller_manager_plugin.cpp.
Definition at line 89 of file controller_manager_plugin.cpp.
Definition at line 91 of file controller_manager_plugin.cpp.
boost::mutex moveit_ros_control_interface::MoveItControllerManager::controllers_mutex_ [private] |
Definition at line 97 of file controller_manager_plugin.cpp.
Definition at line 96 of file controller_manager_plugin.cpp.
Definition at line 94 of file controller_manager_plugin.cpp.
pluginlib::ClassLoader<ControllerHandleAllocator> moveit_ros_control_interface::MoveItControllerManager::loader_ [private] |
Definition at line 86 of file controller_manager_plugin.cpp.
ControllersMap moveit_ros_control_interface::MoveItControllerManager::managed_controllers_ [private] |
Definition at line 88 of file controller_manager_plugin.cpp.
const std::string moveit_ros_control_interface::MoveItControllerManager::ns_ [private] |
Definition at line 85 of file controller_manager_plugin.cpp.