dynamixelAX12Ftdi
: Documentation to be added
More...
#include <DynamixelAX12Ftdi/DynamixelAX12FtdiDriver.h>
Public Member Functions | |
DynamixelAX12FtdiDriver () | |
Constructor Initializes handle but doesn't open channel yet. | |
virtual | ~DynamixelAX12FtdiDriver () |
Destructor Closes connection and destroys device object. | |
bool | open (yarp::os::Searchable &config) override |
Open device Opens and configures the device. | |
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. | |
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. | |
virtual int | readParameter (unsigned char id, unsigned char param) |
Read parameter from motor Requests the value of a parameter from motor. | |
bool | getAxes (int *ax) override |
Get the number of controlled axes. | |
bool | positionMove (int j, double ref) override |
bool | positionMove (const double *refs) override |
bool | relativeMove (int j, double delta) override |
Set relative position. | |
bool | relativeMove (const double *deltas) override |
Set relative position, all joints. | |
bool | checkMotionDone (int j, bool *flag) override |
Check if the current trajectory is terminated. | |
bool | checkMotionDone (bool *flag) override |
Check if the current trajectory is terminated. | |
bool | setRefSpeed (int j, double sp) override |
Set reference speed for a joint, this is the speed used during the interpolation of the trajectory. | |
bool | setRefSpeeds (const double *spds) override |
Set reference speed on all joints. | |
bool | setRefAcceleration (int j, double acc) override |
not implemented | |
bool | setRefAccelerations (const double *accs) override |
not implemented | |
bool | getRefSpeed (int j, double *ref) override |
Get reference speed for a joint. | |
bool | getRefSpeeds (double *spds) override |
Get reference speed of all joints. | |
bool | getRefAcceleration (int j, double *acc) override |
not implemented | |
bool | getRefAccelerations (double *accs) override |
not implemented | |
bool | stop (int j) override |
Stop motion, single joint. | |
bool | stop () override |
Stop motion, multiple joints. | |
bool | getRefTorques (double *t) override |
Get the reference value of the torque for all joints. | |
bool | getRefTorque (int j, double *t) override |
Get the reference value of the torque for a given joint. | |
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). | |
bool | getTorques (double *t) override |
Get the value of the torque for all joints (this is the feedback if you have torque sensors). | |
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. | |
bool | resetEncoders () override |
Reset encoders. | |
bool | setEncoder (int j, double val) override |
Set the value of the encoder for a given joint. | |
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 | getEncoders (double *encs) override |
Read the position of all axes. | |
bool | getEncoderSpeed (int j, double *sp) override |
Read the istantaneous speed of an axis. | |
bool | getEncoderSpeeds (double *spds) override |
Read the instantaneous speed of all axes. | |
bool | getEncoderAcceleration (int j, double *spds) override |
Read the instantaneous acceleration of an axis. | |
bool | getEncoderAccelerations (double *accs) override |
Read the instantaneous acceleration of all axes. | |
bool | setRefTorques (const double *t) override |
Set the reference value of the torque for all joints. | |
bool | setRefTorque (int j, double t) override |
Set the reference value of the torque for a given joint. | |
bool | getTorqueRange (int j, double *min, double *max) override |
Get the full scale of the torque sensor of a given joint. | |
bool | getTorqueRanges (double *min, double *max) override |
Get the full scale of the torque sensors of all joints. | |
bool | positionMove (const int n_joint, const int *joints, const double *refs) override |
Set new reference point for a subset of joints. | |
bool | relativeMove (const int n_joint, const int *joints, const double *deltas) override |
Set relative position for a subset of joints. | |
bool | checkMotionDone (const int n_joint, const int *joints, bool *flag) override |
Check if the current trajectory is terminated. | |
bool | setRefSpeeds (const int n_joint, const int *joints, const double *spds) override |
Set reference speed on all joints. | |
bool | setRefAccelerations (const int n_joint, const int *joints, const double *accs) override |
Set reference acceleration on all joints. | |
bool | getRefSpeeds (const int n_joint, const int *joints, double *spds) override |
Get reference speed of all joints. | |
bool | getRefAccelerations (const int n_joint, const int *joints, double *accs) override |
Get reference acceleration for a joint. | |
bool | stop (const int n_joint, const int *joints) override |
Stop motion for subset of joints. | |
Public Member Functions inherited from yarp::dev::DeviceDriver | |
DeviceDriver () | |
DeviceDriver (const DeviceDriver &other)=delete | |
DeviceDriver (DeviceDriver &&other) noexcept=delete | |
DeviceDriver & | operator= (const DeviceDriver &other)=delete |
DeviceDriver & | operator= (DeviceDriver &&other) noexcept=delete |
virtual | ~DeviceDriver () |
virtual std::string | id () const |
Return the id assigned to the PolyDriver. | |
virtual void | setId (const std::string &id) |
Set the id for this device. | |
template<class T > | |
bool | view (T *&x) |
Get an interface to the device driver. | |
virtual DeviceDriver * | getImplementation () |
Some drivers are bureaucrats, pointing at others. | |
Public Member Functions inherited from yarp::dev::IPositionControl | |
virtual | ~IPositionControl () |
Destructor. | |
virtual bool | getTargetPosition (const int joint, double *ref) |
Get the last position reference for the specified axis. | |
virtual bool | getTargetPositions (double *refs) |
Get the last position reference for all axes. | |
virtual bool | getTargetPositions (const int n_joint, const int *joints, double *refs) |
Get the last position reference for the specified group of axes. | |
Public Member Functions inherited from yarp::dev::ITorqueControl | |
virtual | ~ITorqueControl () |
Destructor. | |
virtual bool | setRefTorques (const int n_joint, const int *joints, const double *t) |
Set new torque reference for a subset of joints. | |
virtual bool | getMotorTorqueParams (int j, yarp::dev::MotorTorqueParameters *params) |
Get a subset of motor parameters (bemf, ktau etc) useful for torque control. | |
virtual bool | setMotorTorqueParams (int j, const yarp::dev::MotorTorqueParameters params) |
Set a subset of motor parameters (bemf, ktau etc) useful for torque control. | |
Public Member Functions inherited from yarp::dev::IEncoders | |
virtual | ~IEncoders () |
Destructor. | |
dynamixelAX12Ftdi
: Documentation to be added
Definition at line 139 of file DynamixelAX12FtdiDriver.h.
DynamixelAX12FtdiDriver::DynamixelAX12FtdiDriver | ( | ) |
Constructor Initializes handle but doesn't open channel yet.
Definition at line 27 of file DynamixelAX12FtdiDriver.cpp.
|
virtual |
Destructor Closes connection and destroys device object.
Definition at line 57 of file DynamixelAX12FtdiDriver.cpp.
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 454 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 928 of file DynamixelAX12FtdiDriver.cpp.
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 445 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.
bool DynamixelAX12FtdiDriver::configure | ( | yarp::os::Searchable & | config | ) |
Configure device online Configures parts of the device that can be configures online.
config | Config file containing string pairs for parameters |
Definition at line 202 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 718 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 723 of file DynamixelAX12FtdiDriver.cpp.
Get the number of controlled axes.
This command asks the number of controlled axes for the current physical interface.
ax | pointer to storage |
Implements yarp::dev::IPositionControl.
Definition at line 394 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 733 of file DynamixelAX12FtdiDriver.cpp.
Get the angle of servo.
Implements yarp::dev::IEncoders.
Definition at line 775 of file DynamixelAX12FtdiDriver.cpp.
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 855 of file DynamixelAX12FtdiDriver.cpp.
Read the instantaneous acceleration of all axes.
accs | pointer to the array that will contain the output |
Implements yarp::dev::IEncoders.
Definition at line 859 of file DynamixelAX12FtdiDriver.cpp.
Read the position of all axes.
encs | pointer to the array that will contain the output |
Implements yarp::dev::IEncoders.
Definition at line 805 of file DynamixelAX12FtdiDriver.cpp.
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 817 of file DynamixelAX12FtdiDriver.cpp.
Read the instantaneous speed of all axes.
spds | pointer to storage for the output values |
Implements yarp::dev::IEncoders.
Definition at line 844 of file DynamixelAX12FtdiDriver.cpp.
not implemented
Implements yarp::dev::IPositionControl.
Definition at line 522 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 971 of file DynamixelAX12FtdiDriver.cpp.
not implemented
Implements yarp::dev::IPositionControl.
Definition at line 529 of file DynamixelAX12FtdiDriver.cpp.
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 507 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 961 of file DynamixelAX12FtdiDriver.cpp.
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 512 of file DynamixelAX12FtdiDriver.cpp.
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 579 of file DynamixelAX12FtdiDriver.cpp.
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 571 of file DynamixelAX12FtdiDriver.cpp.
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 622 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 673 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 703 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 708 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 678 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 693 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 683 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 688 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 698 of file DynamixelAX12FtdiDriver.cpp.
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 767 of file DynamixelAX12FtdiDriver.cpp.
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 771 of file DynamixelAX12FtdiDriver.cpp.
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 647 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 66 of file DynamixelAX12FtdiDriver.cpp.
refs | should be in range [1 300] |
Implements yarp::dev::IPositionControl.
Definition at line 416 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 908 of file DynamixelAX12FtdiDriver.cpp.
refs | should be in range [1 300] |
Implements yarp::dev::IPositionControl.
Definition at line 399 of file DynamixelAX12FtdiDriver.cpp.
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 362 of file DynamixelAX12FtdiDriver.cpp.
Set relative position, all joints.
deltas | pointer to the relative commands |
Implements yarp::dev::IPositionControl.
Definition at line 435 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 918 of file DynamixelAX12FtdiDriver.cpp.
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 426 of file DynamixelAX12FtdiDriver.cpp.
Reset encoder, single joint.
Set the encoder value to zero
j | encoder number |
Implements yarp::dev::IEncoders.
Definition at line 743 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Reset encoders.
Set the encoders value to zero
Implements yarp::dev::IEncoders.
Definition at line 747 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 713 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.
Definition at line 738 of file DynamixelAX12FtdiDriver.cpp.
Set the value of the encoder for a given joint.
j | encoder number |
val | new value |
Implements yarp::dev::IEncoders.
Definition at line 751 of file DynamixelAX12FtdiDriver.cpp.
Set the value of all encoders.
vals | pointer to the new values |
Implements yarp::dev::IEncoders.
Definition at line 755 of file DynamixelAX12FtdiDriver.cpp.
not implemented
Implements yarp::dev::IPositionControl.
Definition at line 496 of file DynamixelAX12FtdiDriver.cpp.
not implemented
Implements yarp::dev::IPositionControl.
Definition at line 503 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 951 of file DynamixelAX12FtdiDriver.cpp.
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 468 of file DynamixelAX12FtdiDriver.cpp.
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 483 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 941 of file DynamixelAX12FtdiDriver.cpp.
Set the reference value of the torque for a given joint.
j | joint number |
t | new value |
Implements yarp::dev::ITorqueControl.
Definition at line 763 of file DynamixelAX12FtdiDriver.cpp.
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 759 of file DynamixelAX12FtdiDriver.cpp.
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 599 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 663 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 668 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 728 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 617 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 658 of file DynamixelAX12FtdiDriver.cpp.
Definition at line 585 of file DynamixelAX12FtdiDriver.cpp.
|
overridevirtual |
Stop motion, multiple joints.
Implements yarp::dev::IPositionControl.
Definition at line 537 of file DynamixelAX12FtdiDriver.cpp.
Stop motion for subset of joints.
joints | pointer to the array of joint numbers |
Implements yarp::dev::IPositionControl.
Definition at line 981 of file DynamixelAX12FtdiDriver.cpp.
Stop motion, single joint.
j | joint number |
Implements yarp::dev::IPositionControl.
Definition at line 533 of file DynamixelAX12FtdiDriver.cpp.