dynamixelAX12Ftdi
: Documentation to be added
More...
#include <DynamixelAX12Ftdi/DynamixelAX12FtdiDriver.h>
Public Member Functions | |
DynamixelAX12FtdiDriver () | |
Constructor Initializes handle but doesn't open channel yet. More... | |
virtual | ~DynamixelAX12FtdiDriver () |
Destructor Closes connection and destroys device object. More... | |
bool | open (yarp::os::Searchable &config) override |
Open device Opens and configures the device. More... | |
bool | close () override |
Close device Closes the device and shuts down connection. More... | |
bool | configure (yarp::os::Searchable &config) override |
Configure device online Configures parts of the device that can be configures online. More... | |
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. More... | |
virtual int | readParameter (unsigned char id, unsigned char param) |
Read parameter from motor Requests the value of a parameter from motor. More... | |
bool | getAxes (int *ax) override |
Get the number of controlled axes. More... | |
bool | positionMove (int j, double ref) override |
bool | positionMove (const double *refs) override |
bool | relativeMove (int j, double delta) override |
Set relative position. More... | |
bool | relativeMove (const double *deltas) override |
Set relative position, all joints. More... | |
bool | checkMotionDone (int j, bool *flag) override |
Check if the current trajectory is terminated. More... | |
bool | checkMotionDone (bool *flag) override |
Check if the current trajectory is terminated. More... | |
bool | setRefSpeed (int j, double sp) override |
Set reference speed for a joint, this is the speed used during the interpolation of the trajectory. More... | |
bool | setRefSpeeds (const double *spds) override |
Set reference speed on all joints. More... | |
bool | setRefAcceleration (int j, double acc) override |
not implemented More... | |
bool | setRefAccelerations (const double *accs) override |
not implemented More... | |
bool | getRefSpeed (int j, double *ref) override |
Get reference speed for a joint. More... | |
bool | getRefSpeeds (double *spds) override |
Get reference speed of all joints. More... | |
bool | getRefAcceleration (int j, double *acc) override |
not implemented More... | |
bool | getRefAccelerations (double *accs) override |
not implemented More... | |
bool | stop (int j) override |
Stop motion, single joint. More... | |
bool | stop () override |
Stop motion, multiple joints. More... | |
bool | getRefTorques (double *t) override |
Get the reference value of the torque for all joints. More... | |
bool | getRefTorque (int j, double *t) override |
Get the reference value of the torque for a given joint. More... | |
bool | setTorques (const double *t) |
bool | setTorque (int j, double t) |
bool | setTorquePid (int j, const Pid &pid) |
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). More... | |
bool | getTorques (double *t) override |
Get the value of the torque for all joints (this is the feedback if you have torque sensors). More... | |
bool | setTorquePids (const Pid *pids) |
bool | setTorqueErrorLimit (int j, double limit) |
bool | setTorqueErrorLimits (const double *limits) |
bool | getTorqueError (int j, double *err) |
bool | getTorqueErrors (double *errs) |
bool | getTorquePidOutput (int j, double *out) |
bool | getTorquePidOutputs (double *outs) |
bool | getTorquePid (int j, Pid *pid) |
bool | getTorquePids (Pid *pids) |
bool | getTorqueErrorLimit (int j, double *limit) |
bool | getTorqueErrorLimits (double *limits) |
bool | resetTorquePid (int j) |
bool | disableTorquePid (int j) |
bool | enableTorquePid (int j) |
bool | setTorqueOffset (int j, double v) |
bool | getBemfParam (int j, double *bemf) |
bool | setBemfParam (int j, double bemf) |
bool | resetEncoder (int j) override |
Reset encoder, single joint. More... | |
bool | resetEncoders () override |
Reset encoders. More... | |
bool | setEncoder (int j, double val) override |
Set the value of the encoder for a given joint. More... | |
bool | setEncoders (const double *vals) override |
Set the value of all encoders. More... | |
bool | getEncoder (int j, double *v) override |
Get the angle of servo. More... | |
bool | getEncoders (double *encs) override |
Read the position of all axes. More... | |
bool | getEncoderSpeed (int j, double *sp) override |
Read the istantaneous speed of an axis. More... | |
bool | getEncoderSpeeds (double *spds) override |
Read the instantaneous speed of all axes. More... | |
bool | getEncoderAcceleration (int j, double *spds) override |
Read the instantaneous acceleration of an axis. More... | |
bool | getEncoderAccelerations (double *accs) override |
Read the instantaneous acceleration of all axes. More... | |
bool | setRefTorques (const double *t) override |
Set the reference value of the torque for all joints. More... | |
bool | setRefTorque (int j, double t) override |
Set the reference value of the torque for a given joint. More... | |
bool | getTorqueRange (int j, double *min, double *max) override |
Get the full scale of the torque sensor of a given joint. More... | |
bool | getTorqueRanges (double *min, double *max) override |
Get the full scale of the torque sensors of all joints. More... | |
bool | positionMove (const int n_joint, const int *joints, const double *refs) override |
Set new reference point for a subset of joints. More... | |
bool | relativeMove (const int n_joint, const int *joints, const double *deltas) override |
Set relative position for a subset of joints. More... | |
bool | checkMotionDone (const int n_joint, const int *joints, bool *flag) override |
Check if the current trajectory is terminated. More... | |
bool | setRefSpeeds (const int n_joint, const int *joints, const double *spds) override |
Set reference speed on all joints. More... | |
bool | setRefAccelerations (const int n_joint, const int *joints, const double *accs) override |
Set reference acceleration on all joints. More... | |
bool | getRefSpeeds (const int n_joint, const int *joints, double *spds) override |
Get reference speed of all joints. More... | |
bool | getRefAccelerations (const int n_joint, const int *joints, double *accs) override |
Get reference acceleration for a joint. More... | |
bool | stop (const int n_joint, const int *joints) override |
Stop motion for subset of joints. More... | |
Public Member Functions inherited from yarp::dev::DeviceDriver | |
~DeviceDriver () override=default | |
Destructor. More... | |
template<class T > | |
bool | view (T *&x) |
Get an interface to the device driver. More... | |
virtual DeviceDriver * | getImplementation () |
Some drivers are bureaucrats, pointing at others. More... | |
Public Member Functions inherited from yarp::os::IConfig | |
virtual | ~IConfig () |
Destructor. More... | |
Public Member Functions inherited from yarp::dev::IPositionControl | |
virtual | ~IPositionControl () |
Destructor. More... | |
virtual bool | getTargetPosition (const int joint, double *ref) |
Get the last position reference for the specified axis. More... | |
virtual bool | getTargetPositions (double *refs) |
Get the last position reference for all axes. More... | |
virtual bool | getTargetPositions (const int n_joint, const int *joints, double *refs) |
Get the last position reference for the specified group of axes. More... | |
Public Member Functions inherited from yarp::dev::ITorqueControl | |
virtual | ~ITorqueControl () |
Destructor. More... | |
virtual bool | setRefTorques (const int n_joint, const int *joints, const double *t) |
Set new torque reference for a subset of joints. More... | |
virtual bool | getMotorTorqueParams (int j, yarp::dev::MotorTorqueParameters *params) |
Get a subset of motor parameters (bemf, ktau etc) useful for torque control. More... | |
virtual bool | setMotorTorqueParams (int j, const yarp::dev::MotorTorqueParameters params) |
Set a subset of motor parameters (bemf, ktau etc) useful for torque control. More... | |
Public Member Functions inherited from yarp::dev::IEncoders | |
virtual | ~IEncoders () |
Destructor. More... | |
dynamixelAX12Ftdi
: Documentation to be added
Definition at line 142 of file DynamixelAX12FtdiDriver.h.
DynamixelAX12FtdiDriver::DynamixelAX12FtdiDriver | ( | ) |
Constructor Initializes handle but doesn't open channel yet.
Definition at line 30 of file DynamixelAX12FtdiDriver.cpp.
|
virtual |
Destructor Closes connection and destroys device object.
Definition at line 60 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Check if the current trajectory is terminated.
Non blocking.
flag | is a pointer to return value ("and" of all joints) |
Implements yarp::dev::IPositionControl.
Definition at line 449 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Check if the current trajectory is terminated.
Non blocking.
joints | pointer to the array of joint numbers |
flag | pointer to return value (logical "and" of all set of joints) |
Implements yarp::dev::IPositionControl.
Definition at line 916 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Check if the current trajectory is terminated.
Non blocking.
j | is the axis number |
flag | is a pointer to return value |
Implements yarp::dev::IPositionControl.
Definition at line 440 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Close device Closes the device and shuts down connection.
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 182 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Configure device online Configures parts of the device that can be configures online.
config | Config file containing string pairs for parameters |
Reimplemented from yarp::os::IConfig.
Definition at line 202 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::disableTorquePid | ( | int | j | ) |
Definition at line 708 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::enableTorquePid | ( | int | j | ) |
Definition at line 713 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Get the number of controlled axes.
This command asks the number of controlled axes for the current physical interface.
Implements yarp::dev::IEncoders.
Definition at line 392 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::getBemfParam | ( | int | j, |
double * | bemf | ||
) |
Definition at line 723 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Get the angle of servo.
Implements yarp::dev::IEncoders.
Definition at line 765 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Read the instantaneous acceleration of an axis.
j | axis number |
spds | pointer to the array that will contain the output |
Implements yarp::dev::IEncoders.
Definition at line 843 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Read the instantaneous acceleration of all axes.
accs | pointer to the array that will contain the output |
Implements yarp::dev::IEncoders.
Definition at line 847 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Read the position of all axes.
encs | pointer to the array that will contain the output |
Implements yarp::dev::IEncoders.
Definition at line 794 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Read the istantaneous speed of an axis.
j | axis number |
sp | pointer to storage for the output |
TODO should be changed. not very accurate, though close
Implements yarp::dev::IEncoders.
Definition at line 806 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Read the instantaneous speed of all axes.
spds | pointer to storage for the output values |
Implements yarp::dev::IEncoders.
Definition at line 833 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
not implemented
Implements yarp::dev::IPositionControl.
Definition at line 515 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Get reference acceleration for a joint.
Returns the acceleration used to generate the trajectory profile.
joints | pointer to the array of joint numbers |
accs | pointer to the array that will store the acceleration values |
Implements yarp::dev::IPositionControl.
Definition at line 959 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
not implemented
Implements yarp::dev::IPositionControl.
Definition at line 522 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Get reference speed for a joint.
Returns the speed used to generate the trajectory profile.
j | joint number |
ref | pointer to storage for the return value |
Implements yarp::dev::IPositionControl.
Definition at line 500 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Get reference speed of all joints.
These are the values used during the interpolation of the trajectory.
joints | pointer to the array of joint numbers |
spds | pointer to the array that will store the speed values. |
Implements yarp::dev::IPositionControl.
Definition at line 949 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Get reference speed of all joints.
These are the values used during the interpolation of the trajectory.
spds | pointer to the array that will store the speed values. |
Implements yarp::dev::IPositionControl.
Definition at line 505 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Get the reference value of the torque for a given joint.
This is NOT the feedback (see getTorque instead).
j | joint number |
t | the returned reference torque of joint j |
Implements yarp::dev::ITorqueControl.
Definition at line 571 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Get the reference value of the torque for all joints.
This is NOT the feedback (see getTorques instead).
t | pointer to the array of torque values |
Implements yarp::dev::ITorqueControl.
Definition at line 563 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Get the value of the torque on a given joint (this is the feedback if you have a torque sensor).
j | joint number |
t | pointer to the result value |
Implements yarp::dev::ITorqueControl.
Definition at line 613 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::getTorqueError | ( | int | j, |
double * | err | ||
) |
Definition at line 663 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::getTorqueErrorLimit | ( | int | j, |
double * | limit | ||
) |
Definition at line 693 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::getTorqueErrorLimits | ( | double * | limits | ) |
Definition at line 698 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::getTorqueErrors | ( | double * | errs | ) |
Definition at line 668 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::getTorquePid | ( | int | j, |
Pid * | pid | ||
) |
Definition at line 683 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::getTorquePidOutput | ( | int | j, |
double * | out | ||
) |
Definition at line 673 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::getTorquePidOutputs | ( | double * | outs | ) |
Definition at line 678 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::getTorquePids | ( | Pid * | pids | ) |
Definition at line 688 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Get the full scale of the torque sensor of a given joint.
j | joint number |
min | minimum torque of the joint j |
max | maximum torque of the joint j |
Implements yarp::dev::ITorqueControl.
Definition at line 757 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Get the full scale of the torque sensors of all joints.
min | pointer to the array that will store minimum torques of the joints |
max | pointer to the array that will store maximum torques of the joints |
Implements yarp::dev::ITorqueControl.
Definition at line 761 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Get the value of the torque for all joints (this is the feedback if you have torque sensors).
t | pointer to the array that will store the output |
Implements yarp::dev::ITorqueControl.
Definition at line 638 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Open device Opens and configures the device.
config | Config file containing string pairs for parameters |
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 69 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
refs | should be in range [1 300] |
Implements yarp::dev::IPositionControl.
Definition at line 414 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Set new reference point for a subset of joints.
joints | pointer to the array of joint numbers |
refs | pointer to the array specifying the new reference points |
Implements yarp::dev::IPositionControl.
Definition at line 896 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
refs | should be in range [1 300] |
Implements yarp::dev::IPositionControl.
Definition at line 397 of file DynamixelAX12FtdiDriver.cpp.
|
virtual |
Read parameter from motor Requests the value of a parameter from motor.
id | The id of the device to be contacted |
param | encodes address in control table and size of parameter (2 Bytes => address + 100, 1 byte => address) |
Definition at line 360 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Set relative position, all joints.
deltas | pointer to the relative commands |
Implements yarp::dev::IPositionControl.
Definition at line 431 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Set relative position for a subset of joints.
joints | pointer to the array of joint numbers |
deltas | pointer to the array of relative commands |
Implements yarp::dev::IPositionControl.
Definition at line 906 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Set relative position.
The command is relative to the current position of the axis.
j | joint axis number |
delta | relative command |
Implements yarp::dev::IPositionControl.
Definition at line 423 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Reset encoder, single joint.
Set the encoder value to zero
j | encoder number |
Implements yarp::dev::IEncoders.
Definition at line 733 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Reset encoders.
Set the encoders value to zero
Implements yarp::dev::IEncoders.
Definition at line 737 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::resetTorquePid | ( | int | j | ) |
Definition at line 703 of file DynamixelAX12FtdiDriver.cpp.
|
virtual |
Send instruction to device Send an instruction to a device of given ID.
The instruction has to be a byte arry containing the AX12 instruction code beginning with the instruction, the address and the parameters. Header and checksum are written automatically.
id | The hex id of the device to be contacted |
inst | Byte array containing the instruction body (instruction, address, parameters) |
TODO check if it works with Kaspar. Originally made by Sven. Need testing
Definition at line 220 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::setBemfParam | ( | int | j, |
double | bemf | ||
) |
Definition at line 728 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Set the value of the encoder for a given joint.
j | encoder number |
val | new value |
Implements yarp::dev::IEncoders.
Definition at line 741 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Set the value of all encoders.
vals | pointer to the new values |
Implements yarp::dev::IEncoders.
Definition at line 745 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
not implemented
Implements yarp::dev::IPositionControl.
Definition at line 489 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
not implemented
Implements yarp::dev::IPositionControl.
Definition at line 496 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Set reference acceleration on all joints.
This is the valure that is used during the generation of the trajectory.
joints | pointer to the array of joint numbers |
accs | pointer to the array with acceleration values |
Implements yarp::dev::IPositionControl.
Definition at line 939 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Set reference speed for a joint, this is the speed used during the interpolation of the trajectory.
j | joint number |
sp | speed value |
Implements yarp::dev::IPositionControl.
Definition at line 462 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Set reference speed on all joints.
These values are used during the interpolation of the trajectory.
spds | pointer to the array of speed values. |
Implements yarp::dev::IPositionControl.
Definition at line 477 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Set reference speed on all joints.
These values are used during the interpolation of the trajectory.
joints | pointer to the array of joint numbers |
spds | pointer to the array with speed values. |
Implements yarp::dev::IPositionControl.
Definition at line 929 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Set the reference value of the torque for a given joint.
j | joint number |
t | new value |
Implements yarp::dev::ITorqueControl.
Definition at line 753 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Set the reference value of the torque for all joints.
t | pointer to the array of torque values |
Implements yarp::dev::ITorqueControl.
Definition at line 749 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::setTorque | ( | int | j, |
double | t | ||
) |
t | has not real unit. Although it can be roughly estimated based on the maximum toruqe as specified in the document Here t should be only set from 0 - 0x3FF (1023) as int |
Definition at line 590 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::setTorqueErrorLimit | ( | int | j, |
double | limit | ||
) |
Definition at line 653 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::setTorqueErrorLimits | ( | const double * | limits | ) |
Definition at line 658 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::setTorqueOffset | ( | int | j, |
double | v | ||
) |
Definition at line 718 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::setTorquePid | ( | int | j, |
const Pid & | pid | ||
) |
Definition at line 608 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::setTorquePids | ( | const Pid * | pids | ) |
Definition at line 648 of file DynamixelAX12FtdiDriver.cpp.
bool DynamixelAX12FtdiDriver::setTorques | ( | const double * | t | ) |
Definition at line 577 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Stop motion, multiple joints.
Implements yarp::dev::IPositionControl.
Definition at line 530 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Stop motion for subset of joints.
joints | pointer to the array of joint numbers |
Implements yarp::dev::IPositionControl.
Definition at line 969 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Stop motion, single joint.
j | joint number |
Implements yarp::dev::IPositionControl.
Definition at line 526 of file DynamixelAX12FtdiDriver.cpp.