Public Types | Public Member Functions | Public Attributes | Private Member Functions
controller_interface::ControllerBase Class Reference

Abstract Controller Interface. More...

#include <controller_base.h>

Inheritance diagram for controller_interface::ControllerBase:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { CONSTRUCTED, INITIALIZED, RUNNING }
 The current execution state of the controller. More...

Public Member Functions

 ControllerBase ()
virtual ~ControllerBase ()
Real-Time Safe Functions
virtual void starting (const ros::Time &)
 This is called from within the realtime thread just before the first call to update.
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.
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.
bool isRunning ()
 Check if the controller is running.
void updateRequest (const ros::Time &time, const ros::Duration &period)
 Calls update only if this controller is running.
bool startRequest (const ros::Time &time)
 Calls starting only if this controller is initialized or already running.
bool stopRequest (const ros::Time &time)
 Calls stopping only if this controller is initialized or already running.
Non Real-Time Safe Functions
virtual std::string getHardwareInterfaceType () const =0
 Get the name of this controller's hardware interface type.
virtual bool initRequest (hardware_interface::RobotHW *hw, ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh, std::set< std::string > &claimed_resources)=0
 Request that the controller be initialized.

Public Attributes

enum
controller_interface::ControllerBase:: { ... }  
state_
 The current execution state of the controller.

Private Member Functions

 ControllerBase (const ControllerBase &c)
ControllerBaseoperator= (const ControllerBase &c)

Detailed Description

Abstract Controller Interface.

Definition at line 50 of file controller_base.h.


Member Enumeration Documentation

anonymous enum

The current execution state of the controller.

Enumerator:
CONSTRUCTED 
INITIALIZED 
RUNNING 

Definition at line 150 of file controller_base.h.


Constructor & Destructor Documentation

Definition at line 53 of file controller_base.h.

Definition at line 54 of file controller_base.h.


Member Function Documentation

virtual std::string controller_interface::ControllerBase::getHardwareInterfaceType ( ) const [pure virtual]

Get the name of this controller's hardware interface type.

Implemented in controller_interface::Controller< T >.

virtual bool controller_interface::ControllerBase::initRequest ( hardware_interface::RobotHW hw,
ros::NodeHandle root_nh,
ros::NodeHandle controller_nh,
std::set< std::string > &  claimed_resources 
) [pure virtual]

Request that the controller be initialized.

Parameters:
hwThe hardware interface to the robot.
root_nhA NodeHandle in the root of the controller manager namespace. This is where the ROS interfaces are setup (publishers, subscribers, services).
controller_nhA NodeHandle in the namespace of the controller. This is where the controller-specific configuration resides.
[out]claimed_resourcesThe resources claimed by this controller.
Returns:
True if initialization was successful and the controller is ready to be started.

Implemented in controller_interface::Controller< T >.

Check if the controller is running.

Returns:
true if the controller is running

Definition at line 83 of file controller_base.h.

ControllerBase& controller_interface::ControllerBase::operator= ( const ControllerBase c) [private]
virtual void controller_interface::ControllerBase::starting ( const ros::Time ) [inline, virtual]

This is called from within the realtime thread just before the first call to update.

Parameters:
timeThe current time

Definition at line 64 of file controller_base.h.

Calls starting only if this controller is initialized or already running.

Definition at line 96 of file controller_base.h.

virtual void controller_interface::ControllerBase::stopping ( const ros::Time ) [inline, virtual]

This is called from within the realtime thread just after the last update call before the controller is stopped.

Parameters:
timeThe current time

Definition at line 78 of file controller_base.h.

Calls stopping only if this controller is initialized or already running.

Definition at line 109 of file controller_base.h.

virtual void controller_interface::ControllerBase::update ( const ros::Time time,
const ros::Duration period 
) [pure virtual]

This is called periodically by the realtime thread when the controller is running.

Parameters:
timeThe current time
periodThe time passed since the last call to update
void controller_interface::ControllerBase::updateRequest ( const ros::Time time,
const ros::Duration period 
) [inline]

Calls update only if this controller is running.

Definition at line 89 of file controller_base.h.


Member Data Documentation

The current execution state of the controller.


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


controller_interface
Author(s): Wim Meeussen
autogenerated on Sat Jun 8 2019 20:09:22