#include <hardware_interface.h>
Public Member Functions | |
bool | addAccelerometer (Accelerometer *accelerometer) |
Add an accelerometer to the hardware interface. | |
bool | addActuator (Actuator *actuator) |
Add an actuator to the hardware interface. | |
bool | addAnalogIn (AnalogIn *analog_in) |
Add an analog-in device to the hardware interface. | |
bool | addDigitalOut (DigitalOut *digital_out) |
Add an digital I/O to the hardware interface. | |
bool | addPressureSensor (PressureSensor *sensor) |
Add an pressure sensor to the hardware interface. | |
bool | addProjector (Projector *projector) |
Add an projector to the hardware interface. | |
Accelerometer * | getAccelerometer (const std::string &name) const |
Get a pointer to the accelerometer by name. | |
Actuator * | getActuator (const std::string &name) const |
Get a pointer to the actuator by name. | |
AnalogIn * | getAnalogIn (const std::string &name) const |
Get a pointer to the analog-in device by name. | |
DigitalOut * | getDigitalOut (const std::string &name) const |
Get a pointer to the digital I/O by name. | |
PressureSensor * | getPressureSensor (const std::string &name) const |
Get a pointer to the pressure sensor by name. | |
Projector * | getProjector (const std::string &name) const |
Get a pointer to the projector by name. | |
Public Attributes | |
AccelerometerMap | accelerometers_ |
ActuatorMap | actuators_ |
AnalogInMap | analog_ins_ |
ros::Time | current_time_ |
The time at which the commands were sent to the hardware. | |
DigitalOutMap | digital_outs_ |
PressureSensorMap | pressure_sensors_ |
ProjectorMap | projectors_ |
The HardwareInterface class provides access to the PR2 hardware components that are controlled via EtherCAT. These components include:
For each component type, there exists a class definition that consists of the following three fields: # name - A unique name for this instance of a component type # command - A class which is used to send commands to this component # status - A class which is used to return the status of this component
Drivers that provide one or more of these components register the corresponding class for that component by name with the HardwareInterface. For a given component type, names must be unique.
Controllers can retrieve a pointer to a component's class by name. The component is controlled using the command_ field of the component class, and its status is given in the status_ field.
Definition at line 367 of file hardware_interface.h.
bool pr2_hardware_interface::HardwareInterface::addAccelerometer | ( | Accelerometer * | accelerometer | ) | [inline] |
Add an accelerometer to the hardware interface.
accelerometer | A pointer to the Accelerometer |
Definition at line 463 of file hardware_interface.h.
bool pr2_hardware_interface::HardwareInterface::addActuator | ( | Actuator * | actuator | ) | [inline] |
Add an actuator to the hardware interface.
actuator | A pointer to the Actuator |
Definition at line 441 of file hardware_interface.h.
bool pr2_hardware_interface::HardwareInterface::addAnalogIn | ( | AnalogIn * | analog_in | ) | [inline] |
Add an analog-in device to the hardware interface.
analog_in | A pointer to the AnalogIn |
Definition at line 496 of file hardware_interface.h.
bool pr2_hardware_interface::HardwareInterface::addDigitalOut | ( | DigitalOut * | digital_out | ) | [inline] |
Add an digital I/O to the hardware interface.
digital_out | A pointer to the DigitalOut |
Definition at line 474 of file hardware_interface.h.
bool pr2_hardware_interface::HardwareInterface::addPressureSensor | ( | PressureSensor * | sensor | ) | [inline] |
Add an pressure sensor to the hardware interface.
sensor | A pointer to the PressureSensor |
Definition at line 452 of file hardware_interface.h.
bool pr2_hardware_interface::HardwareInterface::addProjector | ( | Projector * | projector | ) | [inline] |
Add an projector to the hardware interface.
projector | A pointer to the Projector |
Definition at line 485 of file hardware_interface.h.
Accelerometer* pr2_hardware_interface::HardwareInterface::getAccelerometer | ( | const std::string & | name | ) | const [inline] |
Get a pointer to the accelerometer by name.
name | The name of the accelerometer |
Definition at line 401 of file hardware_interface.h.
Actuator* pr2_hardware_interface::HardwareInterface::getActuator | ( | const std::string & | name | ) | const [inline] |
Get a pointer to the actuator by name.
name | The name of the actuator |
Definition at line 381 of file hardware_interface.h.
AnalogIn* pr2_hardware_interface::HardwareInterface::getAnalogIn | ( | const std::string & | name | ) | const [inline] |
Get a pointer to the analog-in device by name.
name | The name of the analog-in device |
Definition at line 431 of file hardware_interface.h.
DigitalOut* pr2_hardware_interface::HardwareInterface::getDigitalOut | ( | const std::string & | name | ) | const [inline] |
Get a pointer to the digital I/O by name.
name | The name of the digital I/O |
Definition at line 411 of file hardware_interface.h.
PressureSensor* pr2_hardware_interface::HardwareInterface::getPressureSensor | ( | const std::string & | name | ) | const [inline] |
Get a pointer to the pressure sensor by name.
name | The name of the pressure sensor |
Definition at line 391 of file hardware_interface.h.
Projector* pr2_hardware_interface::HardwareInterface::getProjector | ( | const std::string & | name | ) | const [inline] |
Get a pointer to the projector by name.
name | The name of the projector |
Definition at line 421 of file hardware_interface.h.
Definition at line 372 of file hardware_interface.h.
Definition at line 370 of file hardware_interface.h.
Definition at line 375 of file hardware_interface.h.
The time at which the commands were sent to the hardware.
Definition at line 502 of file hardware_interface.h.
Definition at line 373 of file hardware_interface.h.
Definition at line 371 of file hardware_interface.h.
Definition at line 374 of file hardware_interface.h.