kinematics-dynamics
Loading...
Searching...
No Matches
SpnavSensorDevice.hpp
1#ifndef __SPNAV_SENSOR_DEVICE_HPP__
2#define __SPNAV_SENSOR_DEVICE_HPP__
3
4#include "StreamingDevice.hpp"
5
6#include <yarp/dev/IAnalogSensor.h>
7
8namespace roboticslab
9{
10
18{
19public:
21 SpnavSensorDevice(yarp::os::Searchable & config, bool usingMovi, double gain = 0.0);
22
23 bool acquireInterfaces() override;
24
25 bool initialize(bool usingStreamingPreset) override;
26
27 bool acquireData() override;
28
29 bool transformData(double scaling) override;
30
31 int getActuatorState() override;
32
33 bool hasValidMovementData() const override;
34
35 void sendMovementCommand(double timestamp) override;
36
37 void stopMotion() override;
38
39private:
40 yarp::dev::IAnalogSensor * iAnalogSensor;
41
42 std::vector<double> currentX;
43
44 bool usingPose;
45 double gain;
46 bool buttonClose;
47 bool buttonOpen;
48};
49
50} // namespace roboticslab
51
52#endif // __SPNAV_SENSOR_DEVICE_HPP__
Represents a spacenav-compatible device, like the SpaceNavigator 6-DOF mouse from 3Dconnexion.
Definition SpnavSensorDevice.hpp:18
bool acquireData() override
Acquires data from remote device.
Definition SpnavSensorDevice.cpp:66
void stopMotion() override
Sends a movement command that would stop motion.
Definition SpnavSensorDevice.cpp:183
void sendMovementCommand(double timestamp) override
Sends movement command to the cartesian controller.
Definition SpnavSensorDevice.cpp:166
bool transformData(double scaling) override
Performs required operations on stored data.
Definition SpnavSensorDevice.cpp:93
bool acquireInterfaces() override
Acquires plugin interfaces.
Definition SpnavSensorDevice.cpp:19
int getActuatorState() override
If actuator command data is available, return its current state.
Definition SpnavSensorDevice.cpp:117
bool initialize(bool usingStreamingPreset) override
Perform any custom initialization needed. This method is called after the successful creation of the ...
Definition SpnavSensorDevice.cpp:32
bool hasValidMovementData() const override
Checks whether the device may forward acquired and processed data to the controller.
Definition SpnavSensorDevice.cpp:146
Abstract class for a YARP streaming device.
Definition StreamingDevice.hpp:46
The main, catch-all namespace for Robotics Lab UC3M.
Definition groups.dox:6