6#ifndef YARP_DEVICE_FAKE_MOTIONCONTROLMICRO
7#define YARP_DEVICE_FAKE_MOTIONCONTROLMICRO
55 std::recursive_mutex _mutex;
58 double *_angleToEncoder;
59 double *_encodersStamp;
61 std::string *_axisName;
65 bool useRawEncoderData;
69 int *_controlModes =
nullptr;
70 int *_hwfault_code =
nullptr;
71 std::string *_hwfault_message =
nullptr;
85 bool close()
override;
93 bool alloc(
int njoints);
125 bool getAxes(
int* ax)
override;
define control board standard interfaces
contains the definition of a Vector type
This class is the parameters parser for class FakeMotionControlMicro.
fakeMotionControlMicro: This device implements a minimal subset of mandatory interfaces to run with c...
void threadRelease() override
Release method.
bool getJointTypeRaw(int axis, yarp::dev::JointTypeEnum &type) override
bool getMotorEncoderSpeedRaw(int j, double *sp) override
Read the istantaneous speed of a motor encoder.
bool alloc(int njoints)
Allocated buffers.
bool setEncodersRaw(const double *vals) override
Set the value of all encoders.
bool getEncoderRaw(int j, double *v) override
Read the value of an encoder.
bool getNumberOfMotorEncodersRaw(int *num) override
Get the number of available motor encoders.
bool getMotorEncoderAccelerationsRaw(double *accs) override
Read the instantaneous acceleration of all motor encoders.
bool getAxes(int *ax) override
Get the number of controlled axes.
bool fromConfig(yarp::os::Searchable &config)
bool resetEncodersRaw() override
Reset encoders.
bool getMotorEncoderTimedRaw(int m, double *encs, double *stamp) override
Read the instantaneous position of a motor encoder.
bool resetEncoderRaw(int j) override
Reset encoder, single joint.
bool getEncoderSpeedsRaw(double *spds) override
Read the instantaneous acceleration of an axis.
bool close() override
Close the DeviceDriver.
bool getEncodersRaw(double *encs) override
Read the position of all axes.
bool getMotorEncodersRaw(double *encs) override
Read the position of all motor encoders.
bool getEncodersTimedRaw(double *encs, double *stamps) override
Read the instantaneous acceleration of all axes.
bool setMotorEncoderRaw(int j, double val) override
Set the value of the motor encoder for a given motor.
bool getMotorEncodersTimedRaw(double *encs, double *stamps) override
Read the instantaneous position of all motor encoders.
void run() override
Loop function.
void resizeBuffers()
Resize previously allocated buffers.
bool resetMotorEncodersRaw() override
Reset motor encoders.
~FakeMotionControlMicro()
bool open(yarp::os::Searchable &par) override
Open the DeviceDriver.
bool getEncoderTimedRaw(int j, double *encs, double *stamp) override
Read the instantaneous acceleration of all axes.
bool getMotorEncoderCountsPerRevolutionRaw(int m, double *v) override
Gets number of counts per revolution for motor encoder m.
bool getMotorEncoderRaw(int j, double *v) override
Read the value of a motor encoder.
bool setEncoderRaw(int j, double val) override
Set the value of the encoder for a given joint.
bool threadInit() override
Initialization method.
bool getEncoderAccelerationRaw(int j, double *spds) override
Read the instantaneous acceleration of an axis.
bool getEncoderSpeedRaw(int j, double *sp) override
Read the instantaneous speed of an axis.
bool getMotorEncoderAccelerationRaw(int j, double *spds) override
Read the instantaneous acceleration of a motor encoder.
bool setMotorEncodersRaw(const double *vals) override
Set the value of all motor encoders.
bool getAxisNameRaw(int axis, std::string &name) override
bool getMotorEncoderSpeedsRaw(double *spds) override
Read the instantaneous speed of all motor encoders.
virtual bool initialised()
bool resetMotorEncoderRaw(int j) override
Reset motor encoder, single motor.
bool setMotorEncoderCountsPerRevolutionRaw(int m, const double cpr) override
Sets number of counts per revolution for motor encoder m.
bool getEncoderAccelerationsRaw(double *accs) override
Read the instantaneous acceleration of all axes.
bool getLastJointFaultRaw(int j, int &fault, std::string &message) override
Interface implemented by all device drivers.
Interface for getting information about specific axes, if available.
Control board, extend encoder raw interface adding timestamps.
Interface for getting info about the fault which may occur on a robot.
Control board, encoder interface.
A simple collection of objects that can be described and transmitted in a portable way.
An abstraction for a periodic thread.
A base class for nested structures that can be searched.