kinematics-dynamics
Public Member Functions | Private Attributes | List of all members
roboticslab::SpnavSensorDevice Class Reference

Represents a spacenav-compatible device, like the SpaceNavigator 6-DOF mouse from 3Dconnexion.

#include <SpnavSensorDevice.hpp>

Inheritance diagram for roboticslab::SpnavSensorDevice:
roboticslab::StreamingDevice

Public Member Functions

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

Private Attributes

yarp::dev::IAnalogSensor * iAnalogSensor
 
std::vector< double > currentX
 
bool usingPose
 
double gain
 
bool buttonClose
 
bool buttonOpen
 

Additional Inherited Members

- Protected Attributes inherited from roboticslab::StreamingDevice
ICartesianControliCartesianControl
 
std::vector< double > data
 
std::vector< bool > fixedAxes
 
int actuatorState
 

Member Function Documentation

◆ acquireData()

bool SpnavSensorDevice::acquireData ( )
overridevirtual
Returns
true on success, false otherwise

Implements roboticslab::StreamingDevice.

◆ acquireInterfaces()

bool SpnavSensorDevice::acquireInterfaces ( )
overridevirtual
Returns
true on success, false otherwise

Implements roboticslab::StreamingDevice.

◆ getActuatorState()

int SpnavSensorDevice::getActuatorState ( )
overridevirtual
Returns
integer value describing current actuator state

Reimplemented from roboticslab::StreamingDevice.

◆ hasValidMovementData()

bool SpnavSensorDevice::hasValidMovementData ( ) const
overridevirtual
Returns
true if valid, false otherwise

Reimplemented from roboticslab::StreamingDevice.

◆ initialize()

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

Reimplemented from roboticslab::StreamingDevice.

◆ sendMovementCommand()

void SpnavSensorDevice::sendMovementCommand ( double  timestamp)
overridevirtual
Parameters
timestampCurrent timestamp.

Implements roboticslab::StreamingDevice.

◆ transformData()

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

Reimplemented from roboticslab::StreamingDevice.


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