Public Member Functions | Private Types | Private Member Functions | Private Attributes
robot_controllers::ControllerManager Class Reference

Base class for a controller manager. More...

#include <controller_manager.h>

List of all members.

Public Member Functions

bool addJointHandle (JointHandlePtr &j)
 Add a joint handle.
 ControllerManager ()
HandlePtr getHandle (const std::string &name)
 Get the handle associated with a particular joint/controller name.
JointHandlePtr getJointHandle (const std::string &name)
 Get the joint handle associated with a particular joint name.
virtual int init (ros::NodeHandle &nh)
 Startup the controller manager, loading default controllers.
virtual int requestStart (const std::string &name)
 Start a controller.
virtual int requestStop (const std::string &name)
 Stop a controller.
virtual void reset ()
 Reset all controllers.
virtual void update (const ros::Time &time, const ros::Duration &dt)
 Update active controllers.
virtual ~ControllerManager ()
 Ensure proper shutdown with virtual destructor.

Private Types

typedef std::vector
< ControllerLoaderPtr
ControllerList
typedef std::vector
< JointHandlePtr
JointHandleList
typedef
actionlib::SimpleActionServer
< robot_controllers_msgs::QueryControllerStatesAction > 
server_t

Private Member Functions

void execute (const robot_controllers_msgs::QueryControllerStatesGoalConstPtr &goal)
 Action callback.
void getState (robot_controllers_msgs::QueryControllerStatesResult &result)
 Fill in the current state of controllers.
bool load (const std::string &name)
 Load a controller.

Private Attributes

ControllerList controllers_
JointHandleList joints_
boost::shared_ptr< server_tserver_

Detailed Description

Base class for a controller manager.

Definition at line 48 of file controller_manager.h.


Member Typedef Documentation

Definition at line 52 of file controller_manager.h.

Definition at line 53 of file controller_manager.h.

typedef actionlib::SimpleActionServer<robot_controllers_msgs::QueryControllerStatesAction> robot_controllers::ControllerManager::server_t [private]

Definition at line 50 of file controller_manager.h.


Constructor & Destructor Documentation

Definition at line 37 of file controller_manager.cpp.

Ensure proper shutdown with virtual destructor.

Definition at line 59 of file controller_manager.h.


Member Function Documentation

Add a joint handle.

Definition at line 206 of file controller_manager.cpp.

void robot_controllers::ControllerManager::execute ( const robot_controllers_msgs::QueryControllerStatesGoalConstPtr &  goal) [private]

Action callback.

Definition at line 246 of file controller_manager.cpp.

Get the handle associated with a particular joint/controller name.

Parameters:
nameThe name of the joint/controller.

Definition at line 213 of file controller_manager.cpp.

Get the joint handle associated with a particular joint name.

Parameters:
nameThe name of the joint.

This is mainly a convienence function.

Definition at line 233 of file controller_manager.cpp.

void robot_controllers::ControllerManager::getState ( robot_controllers_msgs::QueryControllerStatesResult &  result) [private]

Fill in the current state of controllers.

Definition at line 346 of file controller_manager.cpp.

Startup the controller manager, loading default controllers.

Parameters:
nhThe proper node handle for finding parameters.
Returns:
0 if success, negative values are error codes.

Note: JointHandles should be added before this is called.

Definition at line 41 of file controller_manager.cpp.

bool robot_controllers::ControllerManager::load ( const std::string &  name) [private]

Load a controller.

Definition at line 368 of file controller_manager.cpp.

int robot_controllers::ControllerManager::requestStart ( const std::string &  name) [virtual]

Start a controller.

Definition at line 85 of file controller_manager.cpp.

int robot_controllers::ControllerManager::requestStop ( const std::string &  name) [virtual]

Stop a controller.

Definition at line 162 of file controller_manager.cpp.

Reset all controllers.

Definition at line 197 of file controller_manager.cpp.

void robot_controllers::ControllerManager::update ( const ros::Time time,
const ros::Duration dt 
) [virtual]

Update active controllers.

Definition at line 184 of file controller_manager.cpp.


Member Data Documentation

Definition at line 111 of file controller_manager.h.

Definition at line 112 of file controller_manager.h.

Definition at line 114 of file controller_manager.h.


The documentation for this class was generated from the following files:


robot_controllers_interface
Author(s): Michael Ferguson
autogenerated on Thu Jun 6 2019 21:50:24