kinematics-dynamics
Loading...
Searching...
No Matches
XTrainerDevice.hpp
1#ifndef __XTRAINER_DEVICE_HPP__
2#define __XTRAINER_DEVICE_HPP__
3
4#include "StreamingDevice.hpp"
5
6#include <yarp/dev/IJoypadController.h>
7#include <yarp/dev/PolyDriver.h>
8
9#include <kdl/frames.hpp>
10
11#include "ICartesianSolver.h"
12
13namespace roboticslab
14{
15
22{
23public:
24 XTrainerDevice(yarp::os::Searchable & config);
25
26 bool acquireInterfaces() override;
27 bool initialize(const ICartesianControl::config_map_t & params) override;
28 bool acquireData() override;
29 bool transformData(double scaling) override;
31 void sendMovementCommand(double timestamp) override;
32
33private:
34 yarp::dev::IJoypadController * iJoypadController {nullptr};
35 ICartesianSolver * iCartesianSolver {nullptr};
36 yarp::dev::PolyDriver solverDevice;
37
38 std::string kinematics;
39
40 std::vector<double> initialTcpOffset;
41 std::vector<double> initialDeviceOffset;
42
43 KDL::Frame H_base_device, H_ee_device, H_device_ee;
44
45 bool buttonClose {false};
46 bool buttonOpen {false};
47};
48
49} // namespace roboticslab
50
51#endif // __XTRAINER_DEVICE_HPP__
Actuator
Actuator control vocabs.
Definition ICartesianControl.h:72
Abstract base class for a cartesian solver.
Definition ICartesianSolver.h:19
Abstract class for a YARP streaming device.
Definition StreamingDevice.hpp:47
Represents an XTrainer-compatible device.
Definition XTrainerDevice.hpp:22
void sendMovementCommand(double timestamp) override
Sends movement command to the cartesian controller.
Definition XTrainerDevice.cpp:260
bool acquireInterfaces() override
Acquires plugin interfaces.
Definition XTrainerDevice.cpp:43
bool transformData(double scaling) override
Performs required operations on stored data.
Definition XTrainerDevice.cpp:187
ICartesianControl::Actuator getActuatorState() override
If actuator command data is available, return its current state.
Definition XTrainerDevice.cpp:231
bool initialize(const ICartesianControl::config_map_t &params) override
Perform any custom initialization needed. This method is called after the successful creation of the ...
Definition XTrainerDevice.cpp:87
bool acquireData() override
Acquires data from remote device.
Definition XTrainerDevice.cpp:148
The main, catch-all namespace for Robotics Lab UC3M.
Definition groups.dox:6