kinematics-dynamics
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
roboticslab::StreamingDevice Class Referenceabstract

Abstract class for a YARP streaming device.

#include <StreamingDevice.hpp>

Inheritance diagram for roboticslab::StreamingDevice:
roboticslab::InvalidDevice roboticslab::LeapMotionSensorDevice roboticslab::SpnavSensorDevice roboticslab::WiimoteSensorDevice

Public Member Functions

 StreamingDevice (yarp::os::Searchable &config)
 Constructor. More...
 
virtual ~StreamingDevice ()
 Destructor.
 
virtual bool acquireInterfaces ()=0
 Acquires plugin interfaces. More...
 
virtual bool initialize (bool usingStreamingPreset)
 Perform any custom initialization needed. This method is called after the successful creation of the device and once all interface handles are acquired. More...
 
virtual bool acquireData ()=0
 Acquires data from remote device. More...
 
virtual bool transformData (double scaling)
 Performs required operations on stored data. More...
 
virtual int getActuatorState ()
 If actuator command data is available, return its current state. More...
 
virtual bool hasValidMovementData () const
 Checks whether the device may forward acquired and processed data to the controller. More...
 
virtual void sendMovementCommand (double timestamp)=0
 Sends movement command to the cartesian controller. More...
 
virtual void stopMotion ()=0
 Sends a movement command that would stop motion.
 
void setCartesianControllerHandle (ICartesianControl *iCartesianControl)
 Stores handle to an ICartesianControl instance. More...
 

Protected Attributes

ICartesianControliCartesianControl
 
std::vector< double > data
 
std::vector< bool > fixedAxes
 
int actuatorState
 

Private Member Functions

void configureFixedAxes (const yarp::os::Value &v)
 Stores vector of values representing axes that are always fixed.
 

Private Attributes

friend CentroidTransform
 

Constructor & Destructor Documentation

◆ StreamingDevice()

StreamingDevice::StreamingDevice ( yarp::os::Searchable &  config)
Parameters
configList of options the YARP device should be opened with.

Member Function Documentation

◆ acquireData()

virtual bool roboticslab::StreamingDevice::acquireData ( )
pure virtual

◆ acquireInterfaces()

virtual bool roboticslab::StreamingDevice::acquireInterfaces ( )
pure virtual

◆ getActuatorState()

virtual int roboticslab::StreamingDevice::getActuatorState ( )
inlinevirtual
Returns
integer value describing current actuator state

Reimplemented in roboticslab::SpnavSensorDevice, and roboticslab::LeapMotionSensorDevice.

◆ hasValidMovementData()

bool StreamingDevice::hasValidMovementData ( ) const
virtual
Returns
true if valid, false otherwise

Reimplemented in roboticslab::WiimoteSensorDevice, and roboticslab::SpnavSensorDevice.

◆ initialize()

virtual bool roboticslab::StreamingDevice::initialize ( bool  usingStreamingPreset)
inlinevirtual
Parameters
usingStreamingPresetWhether the cartesian controller supports streaming command presets or not.
Returns
true on success, false otherwise

Reimplemented in roboticslab::WiimoteSensorDevice, roboticslab::SpnavSensorDevice, and roboticslab::LeapMotionSensorDevice.

◆ sendMovementCommand()

virtual void roboticslab::StreamingDevice::sendMovementCommand ( double  timestamp)
pure virtual

◆ setCartesianControllerHandle()

void roboticslab::StreamingDevice::setCartesianControllerHandle ( ICartesianControl iCartesianControl)
inline
Parameters
iCartesianControlHandle to an ICartesianControl instance.

◆ transformData()

bool StreamingDevice::transformData ( double  scaling)
virtual
Parameters
scalingScaling factor applied to each data value.
Returns
true on success, false otherwise

Reimplemented in roboticslab::WiimoteSensorDevice, roboticslab::SpnavSensorDevice, and roboticslab::LeapMotionSensorDevice.


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