Public Member Functions
hardware_interface::RobotHW Class Reference

Robot Hardware Interface and Resource Manager. More...

#include <robot_hw.h>

Inheritance diagram for hardware_interface::RobotHW:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 RobotHW ()
Resource Management
virtual bool checkForConflict (const std::list< ControllerInfo > &info) const
Hardware Interface Switching
virtual bool canSwitch (const std::list< ControllerInfo > &, const std::list< ControllerInfo > &) const
virtual bool prepareSwitch (const std::list< ControllerInfo > &start_list, const std::list< ControllerInfo > &stop_list)
virtual void doSwitch (const std::list< ControllerInfo > &, const std::list< ControllerInfo > &)

Detailed Description

Robot Hardware Interface and Resource Manager.

This class provides a standardized interface to a set of robot hardware interfaces to the controller manager. It performs resource conflict checking for a given set of controllers and maintains a map of hardware interfaces. It is meant to be used as a base class for abstracting custom robot hardware.

The hardware interface map (interfaces_) is a 1-to-1 map between the names of interface types derived from HardwareInterface and instances of those interface types.

Definition at line 56 of file robot_hw.h.


Constructor & Destructor Documentation

Definition at line 59 of file robot_hw.h.


Member Function Documentation

virtual bool hardware_interface::RobotHW::canSwitch ( const std::list< ControllerInfo > &  ,
const std::list< ControllerInfo > &   
) const [inline, virtual]

Check (in non-realtime) if given controllers could be started and stopped from the current state of the RobotHW with regard to necessary hardware interface switches. Start and stop list are disjoint. This is just a check, the actual switch is done in doSwitch()

Deprecated:
: Implement prepareSwitch() instead

Definition at line 106 of file robot_hw.h.

virtual bool hardware_interface::RobotHW::checkForConflict ( const std::list< ControllerInfo > &  info) const [inline, virtual]

Check (in non-realtime) if the given set of controllers is allowed to run simultaneously.

This default implementation simply checks if any two controllers use the same resource.

Definition at line 73 of file robot_hw.h.

virtual void hardware_interface::RobotHW::doSwitch ( const std::list< ControllerInfo > &  ,
const std::list< ControllerInfo > &   
) [inline, virtual]

Perform (in realtime) all necessary hardware interface switches in order to start and stop the given controllers. Start and stop list are disjoint. The feasability was checked in canSwitch() beforehand.

Definition at line 121 of file robot_hw.h.

virtual bool hardware_interface::RobotHW::prepareSwitch ( const std::list< ControllerInfo > &  start_list,
const std::list< ControllerInfo > &  stop_list 
) [inline, virtual]

Check (in non-realtime) if given controllers could be started and stopped from the current state of the RobotHW with regard to necessary hardware interface switches and prepare the switching. Start and stop list are disjoint. This handles the check and preparation, the actual switch is commited in doSwitch()

Definition at line 114 of file robot_hw.h.


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


hardware_interface
Author(s): Wim Meeussen, Adolfo Rodriguez Tsouroukdissian
autogenerated on Sat Jun 8 2019 20:09:17