27#ifndef DynamixelAX12Driverh
28#define DynamixelAX12Driverh
47#define MOTION_COMPLETION_TOLERANCE 3
53#define INST_WRITE 0x03
54#define INST_REGWRITE 0x04
55#define INST_ACTION 0x05
56#define INST_RESET 0x06
57#define INST_SYNCWRITE 0x83
60#define AX12_BROADCAST_ID 0xFE
65#define CT_MODEL_NUMBER 00
66#define CT_FIRMWARE_VERSION 2
67#define CT_RETURN_DELAY_TIME 5
68#define CT_CW_ANGLE_LIMIT 06
69#define CT_CWW_ANGLE_LIMIT 08
70#define CT_LIMIT_TEMPERATURE_H 11
71#define CT_LIMIT_VOLTAGE_L 12
72#define CT_LIMIT_VOLTAGE_H 13
73#define CT_MAX_TORQUE 14
74#define CT_STATUS_RETURN_LEVEL 16
78#define CT_TORQUE_ENABLE 24
79#define CT_CW_COMP_MARGIN 26
80#define CT_CWW_COMP_MARGIN 27
81#define CT_CW_COMP_SLOPE 28
82#define CT_CWW_COMP_SLOPE 29
83#define CT_GOAL_POSITION 30
84#define CT_MOVING_SPEED 32
85#define CT_TORQUE_LIMIT 34
86#define CT_PRESENT_POSITION 0x24
87#define CT_PRESENT_SPEED 0x26
88#define CT_PRESENT_LOAD 0x28
89#define CT_PRESENT_VOLTAGE 42
90#define CT_PRESENT_TEMPERATURE 43
91#define CT_REG_INSTRUCTION 44
151 ErrorCode checkAnswerPacket(
unsigned char*
packet,
const char*& message);
155 unsigned char *jointNumbers;
184 bool close()
override;
212 virtual int readParameter(
unsigned char id,
unsigned char param);
233 bool stop(
int j)
override;
234 bool stop()
override;
304 int normalisePosition(
double position);
305 int normaliseSpeed(
double speed);
314 int syncSendCommand(
unsigned char id,
unsigned char inst[],
int size,
unsigned char ret[],
int &
retSize);
define control board standard interfaces
dynamixelAX12Ftdi: Documentation to be added
bool setRefAccelerations(const double *accs) override
not implemented
bool resetTorquePid(int j)
bool getEncoderSpeed(int j, double *sp) override
Read the istantaneous speed of an axis.
bool setTorquePid(int j, const Pid &pid)
bool getTorquePid(int j, Pid *pid)
bool setTorqueOffset(int j, double v)
bool close() override
Close device Closes the device and shuts down connection.
bool configure(yarp::os::Searchable &config)
Configure device online Configures parts of the device that can be configures online.
bool getTorque(int j, double *t) override
Get the value of the torque on a given joint (this is the feedback if you have a torque sensor).
bool setTorqueErrorLimits(const double *limits)
bool setTorque(int j, double t)
virtual int sendCommand(unsigned char id, unsigned char inst[], int size, unsigned char ret[], int &retSize)
Send instruction to device Send an instruction to a device of given ID.
bool setTorquePids(const Pid *pids)
bool getBemfParam(int j, double *bemf)
virtual int readParameter(unsigned char id, unsigned char param)
Read parameter from motor Requests the value of a parameter from motor.
bool resetEncoder(int j) override
Reset encoder, single joint.
bool getTorquePidOutputs(double *outs)
bool setTorques(const double *t)
bool getRefTorque(int j, double *t) override
Get the reference value of the torque for a given joint.
bool setRefAcceleration(int j, double acc) override
not implemented
bool setEncoders(const double *vals) override
Set the value of all encoders.
bool getEncoder(int j, double *v) override
Get the angle of servo.
bool getTorqueError(int j, double *err)
bool setRefTorque(int j, double t) override
Set the reference value of the torque for a given joint.
bool getRefSpeeds(double *spds) override
Get reference speed of all joints.
bool getEncoderAccelerations(double *accs) override
Read the instantaneous acceleration of all axes.
bool setEncoder(int j, double val) override
Set the value of the encoder for a given joint.
bool getTorqueErrorLimits(double *limits)
bool setRefTorques(const double *t) override
Set the reference value of the torque for all joints.
bool getEncoders(double *encs) override
Read the position of all axes.
bool getRefSpeed(int j, double *ref) override
Get reference speed for a joint.
bool checkMotionDone(int j, bool *flag) override
Check if the current trajectory is terminated.
bool getEncoderSpeeds(double *spds) override
Read the instantaneous speed of all axes.
bool disableTorquePid(int j)
bool open(yarp::os::Searchable &config) override
Open device Opens and configures the device.
DynamixelAX12FtdiDriver()
Constructor Initializes handle but doesn't open channel yet.
virtual ~DynamixelAX12FtdiDriver()
Destructor Closes connection and destroys device object.
bool getTorqueRange(int j, double *min, double *max) override
Get the full scale of the torque sensor of a given joint.
bool getTorqueErrors(double *errs)
bool getAxes(int *ax) override
Get the number of controlled axes.
bool getRefAccelerations(double *accs) override
not implemented
bool resetEncoders() override
Reset encoders.
bool setTorqueErrorLimit(int j, double limit)
bool enableTorquePid(int j)
bool setBemfParam(int j, double bemf)
bool getEncoderAcceleration(int j, double *spds) override
Read the instantaneous acceleration of an axis.
bool setRefSpeeds(const double *spds) override
Set reference speed on all joints.
bool getTorques(double *t) override
Get the value of the torque for all joints (this is the feedback if you have torque sensors).
bool stop() override
Stop motion, multiple joints.
bool positionMove(int j, double ref) override
bool getRefTorques(double *t) override
Get the reference value of the torque for all joints.
bool getTorqueErrorLimit(int j, double *limit)
bool getTorquePids(Pid *pids)
bool getRefAcceleration(int j, double *acc) override
not implemented
bool getTorqueRanges(double *min, double *max) override
Get the full scale of the torque sensors of all joints.
bool getTorquePidOutput(int j, double *out)
bool relativeMove(int j, double delta) override
Set relative position.
bool setRefSpeed(int j, double sp) override
Set reference speed for a joint, this is the speed used during the interpolation of the trajectory.
FtdiDeviceSettings contains information to identify specific device Such a device can contain informa...
unsigned int write_chunksize
unsigned int read_chunksize
Interface implemented by all device drivers.
Control board, encoder interface.
Interface for a generic control board device implementing position control.
Interface for control boards implementing torque control.
virtual bool setRefTorques(const double *t)=0
Set the reference value of the torque for all joints.
Contains the parameters for a PID.
A simple collection of objects that can be described and transmitted in a portable way.
A mini-server for performing network communication in the background.
A base class for nested structures that can be searched.
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.