|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
30 #ifndef DynamixelAX12Driverh
31 #define DynamixelAX12Driverh
50 #define MOTION_COMPLETION_TOLERANCE 3
54 #define INST_PING 0x01
55 #define INST_READ 0x02
56 #define INST_WRITE 0x03
57 #define INST_REGWRITE 0x04
58 #define INST_ACTION 0x05
59 #define INST_RESET 0x06
60 #define INST_SYNCWRITE 0x83
63 #define AX12_BROADCAST_ID 0xFE
68 #define CT_MODEL_NUMBER 00
69 #define CT_FIRMWARE_VERSION 2
70 #define CT_RETURN_DELAY_TIME 5
71 #define CT_CW_ANGLE_LIMIT 06
72 #define CT_CWW_ANGLE_LIMIT 08
73 #define CT_LIMIT_TEMPERATURE_H 11
74 #define CT_LIMIT_VOLTAGE_L 12
75 #define CT_LIMIT_VOLTAGE_H 13
76 #define CT_MAX_TORQUE 14
77 #define CT_STATUS_RETURN_LEVEL 16
81 #define CT_TORQUE_ENABLE 24
82 #define CT_CW_COMP_MARGIN 26
83 #define CT_CWW_COMP_MARGIN 27
84 #define CT_CW_COMP_SLOPE 28
85 #define CT_CWW_COMP_SLOPE 29
86 #define CT_GOAL_POSITION 30
87 #define CT_MOVING_SPEED 32
88 #define CT_TORQUE_LIMIT 34
89 #define CT_PRESENT_POSITION 0x24
90 #define CT_PRESENT_SPEED 0x26
91 #define CT_PRESENT_LOAD 0x28
92 #define CT_PRESENT_VOLTAGE 42
93 #define CT_PRESENT_TEMPERATURE 43
94 #define CT_REG_INSTRUCTION 44
123 char description[100];
124 char manufacturer[100];
150 struct ftdi_context ftdic;
154 ErrorCode checkAnswerPacket(
unsigned char* packet,
const char*& message);
158 unsigned char *jointNumbers;
187 bool close()
override;
206 virtual int sendCommand(
unsigned char id,
unsigned char inst[],
int size,
unsigned char ret[],
int &retSize);
215 virtual int readParameter(
unsigned char id,
unsigned char param);
217 bool getAxes(
int *ax)
override;
222 bool positionMove(
int j,
double ref)
override;
223 bool positionMove(
const double *refs)
override;
224 bool relativeMove(
int j,
double delta)
override;
225 bool relativeMove(
const double *deltas)
override;
226 bool checkMotionDone(
int j,
bool *flag)
override;
227 bool checkMotionDone(
bool *flag)
override;
228 bool setRefSpeed(
int j,
double sp)
override;
229 bool setRefSpeeds(
const double *spds)
override;
230 bool setRefAcceleration(
int j,
double acc)
override;
231 bool setRefAccelerations(
const double *accs)
override;
232 bool getRefSpeed(
int j,
double *ref)
override;
233 bool getRefSpeeds(
double *spds)
override;
234 bool getRefAcceleration(
int j,
double *acc)
override;
235 bool getRefAccelerations(
double *accs)
override;
236 bool stop(
int j)
override;
237 bool stop()
override;
239 bool getRefTorques(
double *
t)
override;
240 bool getRefTorque(
int j,
double *
t)
override;
241 bool setTorques(
const double *
t);
242 bool setTorque(
int j,
double t);
243 bool setTorquePid(
int j,
const Pid &pid);
244 bool getTorque(
int j,
double *
t)
override;
245 bool getTorques(
double *
t)
override;
246 bool setTorquePids(
const Pid *pids);
247 bool setTorqueErrorLimit(
int j,
double limit);
248 bool setTorqueErrorLimits(
const double *limits);
249 bool getTorqueError(
int j,
double *err);
250 bool getTorqueErrors(
double *errs);
251 bool getTorquePidOutput(
int j,
double *out);
252 bool getTorquePidOutputs(
double *outs);
253 bool getTorquePid(
int j,
Pid *pid);
254 bool getTorquePids(
Pid *pids);
255 bool getTorqueErrorLimit(
int j,
double *limit);
256 bool getTorqueErrorLimits(
double *limits);
257 bool resetTorquePid(
int j);
258 bool disableTorquePid(
int j);
259 bool enableTorquePid(
int j);
260 bool setTorqueOffset(
int j,
double v);
262 bool getBemfParam(
int j,
double *bemf);
263 bool setBemfParam(
int j,
double bemf);
265 bool resetEncoder(
int j)
override;
266 bool resetEncoders()
override;
268 bool setEncoder(
int j,
double val)
override;
269 bool setEncoders(
const double *vals)
override;
273 bool getEncoder(
int j,
double *v)
override;
274 bool getEncoders(
double *encs)
override;
275 bool getEncoderSpeed(
int j,
double *sp)
override;
276 bool getEncoderSpeeds(
double *spds)
override;
277 bool getEncoderAcceleration(
int j,
double *spds)
override;
278 bool getEncoderAccelerations(
double *accs)
override;
281 bool setRefTorques(
const double*
t)
override;
283 bool setRefTorque(
int j,
double t)
override;
284 bool getTorqueRange(
int j,
double* min,
double* max)
override;
285 bool getTorqueRanges(
double* min,
double* max)
override;
288 bool positionMove(
const int n_joint,
const int *joints,
const double *refs)
override;
289 bool relativeMove(
const int n_joint,
const int *joints,
const double *deltas)
override;
290 bool checkMotionDone(
const int n_joint,
const int *joints,
bool *flag)
override;
291 bool setRefSpeeds(
const int n_joint,
const int *joints,
const double *spds)
override;
292 bool setRefAccelerations(
const int n_joint,
const int *joints,
const double *accs)
override;
293 bool getRefSpeeds(
const int n_joint,
const int *joints,
double *spds)
override;
294 bool getRefAccelerations(
const int n_joint,
const int *joints,
double *accs)
override;
295 bool stop(
const int n_joint,
const int *joints)
override;
302 struct ftdi_device_list *devlist;
303 struct ftdi_device_list *curdev;
307 int normalisePosition(
double position);
308 int normaliseSpeed(
double speed);
317 int syncSendCommand(
unsigned char id,
unsigned char inst[],
int size,
unsigned char ret[],
int &retSize);
A simple collection of objects that can be described and transmitted in a portable way.
A base class for nested structures that can be searched.
Control board, encoder interface.
Interface implemented by all device drivers.
define control board standard interfaces
unsigned int write_chunksize
FtdiDeviceSettings contains information to identify specific device Such a device can contain informa...
An interface for the device drivers.
virtual bool setRefTorques(const double *t)=0
Set the reference value of the torque for all joints.
dynamixelAX12Ftdi: Documentation to be added
unsigned int read_chunksize
An interface to the operating system, including Port based communication.
Contains the parameters for a PID.
Interface for control boards implementing torque control.
Interface for a generic control board device implementing position control.