iCub-main
Public Member Functions | Protected Attributes | List of all members
iCub::perception::SensorEncoders Class Reference

#include <sensors.h>

+ Inheritance diagram for iCub::perception::SensorEncoders:

Public Member Functions

bool configure (void *source, const yarp::os::Property &options)
 Configure the sensor. More...
 
bool getOutput (yarp::os::Value &in) const
 Retrieve the sensor joint value. More...
 
- Public Member Functions inherited from iCub::perception::Sensor
 Sensor ()
 Constructor. More...
 
std::string getName () const
 Retrieve the sensor name. More...
 
virtual ~Sensor ()
 Destructor. More...
 

Protected Attributes

int size
 
int index
 
- Protected Attributes inherited from iCub::perception::Sensor
std::string name
 
bool configured
 
void * source
 

Detailed Description

This class implements the reading of motor joints encoders.

Definition at line 166 of file sensors.h.

Member Function Documentation

◆ configure()

bool SensorEncoders::configure ( void *  source,
const yarp::os::Property &  options 
)
virtual

Configure the sensor.

Parameters
sourcea pointer to the yarp::dev::IEncoders interface.
optionsa Property containing the configuration parameters. Available options are:
name: the name of the sensor.
size: the size of the whole sensor data vector.
index: the index corresponding to the joint that needs to be sensed.
Returns
true/false on success/failure.

Implements iCub::perception::Sensor.

Definition at line 43 of file sensors.cpp.

◆ getOutput()

bool SensorEncoders::getOutput ( yarp::os::Value &  in) const
virtual

Retrieve the sensor joint value.

Parameters
ina value containing the current joint position.
Returns
true/false on success/failure.

Implements iCub::perception::Sensor.

Definition at line 59 of file sensors.cpp.

Member Data Documentation

◆ index

int iCub::perception::SensorEncoders::index
protected

Definition at line 170 of file sensors.h.

◆ size

int iCub::perception::SensorEncoders::size
protected

Definition at line 169 of file sensors.h.


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