Public Member Functions | Public Attributes | List of all members
pr2_hardware_interface::HardwareInterface Class Reference

#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...
 
AccelerometergetAccelerometer (const std::string &name) const
 Get a pointer to the accelerometer by name. More...
 
ActuatorgetActuator (const std::string &name) const
 Get a pointer to the actuator by name. More...
 
AnalogIngetAnalogIn (const std::string &name) const
 Get a pointer to the analog-in device by name. More...
 
CustomHWgetCustomHW (const std::string &name) const
 Get a pointer to the Custom Hardware device by name. More...
 
DigitalOutgetDigitalOut (const std::string &name) const
 Get a pointer to the digital I/O by name. More...
 
ForceTorquegetForceTorque (const std::string &name) const
 Get a pointer to the FT sensor by name. More...
 
PressureSensorgetPressureSensor (const std::string &name) const
 Get a pointer to the pressure sensor by name. More...
 
ProjectorgetProjector (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_
 

Detailed Description

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 440 of file hardware_interface.h.

Member Function Documentation

◆ addAccelerometer()

bool pr2_hardware_interface::HardwareInterface::addAccelerometer ( Accelerometer accelerometer)
inline

Add an accelerometer to the hardware interface.

Parameters
accelerometerA pointer to the Accelerometer
Returns
true if successful, false if name is a duplicate

Definition at line 558 of file hardware_interface.h.

◆ addActuator()

bool pr2_hardware_interface::HardwareInterface::addActuator ( Actuator actuator)
inline

Add an actuator to the hardware interface.

Parameters
actuatorA pointer to the Actuator
Returns
true if successful, false if name is a duplicate

Definition at line 536 of file hardware_interface.h.

◆ addAnalogIn()

bool pr2_hardware_interface::HardwareInterface::addAnalogIn ( AnalogIn analog_in)
inline

Add an analog-in device to the hardware interface.

Parameters
analog_inA pointer to the AnalogIn
Returns
true if successful, false if name is a duplicate

Definition at line 602 of file hardware_interface.h.

◆ addCustomHW()

bool pr2_hardware_interface::HardwareInterface::addCustomHW ( CustomHW custom_hw)
inline

Add a Custom Hardware device to the hardware interface.

Parameters
custom_hwA pointer to the CustomHW
Returns
true if successful, false if name is a duplicate

Definition at line 613 of file hardware_interface.h.

◆ addDigitalOut()

bool pr2_hardware_interface::HardwareInterface::addDigitalOut ( DigitalOut digital_out)
inline

Add an digital I/O to the hardware interface.

Parameters
digital_outA pointer to the DigitalOut
Returns
true if successful, false if name is a duplicate

Definition at line 580 of file hardware_interface.h.

◆ addForceTorque()

bool pr2_hardware_interface::HardwareInterface::addForceTorque ( ForceTorque forcetorque)
inline

Add a FT sensor to the hardware interface.

Parameters
forcetorqueA pointer to the ForceTorque
Returns
true if successful, false if name is a duplicate

Definition at line 569 of file hardware_interface.h.

◆ addPressureSensor()

bool pr2_hardware_interface::HardwareInterface::addPressureSensor ( PressureSensor sensor)
inline

Add an pressure sensor to the hardware interface.

Parameters
sensorA pointer to the PressureSensor
Returns
true if successful, false if name is a duplicate

Definition at line 547 of file hardware_interface.h.

◆ addProjector()

bool pr2_hardware_interface::HardwareInterface::addProjector ( Projector projector)
inline

Add an projector to the hardware interface.

Parameters
projectorA pointer to the Projector
Returns
true if successful, false if name is a duplicate

Definition at line 591 of file hardware_interface.h.

◆ getAccelerometer()

Accelerometer* pr2_hardware_interface::HardwareInterface::getAccelerometer ( const std::string &  name) const
inline

Get a pointer to the accelerometer by name.

Parameters
nameThe name of the accelerometer
Returns
A pointer to an Accelerometer. Returns NULL if name is not valid.

Definition at line 476 of file hardware_interface.h.

◆ getActuator()

Actuator* pr2_hardware_interface::HardwareInterface::getActuator ( const std::string &  name) const
inline

Get a pointer to the actuator by name.

Parameters
nameThe name of the actuator
Returns
A pointer to an Actuator. Returns NULL if name is not valid.

Definition at line 456 of file hardware_interface.h.

◆ getAnalogIn()

AnalogIn* pr2_hardware_interface::HardwareInterface::getAnalogIn ( const std::string &  name) const
inline

Get a pointer to the analog-in device by name.

Parameters
nameThe name of the analog-in device
Returns
A pointer to an AnalogIn. Returns NULL if name is not valid.

Definition at line 516 of file hardware_interface.h.

◆ getCustomHW()

CustomHW* pr2_hardware_interface::HardwareInterface::getCustomHW ( const std::string &  name) const
inline

Get a pointer to the Custom Hardware device by name.

Parameters
nameThe name of the Custom Hardware device
Returns
A pointer to a CustomHW. Returns NULL if name is not valid.

Definition at line 526 of file hardware_interface.h.

◆ getDigitalOut()

DigitalOut* pr2_hardware_interface::HardwareInterface::getDigitalOut ( const std::string &  name) const
inline

Get a pointer to the digital I/O by name.

Parameters
nameThe name of the digital I/O
Returns
A pointer to an DigitalOut. Returns NULL if name is not valid.

Definition at line 496 of file hardware_interface.h.

◆ getForceTorque()

ForceTorque* pr2_hardware_interface::HardwareInterface::getForceTorque ( const std::string &  name) const
inline

Get a pointer to the FT sensor by name.

Parameters
nameThe name of the FT sensor
Returns
A pointer to a FT sensor. Returns NULL if name is not valid.

Definition at line 486 of file hardware_interface.h.

◆ getPressureSensor()

PressureSensor* pr2_hardware_interface::HardwareInterface::getPressureSensor ( const std::string &  name) const
inline

Get a pointer to the pressure sensor by name.

Parameters
nameThe name of the pressure sensor
Returns
A pointer to a PressureSensor. Returns NULL if name is not valid.

Definition at line 466 of file hardware_interface.h.

◆ getProjector()

Projector* pr2_hardware_interface::HardwareInterface::getProjector ( const std::string &  name) const
inline

Get a pointer to the projector by name.

Parameters
nameThe name of the projector
Returns
A pointer to an Projector. Returns NULL if name is not valid.

Definition at line 506 of file hardware_interface.h.

Member Data Documentation

◆ accelerometers_

AccelerometerMap pr2_hardware_interface::HardwareInterface::accelerometers_

Definition at line 445 of file hardware_interface.h.

◆ actuators_

ActuatorMap pr2_hardware_interface::HardwareInterface::actuators_

Definition at line 443 of file hardware_interface.h.

◆ analog_ins_

AnalogInMap pr2_hardware_interface::HardwareInterface::analog_ins_

Definition at line 449 of file hardware_interface.h.

◆ current_time_

ros::Time pr2_hardware_interface::HardwareInterface::current_time_

The time at which the commands were sent to the hardware.

Definition at line 619 of file hardware_interface.h.

◆ custom_hws_

CustomHWMap pr2_hardware_interface::HardwareInterface::custom_hws_

Definition at line 450 of file hardware_interface.h.

◆ digital_outs_

DigitalOutMap pr2_hardware_interface::HardwareInterface::digital_outs_

Definition at line 447 of file hardware_interface.h.

◆ ft_sensors_

ForceTorqueMap pr2_hardware_interface::HardwareInterface::ft_sensors_

Definition at line 446 of file hardware_interface.h.

◆ pressure_sensors_

PressureSensorMap pr2_hardware_interface::HardwareInterface::pressure_sensors_

Definition at line 444 of file hardware_interface.h.

◆ projectors_

ProjectorMap pr2_hardware_interface::HardwareInterface::projectors_

Definition at line 448 of file hardware_interface.h.


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


pr2_hardware_interface
Author(s): Eric Berger berger@willowgarage.com
autogenerated on Mon Mar 6 2023 03:49:16