yarp-devices
Public Member Functions | Protected Attributes | List of all members
roboticslab::LeapMotionSensor Class Reference

Implementation for the LeapMotionSensor controller. More...

#include <LeapMotionSensor.hpp>

Inheritance diagram for roboticslab::LeapMotionSensor:

Public Member Functions

bool open (yarp::os::Searchable &config) override
 
bool close () override
 
int read (yarp::sig::Vector &out) override
 
int getState (int ch) override
 
int getChannels () override
 
int calibrateSensor () override
 
int calibrateSensor (const yarp::sig::Vector &value) override
 
int calibrateChannel (int ch) override
 
int calibrateChannel (int ch, double value) override
 

Protected Attributes

Leap::Controller * controller
 
int32_t currentHandId
 
yarp::sig::Vector lastValidData
 

Detailed Description

Launch as in:

yarpdev --device LeapMotionSensor --period 5 --name /leapmotion

Member Function Documentation

◆ calibrateChannel() [1/2]

int LeapMotionSensor::calibrateChannel ( int  ch)
override

Calibrates one single channel.

Parameters
chchannel number.
Returns
status.

◆ calibrateChannel() [2/2]

int LeapMotionSensor::calibrateChannel ( int  ch,
double  value 
)
override

Calibrates one single channel, using a calibration value.

Parameters
chchannel number.
valuecalibration value.
Returns
status.

◆ calibrateSensor() [1/2]

int LeapMotionSensor::calibrateSensor ( )
override

Calibrates the whole sensor.

Returns
status.

◆ calibrateSensor() [2/2]

int LeapMotionSensor::calibrateSensor ( const yarp::sig::Vector &  value)
override

Calibrates the whole sensor, using an vector of calibration values.

Parameters
valuea vector of calibration values.
Returns
status.

◆ getChannels()

int LeapMotionSensor::getChannels ( )
override

Get the number of channels of the sensor.

Returns
number of channels (0 in case of errors).

◆ getState()

int LeapMotionSensor::getState ( int  ch)
override

Check the state value of a given channel.

Parameters
chchannel number.
Returns
status.

◆ read()

int LeapMotionSensor::read ( yarp::sig::Vector &  out)
override

Read a vector from the sensor.

Parameters
outa vector containing the sensor's last readings.
Returns
AS_OK or return code. AS_TIMEOUT if the sensor timed-out.

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