yarp-devices
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
SpaceNavigator Class Reference

Implementation for the SpaceNavigator 3D mouse. More...

#include <SpaceNavigator.hpp>

Inheritance diagram for SpaceNavigator:
SpaceNavigator_ParamsParser

Public Member Functions

bool open (yarp::os::Searchable &config) override
 
bool close () override
 
void run () override
 
bool getAxisCount (unsigned int &axis_count) override
 
bool getButtonCount (unsigned int &button_count) override
 
bool getTrackballCount (unsigned int &trackball_count) override
 
bool getHatCount (unsigned int &hat_count) override
 
bool getTouchSurfaceCount (unsigned int &touch_count) override
 
bool getStickCount (unsigned int &stick_count) override
 
bool getStickDoF (unsigned int stick_id, unsigned int &DoF) override
 
bool getButton (unsigned int button_id, float &value) override
 
bool getTrackball (unsigned int trackball_id, yarp::sig::Vector &value) override
 
bool getHat (unsigned int hat_id, unsigned char &value) override
 
bool getAxis (unsigned int axis_id, double &value) override
 
bool getStick (unsigned int stick_id, yarp::sig::Vector &value, yarp::dev::IJoypadController::JoypadCtrl_coordinateMode coordinate_mode) override
 
bool getTouch (unsigned int touch_id, yarp::sig::Vector &value) override
 
- Public Member Functions inherited from SpaceNavigator_ParamsParser
bool parseParams (const yarp::os::Searchable &config) override
 
std::string getDeviceClassName () const override
 
std::string getDeviceName () const override
 
std::string getDocumentationOfDeviceParams () const override
 
std::vector< std::string > getListOfParams () const override
 

Private Attributes

double dx {0.0}
 
double dy {0.0}
 
double dz {0.0}
 
double drx {0.0}
 
double dry {0.0}
 
double drz {0.0}
 
float button1 {0.f}
 
float button2 {0.f}
 
double deadband {0.0}
 
std::mutex mtx
 

Additional Inherited Members

- Public Attributes inherited from SpaceNavigator_ParamsParser
const std::string m_device_classname = {"SpaceNavigator"}
 
const std::string m_device_name = {"SpaceNavigator"}
 
bool m_parser_is_strict = false
 
const parser_version_type m_parser_version = {}
 
const std::string m_deadband_defaultValue = {"0.125"}
 
const std::string m_fullScaleX_defaultValue = {"460.0"}
 
const std::string m_fullScaleY_defaultValue = {"430.0"}
 
const std::string m_fullScaleZ_defaultValue = {"440.0"}
 
const std::string m_fullScaleRX_defaultValue = {"415.0"}
 
const std::string m_fullScaleRY_defaultValue = {"405.0"}
 
const std::string m_fullScaleRZ_defaultValue = {"435.0"}
 
const std::string m_maxNoDataIterations_defaultValue = {"100"}
 
double m_deadband = {0.125}
 
double m_fullScaleX = {460.0}
 
double m_fullScaleY = {430.0}
 
double m_fullScaleZ = {440.0}
 
double m_fullScaleRX = {415.0}
 
double m_fullScaleRY = {405.0}
 
double m_fullScaleRZ = {435.0}
 
int m_maxNoDataIterations = {100}
 

Detailed Description

Launch as in:

yarpdev --device SpaceNavigator --period 5 --name /spacenavigator

You can split mouse and button output into separate channels with:

yarpdev --device SpaceNavigator --period 5 --name /spacenavigator --ports "(mouse:o buttons:o)" --channels 8 --mouse:o 0 5 0 5 --buttons:o 6 7 0 1

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