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);
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.
yarp::dev::ReturnValue getMotorEncoderSpeedsRaw(double *spds) override
Read the instantaneous speed of all motor encoders.
yarp::dev::ReturnValue setMotorEncoderRaw(int j, double val) override
Set the value of the motor encoder for a given motor.
yarp::dev::ReturnValue resetEncoderRaw(int j) override
Reset encoder, single joint.
yarp::dev::ReturnValue getMotorEncoderAccelerationsRaw(double *accs) override
Read the instantaneous acceleration of all motor encoders.
bool alloc(int njoints)
Allocated buffers.
yarp::dev::ReturnValue getMotorEncodersTimedRaw(double *encs, double *stamps) override
Read the instantaneous position of all motor encoders.
bool fromConfig(yarp::os::Searchable &config)
yarp::dev::ReturnValue getAxes(size_t &ax) override
Get the number of controlled axes.
yarp::dev::ReturnValue getMotorEncoderSpeedRaw(int j, double *sp) override
Read the instantaneous speed of a motor encoder.
yarp::dev::ReturnValue getEncoderSpeedsRaw(double *spds) override
Read the instantaneous acceleration of an axis.
yarp::dev::ReturnValue getEncoderAccelerationsRaw(double *accs) override
Read the instantaneous acceleration of all axes.
yarp::dev::ReturnValue getMotorEncodersRaw(double *encs) override
Read the position of all motor encoders.
yarp::dev::ReturnValue getNumberOfMotorEncodersRaw(int *num) override
Get the number of available motor encoders.
yarp::dev::ReturnValue getJointTypeRaw(int axis, yarp::dev::JointTypeEnum &type) override
bool close() override
Close the DeviceDriver.
yarp::dev::ReturnValue resetMotorEncoderRaw(int j) override
Reset motor encoder, single motor.
yarp::dev::ReturnValue setMotorEncodersRaw(const double *vals) override
Set the value of all motor encoders.
yarp::dev::ReturnValue getAxisNameRaw(int axis, std::string &name) override
void run() override
Loop function.
yarp::dev::ReturnValue getMotorEncoderRaw(int j, double *v) override
Read the value of a motor encoder.
yarp::dev::ReturnValue setEncodersRaw(const double *vals) override
Set the value of all encoders.
yarp::dev::ReturnValue resetMotorEncodersRaw() override
Reset motor encoders.
void resizeBuffers()
Resize previously allocated buffers.
~FakeMotionControlMicro()
bool open(yarp::os::Searchable &par) override
Open the DeviceDriver.
yarp::dev::ReturnValue getMotorEncoderTimedRaw(int m, double *encs, double *stamp) override
Read the instantaneous position of a motor encoder.
bool threadInit() override
Initialization method.
yarp::dev::ReturnValue getMotorEncoderCountsPerRevolutionRaw(int m, double *v) override
Gets number of counts per revolution for motor encoder m.
yarp::dev::ReturnValue getEncodersRaw(double *encs) override
Read the position of all axes.
yarp::dev::ReturnValue getMotorEncoderAccelerationRaw(int j, double *spds) override
Read the instantaneous acceleration of a motor encoder.
yarp::dev::ReturnValue getEncodersTimedRaw(double *encs, double *stamps) override
Read the instantaneous acceleration of all axes.
yarp::dev::ReturnValue getEncoderTimedRaw(int j, double *encs, double *stamp) override
Read the instantaneous acceleration of all axes.
yarp::dev::ReturnValue getEncoderAccelerationRaw(int j, double *spds) override
Read the instantaneous acceleration of an axis.
yarp::dev::ReturnValue getEncoderRaw(int j, double *v) override
Read the value of an encoder.
yarp::dev::ReturnValue getEncoderSpeedRaw(int j, double *sp) override
Read the instantaneous speed of an axis.
virtual bool initialised()
yarp::dev::ReturnValue setEncoderRaw(int j, double val) override
Set the value of the encoder for a given joint.
yarp::dev::ReturnValue getLastJointFaultRaw(int j, int &fault, std::string &message) override
yarp::dev::ReturnValue resetEncodersRaw() override
Reset encoders.
yarp::dev::ReturnValue setMotorEncoderCountsPerRevolutionRaw(int m, const double cpr) override
Sets number of counts per revolution for motor encoder m.
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.