Controller with a specific hardware interface More...
#include <controller.h>
Public Member Functions | |
Controller () | |
virtual bool | init (T *, ros::NodeHandle &) |
The init function is called to initialize the controller from a non-realtime thread with a pointer to the hardware interface, itself, instead of a pointer to a RobotHW. More... | |
virtual bool | init (T *, ros::NodeHandle &, ros::NodeHandle &) |
The init function is called to initialize the controller from a non-realtime thread with a pointer to the hardware interface, itself, instead of a pointer to a RobotHW. More... | |
virtual | ~Controller () |
Public Member Functions inherited from controller_interface::ControllerBase | |
ControllerBase () | |
virtual | ~ControllerBase () |
virtual void | starting (const ros::Time &) |
This is called from within the realtime thread just before the first call to update. More... | |
virtual void | update (const ros::Time &time, const ros::Duration &period)=0 |
This is called periodically by the realtime thread when the controller is running. More... | |
virtual void | stopping (const ros::Time &) |
This is called from within the realtime thread just after the last update call before the controller is stopped. More... | |
bool | isRunning () |
Check if the controller is running. More... | |
void | updateRequest (const ros::Time &time, const ros::Duration &period) |
Calls update only if this controller is running. More... | |
bool | startRequest (const ros::Time &time) |
Calls starting only if this controller is initialized or already running. More... | |
bool | stopRequest (const ros::Time &time) |
Calls stopping only if this controller is initialized or already running. More... | |
Protected Member Functions | |
std::string | getHardwareInterfaceType () const |
Get the name of this controller's hardware interface type. More... | |
virtual bool | initRequest (hardware_interface::RobotHW *robot_hw, ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh, ClaimedResources &claimed_resources) |
Initialize the controller from a RobotHW pointer. More... | |
Private Member Functions | |
Controller (const Controller< T > &c) | |
Controller< T > & | operator= (const Controller< T > &c) |
Additional Inherited Members | |
Public Types inherited from controller_interface::ControllerBase | |
enum | { CONSTRUCTED, INITIALIZED, RUNNING } |
The current execution state of the controller. More... | |
typedef std::vector< hardware_interface::InterfaceResources > | ClaimedResources |
Public Attributes inherited from controller_interface::ControllerBase | |
enum controller_interface::ControllerBase:: { ... } | state_ |
The current execution state of the controller. More... | |
Controller with a specific hardware interface
T | The hardware interface type used by this controller. This enforces semantic compatibility between the controller and the hardware it's meant to control. |
Definition at line 52 of file controller.h.
|
inline |
Definition at line 55 of file controller.h.
|
inlinevirtual |
Definition at line 56 of file controller.h.
|
private |
|
inlineprotected |
Get the name of this controller's hardware interface type.
Definition at line 136 of file controller.h.
|
inlinevirtual |
The init function is called to initialize the controller from a non-realtime thread with a pointer to the hardware interface, itself, instead of a pointer to a RobotHW.
hw | The specific hardware interface used by this controller. |
controller_nh | A NodeHandle in the namespace from which the controller should read its configuration, and where it should set up its ROS interface. |
Definition at line 71 of file controller.h.
|
inlinevirtual |
The init function is called to initialize the controller from a non-realtime thread with a pointer to the hardware interface, itself, instead of a pointer to a RobotHW.
hw | The specific hardware interface used by this controller. |
root_nh | A NodeHandle in the root of the controller manager namespace. This is where the ROS interfaces are setup (publishers, subscribers, services). |
controller_nh | A NodeHandle in the namespace of the controller. This is where the controller-specific configuration resides. |
Definition at line 88 of file controller.h.
|
inlineprotectedvirtual |
Initialize the controller from a RobotHW pointer.
This calls init with the hardware interface for this controller if it can extract the correct interface from robot_hw
.
Implements controller_interface::ControllerBase.
Definition at line 98 of file controller.h.
|
private |