AUTh-ARL Core Stack
0.7
|
An abstract class that implements a robot sensor. More...
#include <sensor.h>
Public Types | |
enum | Type { FT_SENSOR, FORCE_SENSOR } |
Different sensor types. More... | |
Public Member Functions | |
Sensor () | |
Empty constructor. More... | |
Sensor (const std::string &name="Unnamed") | |
Default constructor. More... | |
virtual void | getData (KDL::JntArray &output) |
Reads the current joint positions to the robot using KDL. More... | |
virtual void | getData (arma::vec &output) |
Reads the current joint positions from the robot using Armadillo. More... | |
virtual Eigen::Vector6d | getData (const Eigen::Matrix3d &rotation) |
virtual void | getData (Eigen::VectorXd &output) |
Reads the current joint positions from the robot using Eigen. More... | |
std::string | getName () |
Returns the name of the sensor. More... | |
virtual bool | isOk () |
Returns if the robot sensor is ok and operable. Should be implemented according to the robot in use. More... | |
Public Attributes | |
double | cycle |
The control cycle of the robot sensor. More... | |
std::string | alias |
The alias of the robot sensor, which is the name in lower case without spaces. More... | |
Type | type |
std::string | frame_id |
Protected Member Functions | |
void | throwFunctionIsNotImplemented (std::string function_name) |
Protected Attributes | |
std::string | sensor_name |
The name of the robot sensor. More... | |
An abstract class that implements a robot sensor.
This class encaptulates functionalities that abstracts any robot sensor. The core functionalities are initialize and read from the robot sensor. This API class aims to support multiple client libraries like KDL, Armadillo or Eigen.
arl::robot::Sensor::Sensor | ( | ) |
Empty constructor.
|
explicit |
Default constructor.
name | The name of the robot sensor. Defaults to "Unnamed" |
|
virtual |
Reads the current joint positions to the robot using KDL.
output | The output given by the robot sensor |
Reimplemented in ati::sensor::Sensor.
|
virtual |
Reads the current joint positions from the robot using Armadillo.
output | The output given by the robot sensor |
Reimplemented in ati::sensor::Sensor.
|
inlinevirtual |
Reimplemented in ati::sensor::Sensor.
|
virtual |
Reads the current joint positions from the robot using Eigen.
output | The output given by the robot sensor |
Reimplemented in ati::sensor::Sensor.
std::string arl::robot::Sensor::getName | ( | ) |
Returns the name of the sensor.
|
virtual |
Returns if the robot sensor is ok and operable. Should be implemented according to the robot in use.
Reimplemented in ati::sensor::Sensor.
|
protected |
Prints a warning that the function is not implemented by the derived class.
std::string arl::robot::Sensor::alias |
The alias of the robot sensor, which is the name in lower case without spaces.
double arl::robot::Sensor::cycle |
The control cycle of the robot sensor.
Can be reading it online by the robot sensor or setted by the contructor of your robot.
std::string arl::robot::Sensor::frame_id |
|
protected |
The name of the robot sensor.
Type arl::robot::Sensor::type |