#include <hardware_interface.h>
Public Member Functions | |
bool | addAccelerometer (Accelerometer *accelerometer) |
Add an accelerometer to the hardware interface. More... | |
bool | addActuator (Actuator *actuator) |
Add an actuator to the hardware interface. More... | |
bool | addAnalogIn (AnalogIn *analog_in) |
Add an analog-in device to the hardware interface. More... | |
bool | addCustomHW (CustomHW *custom_hw) |
Add a Custom Hardware device to the hardware interface. More... | |
bool | addDigitalOut (DigitalOut *digital_out) |
Add an digital I/O to the hardware interface. More... | |
bool | addForceTorque (ForceTorque *forcetorque) |
Add a FT sensor to the hardware interface. More... | |
bool | addPressureSensor (PressureSensor *sensor) |
Add an pressure sensor to the hardware interface. More... | |
bool | addProjector (Projector *projector) |
Add an projector to the hardware interface. More... | |
Accelerometer * | getAccelerometer (const std::string &name) const |
Get a pointer to the accelerometer by name. More... | |
Actuator * | getActuator (const std::string &name) const |
Get a pointer to the actuator by name. More... | |
AnalogIn * | getAnalogIn (const std::string &name) const |
Get a pointer to the analog-in device by name. More... | |
CustomHW * | getCustomHW (const std::string &name) const |
Get a pointer to the Custom Hardware device by name. More... | |
DigitalOut * | getDigitalOut (const std::string &name) const |
Get a pointer to the digital I/O by name. More... | |
ForceTorque * | getForceTorque (const std::string &name) const |
Get a pointer to the FT sensor by name. More... | |
PressureSensor * | getPressureSensor (const std::string &name) const |
Get a pointer to the pressure sensor by name. More... | |
Projector * | getProjector (const std::string &name) const |
Get a pointer to the projector by name. More... | |
Public Attributes | |
AccelerometerMap | accelerometers_ |
ActuatorMap | actuators_ |
AnalogInMap | analog_ins_ |
ros::Time | current_time_ |
The time at which the commands were sent to the hardware. More... | |
CustomHWMap | custom_hws_ |
DigitalOutMap | digital_outs_ |
ForceTorqueMap | ft_sensors_ |
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:
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 408 of file hardware_interface.h.
|
inline |
Add an accelerometer to the hardware interface.
accelerometer | A pointer to the Accelerometer |
Definition at line 526 of file hardware_interface.h.
|
inline |
Add an actuator to the hardware interface.
actuator | A pointer to the Actuator |
Definition at line 504 of file hardware_interface.h.
|
inline |
Add an analog-in device to the hardware interface.
analog_in | A pointer to the AnalogIn |
Definition at line 570 of file hardware_interface.h.
|
inline |
Add a Custom Hardware device to the hardware interface.
custom_hw | A pointer to the CustomHW |
Definition at line 581 of file hardware_interface.h.
|
inline |
Add an digital I/O to the hardware interface.
digital_out | A pointer to the DigitalOut |
Definition at line 548 of file hardware_interface.h.
|
inline |
Add a FT sensor to the hardware interface.
forcetorque | A pointer to the ForceTorque |
Definition at line 537 of file hardware_interface.h.
|
inline |
Add an pressure sensor to the hardware interface.
sensor | A pointer to the PressureSensor |
Definition at line 515 of file hardware_interface.h.
|
inline |
Add an projector to the hardware interface.
projector | A pointer to the Projector |
Definition at line 559 of file hardware_interface.h.
|
inline |
Get a pointer to the accelerometer by name.
name | The name of the accelerometer |
Definition at line 444 of file hardware_interface.h.
|
inline |
Get a pointer to the actuator by name.
name | The name of the actuator |
Definition at line 424 of file hardware_interface.h.
|
inline |
Get a pointer to the analog-in device by name.
name | The name of the analog-in device |
Definition at line 484 of file hardware_interface.h.
|
inline |
Get a pointer to the Custom Hardware device by name.
name | The name of the Custom Hardware device |
Definition at line 494 of file hardware_interface.h.
|
inline |
Get a pointer to the digital I/O by name.
name | The name of the digital I/O |
Definition at line 464 of file hardware_interface.h.
|
inline |
Get a pointer to the FT sensor by name.
name | The name of the FT sensor |
Definition at line 454 of file hardware_interface.h.
|
inline |
Get a pointer to the pressure sensor by name.
name | The name of the pressure sensor |
Definition at line 434 of file hardware_interface.h.
|
inline |
Get a pointer to the projector by name.
name | The name of the projector |
Definition at line 474 of file hardware_interface.h.
AccelerometerMap pr2_hardware_interface::HardwareInterface::accelerometers_ |
Definition at line 413 of file hardware_interface.h.
ActuatorMap pr2_hardware_interface::HardwareInterface::actuators_ |
Definition at line 411 of file hardware_interface.h.
AnalogInMap pr2_hardware_interface::HardwareInterface::analog_ins_ |
Definition at line 417 of file hardware_interface.h.
ros::Time pr2_hardware_interface::HardwareInterface::current_time_ |
The time at which the commands were sent to the hardware.
Definition at line 587 of file hardware_interface.h.
CustomHWMap pr2_hardware_interface::HardwareInterface::custom_hws_ |
Definition at line 418 of file hardware_interface.h.
DigitalOutMap pr2_hardware_interface::HardwareInterface::digital_outs_ |
Definition at line 415 of file hardware_interface.h.
ForceTorqueMap pr2_hardware_interface::HardwareInterface::ft_sensors_ |
Definition at line 414 of file hardware_interface.h.
PressureSensorMap pr2_hardware_interface::HardwareInterface::pressure_sensors_ |
Definition at line 412 of file hardware_interface.h.
ProjectorMap pr2_hardware_interface::HardwareInterface::projectors_ |
Definition at line 416 of file hardware_interface.h.