YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
DynamixelAX12FtdiDriver Class Reference

dynamixelAX12Ftdi: Documentation to be added More...

#include <DynamixelAX12Ftdi/DynamixelAX12FtdiDriver.h>

+ Inheritance diagram for DynamixelAX12FtdiDriver:

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.
 
yarp::dev::ReturnValue getAxes (size_t &ax) override
 Interfaces methods.
 
yarp::dev::ReturnValue positionMove (int j, double ref) override
 Set new reference point for a single axis.
 
yarp::dev::ReturnValue positionMove (const double *refs) override
 
yarp::dev::ReturnValue relativeMove (int j, double delta) override
 Set relative position.
 
yarp::dev::ReturnValue relativeMove (const double *deltas) override
 Set relative position, all joints.
 
yarp::dev::ReturnValue checkMotionDone (bool &flag) override
 Check if the current trajectory is terminated.
 
yarp::dev::ReturnValue checkMotionDone (int j, bool &flag) override
 Check if the current trajectory is terminated.
 
yarp::dev::ReturnValue setTrajSpeed (int j, double sp) override
 Set reference speed for a joint, this is the speed used during the interpolation of the trajectory.
 
yarp::dev::ReturnValue setTrajSpeeds (const double *spds) override
 Set reference speed on all joints.
 
yarp::dev::ReturnValue setTrajAcceleration (int j, double acc) override
 not implemented
 
yarp::dev::ReturnValue setTrajAccelerations (const double *accs) override
 not implemented
 
yarp::dev::ReturnValue getTrajSpeed (int j, double *ref) override
 Get reference speed for a joint.
 
yarp::dev::ReturnValue getTrajSpeeds (double *spds) override
 Get reference speed of all joints.
 
yarp::dev::ReturnValue getTrajAcceleration (int j, double *acc) override
 not implemented
 
yarp::dev::ReturnValue getTrajAccelerations (double *accs) override
 not implemented
 
yarp::dev::ReturnValue stop (int j) override
 Stop motion, single joint.
 
yarp::dev::ReturnValue stop () override
 Stop motion, multiple joints.
 
yarp::dev::ReturnValue getRefTorques (double *t) override
 Get the reference value of the torque for all joints.
 
yarp::dev::ReturnValue getRefTorque (int j, double *t) override
 Get the reference value of the torque for a given joint.
 
yarp::dev::ReturnValue setTorques (const double *t)
 
yarp::dev::ReturnValue setTorque (int j, double t)
 
yarp::dev::ReturnValue setTorquePid (int j, const Pid &pid)
 
yarp::dev::ReturnValue 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).
 
yarp::dev::ReturnValue getTorques (double *t) override
 Get the value of the torque for all joints (this is the feedback if you have torque sensors).
 
yarp::dev::ReturnValue setTorquePids (const Pid *pids)
 
yarp::dev::ReturnValue setTorqueErrorLimit (int j, double limit)
 
yarp::dev::ReturnValue setTorqueErrorLimits (const double *limits)
 
yarp::dev::ReturnValue getTorqueError (int j, double *err)
 
yarp::dev::ReturnValue getTorqueErrors (double *errs)
 
yarp::dev::ReturnValue getTorquePidOutput (int j, double *out)
 
yarp::dev::ReturnValue getTorquePidOutputs (double *outs)
 
yarp::dev::ReturnValue getTorquePid (int j, Pid *pid)
 
yarp::dev::ReturnValue getTorquePids (Pid *pids)
 
yarp::dev::ReturnValue getTorqueErrorLimit (int j, double *limit)
 
yarp::dev::ReturnValue getTorqueErrorLimits (double *limits)
 
yarp::dev::ReturnValue resetTorquePid (int j)
 
yarp::dev::ReturnValue disableTorquePid (int j)
 
yarp::dev::ReturnValue enableTorquePid (int j)
 
yarp::dev::ReturnValue setTorqueOffset (int j, double v)
 
yarp::dev::ReturnValue getBemfParam (int j, double *bemf)
 
yarp::dev::ReturnValue setBemfParam (int j, double bemf)
 
yarp::dev::ReturnValue resetEncoder (int j) override
 Reset encoder, single joint.
 
yarp::dev::ReturnValue resetEncoders () override
 Reset encoders.
 
yarp::dev::ReturnValue setEncoder (int j, double val) override
 Set the value of the encoder for a given joint.
 
yarp::dev::ReturnValue setEncoders (const double *vals) override
 Set the value of all encoders.
 
yarp::dev::ReturnValue getEncoder (int j, double *v) override
 Get the angle of servo.
 
yarp::dev::ReturnValue getEncoders (double *encs) override
 Read the position of all axes.
 
yarp::dev::ReturnValue getEncoderSpeed (int j, double *sp) override
 Read the istantaneous speed of an axis.
 
yarp::dev::ReturnValue getEncoderSpeeds (double *spds) override
 Read the instantaneous speed of all axes.
 
yarp::dev::ReturnValue getEncoderAcceleration (int j, double *spds) override
 Read the instantaneous acceleration of an axis.
 
yarp::dev::ReturnValue getEncoderAccelerations (double *accs) override
 Read the instantaneous acceleration of all axes.
 
yarp::dev::ReturnValue setRefTorques (const double *t) override
 Set the reference value of the torque for all joints.
 
yarp::dev::ReturnValue setRefTorque (int j, double t) override
 Set the reference value of the torque for a given joint.
 
yarp::dev::ReturnValue getTorqueRange (int j, double *min, double *max) override
 Get the full scale of the torque sensor of a given joint.
 
yarp::dev::ReturnValue getTorqueRanges (double *min, double *max) override
 Get the full scale of the torque sensors of all joints.
 
yarp::dev::ReturnValue positionMove (const int n_joint, const int *joints, const double *refs) override
 Set new reference point for a subset of joints.
 
yarp::dev::ReturnValue relativeMove (const int n_joint, const int *joints, const double *deltas) override
 Set relative position for a subset of joints.
 
yarp::dev::ReturnValue checkMotionDone (const std::vector< int > &joints, bool &flag) override
 Check if the current trajectory is terminated.
 
yarp::dev::ReturnValue setTrajSpeeds (const int n_joint, const int *joints, const double *spds) override
 Set reference speed on all joints.
 
yarp::dev::ReturnValue setTrajAccelerations (const int n_joint, const int *joints, const double *accs) override
 Set reference acceleration on all joints.
 
yarp::dev::ReturnValue getTrajSpeeds (const int n_joint, const int *joints, double *spds) override
 Get reference speed of all joints.
 
yarp::dev::ReturnValue getTrajAccelerations (const int n_joint, const int *joints, double *accs) override
 Get reference acceleration for a joint.
 
yarp::dev::ReturnValue stop (const int n_joint, const int *joints) override
 Stop motion for subset of joints.
 
yarp::dev::ReturnValue getTargetPosition (const int joint, double *ref) override
 Get the last position reference for the specified axis.
 
yarp::dev::ReturnValue getTargetPositions (double *refs) override
 Get the last position reference for all axes.
 
yarp::dev::ReturnValue getTargetPositions (const int n_joint, const int *joints, double *refs) override
 Get the last position reference for the specified group of axes.
 
yarp::dev::ReturnValue setRefTorques (const int n_joint, const int *joints, const double *t) override
 Set new torque reference for a subset of joints.
 
yarp::dev::ReturnValue getMotorTorqueParams (int j, yarp::dev::MotorTorqueParameters *params) override
 Get a subset of motor parameters (bemf, ktau etc) useful for torque control.
 
yarp::dev::ReturnValue setMotorTorqueParams (int j, const yarp::dev::MotorTorqueParameters params) override
 Set a subset of motor parameters (bemf, ktau etc) useful for torque control.
 
- 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.
 
- Public Member Functions inherited from yarp::dev::ITorqueControl
virtual ~ITorqueControl ()
 Destructor.
 
- Public Member Functions inherited from yarp::dev::IEncoders
virtual ~IEncoders ()
 Destructor.
 

Detailed Description

dynamixelAX12Ftdi: Documentation to be added

Definition at line 139 of file DynamixelAX12FtdiDriver.h.

Constructor & Destructor Documentation

◆ DynamixelAX12FtdiDriver()

DynamixelAX12FtdiDriver::DynamixelAX12FtdiDriver ( )

Constructor Initializes handle but doesn't open channel yet.

Definition at line 27 of file DynamixelAX12FtdiDriver.cpp.

◆ ~DynamixelAX12FtdiDriver()

DynamixelAX12FtdiDriver::~DynamixelAX12FtdiDriver ( )
virtual

Destructor Closes connection and destroys device object.

Definition at line 57 of file DynamixelAX12FtdiDriver.cpp.

Member Function Documentation

◆ checkMotionDone() [1/3]

ReturnValue DynamixelAX12FtdiDriver::checkMotionDone ( bool &  flag)
overridevirtual

Check if the current trajectory is terminated.

Non blocking.

Parameters
flagis a pointer to return value ("and" of all joints)
Returns
true/false on network communication (value you actually want is stored in *flag)

Implements yarp::dev::IPositionControl.

Definition at line 455 of file DynamixelAX12FtdiDriver.cpp.

◆ checkMotionDone() [2/3]

ReturnValue DynamixelAX12FtdiDriver::checkMotionDone ( const std::vector< int > &  joints,
bool &  flag 
)
overridevirtual

Check if the current trajectory is terminated.

Non blocking.

Parameters
jointsarray of joint numbers
flaglogical "and" of all set of joints
Returns
true/false if network communication went well.

Implements yarp::dev::IPositionControl.

Definition at line 923 of file DynamixelAX12FtdiDriver.cpp.

◆ checkMotionDone() [3/3]

ReturnValue DynamixelAX12FtdiDriver::checkMotionDone ( int  j,
bool &  flag 
)
overridevirtual

Check if the current trajectory is terminated.

Non blocking.

Parameters
jis the axis number
flagis a pointer to return value
Returns
true/false on network communication (value you actually want is stored in *flag)

Implements yarp::dev::IPositionControl.

Definition at line 446 of file DynamixelAX12FtdiDriver.cpp.

◆ close()

bool DynamixelAX12FtdiDriver::close ( )
overridevirtual

Close device Closes the device and shuts down connection.

Returns
true on success

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 182 of file DynamixelAX12FtdiDriver.cpp.

◆ configure()

bool DynamixelAX12FtdiDriver::configure ( yarp::os::Searchable &  config)

Configure device online Configures parts of the device that can be configures online.

Parameters
configConfig file containing string pairs for parameters
Returns
true on success

Definition at line 202 of file DynamixelAX12FtdiDriver.cpp.

◆ disableTorquePid()

ReturnValue DynamixelAX12FtdiDriver::disableTorquePid ( int  j)

Definition at line 716 of file DynamixelAX12FtdiDriver.cpp.

◆ enableTorquePid()

ReturnValue DynamixelAX12FtdiDriver::enableTorquePid ( int  j)

Definition at line 721 of file DynamixelAX12FtdiDriver.cpp.

◆ getAxes()

ReturnValue DynamixelAX12FtdiDriver::getAxes ( size_t &  ax)
overridevirtual

Interfaces methods.

Implements yarp::dev::IPositionControl.

Definition at line 394 of file DynamixelAX12FtdiDriver.cpp.

◆ getBemfParam()

ReturnValue DynamixelAX12FtdiDriver::getBemfParam ( int  j,
double *  bemf 
)

Definition at line 731 of file DynamixelAX12FtdiDriver.cpp.

◆ getEncoder()

ReturnValue DynamixelAX12FtdiDriver::getEncoder ( int  j,
double *  v 
)
overridevirtual

Get the angle of servo.

Implements yarp::dev::IEncoders.

Definition at line 773 of file DynamixelAX12FtdiDriver.cpp.

◆ getEncoderAcceleration()

ReturnValue DynamixelAX12FtdiDriver::getEncoderAcceleration ( int  j,
double *  spds 
)
overridevirtual

Read the instantaneous acceleration of an axis.

Parameters
jaxis number
spdspointer to the array that will contain the output

Implements yarp::dev::IEncoders.

Definition at line 850 of file DynamixelAX12FtdiDriver.cpp.

◆ getEncoderAccelerations()

ReturnValue DynamixelAX12FtdiDriver::getEncoderAccelerations ( double *  accs)
overridevirtual

Read the instantaneous acceleration of all axes.

Parameters
accspointer to the array that will contain the output
Returns
true if all goes well, false if anything bad happens.

Implements yarp::dev::IEncoders.

Definition at line 854 of file DynamixelAX12FtdiDriver.cpp.

◆ getEncoders()

ReturnValue DynamixelAX12FtdiDriver::getEncoders ( double *  encs)
overridevirtual

Read the position of all axes.

Parameters
encspointer to the array that will contain the output
Returns
true/false on success/failure

Implements yarp::dev::IEncoders.

Definition at line 803 of file DynamixelAX12FtdiDriver.cpp.

◆ getEncoderSpeed()

ReturnValue DynamixelAX12FtdiDriver::getEncoderSpeed ( int  j,
double *  sp 
)
overridevirtual

Read the istantaneous speed of an axis.

Parameters
jaxis number
sppointer to storage for the output
Returns
true if successful, false ... otherwise.

TODO should be changed. not very accurate, though close

Implements yarp::dev::IEncoders.

Definition at line 813 of file DynamixelAX12FtdiDriver.cpp.

◆ getEncoderSpeeds()

ReturnValue DynamixelAX12FtdiDriver::getEncoderSpeeds ( double *  spds)
overridevirtual

Read the instantaneous speed of all axes.

Parameters
spdspointer to storage for the output values
Returns
guess what? (true/false on success or failure).

Implements yarp::dev::IEncoders.

Definition at line 840 of file DynamixelAX12FtdiDriver.cpp.

◆ getMotorTorqueParams()

ReturnValue DynamixelAX12FtdiDriver::getMotorTorqueParams ( int  j,
yarp::dev::MotorTorqueParameters *  params 
)
overridevirtual

Get a subset of motor parameters (bemf, ktau etc) useful for torque control.

Parameters
jjoint number
paramsa struct containing the motor parameters to be retrieved
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 1006 of file DynamixelAX12FtdiDriver.cpp.

◆ getRefTorque()

ReturnValue DynamixelAX12FtdiDriver::getRefTorque ( int  j,
double *  t 
)
overridevirtual

Get the reference value of the torque for a given joint.

This is NOT the feedback (see getTorque instead).

Parameters
jjoint number
tthe returned reference torque of joint j
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 579 of file DynamixelAX12FtdiDriver.cpp.

◆ getRefTorques()

ReturnValue DynamixelAX12FtdiDriver::getRefTorques ( double *  t)
overridevirtual

Get the reference value of the torque for all joints.

This is NOT the feedback (see getTorques instead).

Parameters
tpointer to the array of torque values
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 571 of file DynamixelAX12FtdiDriver.cpp.

◆ getTargetPosition()

ReturnValue DynamixelAX12FtdiDriver::getTargetPosition ( const int  joint,
double *  ref 
)
overridevirtual

Get the last position reference for the specified axis.

This is the dual of PositionMove and shall return only values sent using IPositionControl interface. If other interfaces like IPositionDirect are implemented by the device, this call must ignore their values, i.e. this call must never return a reference sent using IPositionDirect::SetPosition

Parameters
reflast reference sent using PositionMove functions
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 986 of file DynamixelAX12FtdiDriver.cpp.

◆ getTargetPositions() [1/2]

ReturnValue DynamixelAX12FtdiDriver::getTargetPositions ( const int  n_joint,
const int *  joints,
double *  refs 
)
overridevirtual

Get the last position reference for the specified group of axes.

This is the dual of PositionMove and shall return only values sent using IPositionControl interface. If other interfaces like IPositionDirect are implemented by the device, this call must ignore their values, i.e. this call must never return a reference sent using IPositionDirect::SetPosition

Parameters
reflast reference sent using PositionMove functions
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 996 of file DynamixelAX12FtdiDriver.cpp.

◆ getTargetPositions() [2/2]

ReturnValue DynamixelAX12FtdiDriver::getTargetPositions ( double *  refs)
overridevirtual

Get the last position reference for all axes.

This is the dual of PositionMove and shall return only values sent using IPositionControl interface. If other interfaces like IPositionDirect are implemented by the device, this call must ignore their values, i.e. this call must never return a reference sent using IPositionDirect::SetPosition

Parameters
reflast reference sent using PositionMove functions
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 991 of file DynamixelAX12FtdiDriver.cpp.

◆ getTorque()

ReturnValue DynamixelAX12FtdiDriver::getTorque ( int  j,
double *  t 
)
overridevirtual

Get the value of the torque on a given joint (this is the feedback if you have a torque sensor).

Parameters
jjoint number
tpointer to the result value
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 621 of file DynamixelAX12FtdiDriver.cpp.

◆ getTorqueError()

ReturnValue DynamixelAX12FtdiDriver::getTorqueError ( int  j,
double *  err 
)

Definition at line 671 of file DynamixelAX12FtdiDriver.cpp.

◆ getTorqueErrorLimit()

ReturnValue DynamixelAX12FtdiDriver::getTorqueErrorLimit ( int  j,
double *  limit 
)

Definition at line 701 of file DynamixelAX12FtdiDriver.cpp.

◆ getTorqueErrorLimits()

ReturnValue DynamixelAX12FtdiDriver::getTorqueErrorLimits ( double *  limits)

Definition at line 706 of file DynamixelAX12FtdiDriver.cpp.

◆ getTorqueErrors()

ReturnValue DynamixelAX12FtdiDriver::getTorqueErrors ( double *  errs)

Definition at line 676 of file DynamixelAX12FtdiDriver.cpp.

◆ getTorquePid()

ReturnValue DynamixelAX12FtdiDriver::getTorquePid ( int  j,
Pid *  pid 
)

Definition at line 691 of file DynamixelAX12FtdiDriver.cpp.

◆ getTorquePidOutput()

ReturnValue DynamixelAX12FtdiDriver::getTorquePidOutput ( int  j,
double *  out 
)

Definition at line 681 of file DynamixelAX12FtdiDriver.cpp.

◆ getTorquePidOutputs()

ReturnValue DynamixelAX12FtdiDriver::getTorquePidOutputs ( double *  outs)

Definition at line 686 of file DynamixelAX12FtdiDriver.cpp.

◆ getTorquePids()

ReturnValue DynamixelAX12FtdiDriver::getTorquePids ( Pid *  pids)

Definition at line 696 of file DynamixelAX12FtdiDriver.cpp.

◆ getTorqueRange()

ReturnValue DynamixelAX12FtdiDriver::getTorqueRange ( int  j,
double *  min,
double *  max 
)
overridevirtual

Get the full scale of the torque sensor of a given joint.

Parameters
jjoint number
minminimum torque of the joint j
maxmaximum torque of the joint j
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 765 of file DynamixelAX12FtdiDriver.cpp.

◆ getTorqueRanges()

ReturnValue DynamixelAX12FtdiDriver::getTorqueRanges ( double *  min,
double *  max 
)
overridevirtual

Get the full scale of the torque sensors of all joints.

Parameters
minpointer to the array that will store minimum torques of the joints
maxpointer to the array that will store maximum torques of the joints
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 769 of file DynamixelAX12FtdiDriver.cpp.

◆ getTorques()

ReturnValue DynamixelAX12FtdiDriver::getTorques ( double *  t)
overridevirtual

Get the value of the torque for all joints (this is the feedback if you have torque sensors).

Parameters
tpointer to the array that will store the output
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 646 of file DynamixelAX12FtdiDriver.cpp.

◆ getTrajAcceleration()

ReturnValue DynamixelAX12FtdiDriver::getTrajAcceleration ( int  j,
double *  acc 
)
overridevirtual

not implemented

Implements yarp::dev::IPositionControl.

Definition at line 522 of file DynamixelAX12FtdiDriver.cpp.

◆ getTrajAccelerations() [1/2]

ReturnValue DynamixelAX12FtdiDriver::getTrajAccelerations ( const int  n_joint,
const int *  joints,
double *  accs 
)
overridevirtual

Get reference acceleration for a joint.

Returns the acceleration used to generate the trajectory profile.

Parameters
jointspointer to the array of joint numbers
accspointer to the array that will store the acceleration values
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 966 of file DynamixelAX12FtdiDriver.cpp.

◆ getTrajAccelerations() [2/2]

ReturnValue DynamixelAX12FtdiDriver::getTrajAccelerations ( double *  accs)
overridevirtual

not implemented

Implements yarp::dev::IPositionControl.

Definition at line 529 of file DynamixelAX12FtdiDriver.cpp.

◆ getTrajSpeed()

ReturnValue DynamixelAX12FtdiDriver::getTrajSpeed ( int  j,
double *  ref 
)
overridevirtual

Get reference speed for a joint.

Returns the speed used to generate the trajectory profile.

Parameters
jjoint number
refpointer to storage for the return value
Returns
true/false on success or failure

Implements yarp::dev::IPositionControl.

Definition at line 507 of file DynamixelAX12FtdiDriver.cpp.

◆ getTrajSpeeds() [1/2]

ReturnValue DynamixelAX12FtdiDriver::getTrajSpeeds ( const int  n_joint,
const int *  joints,
double *  spds 
)
overridevirtual

Get reference speed of all joints.

These are the values used during the interpolation of the trajectory.

Parameters
jointspointer to the array of joint numbers
spdspointer to the array that will store the speed values.
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControl.

Definition at line 956 of file DynamixelAX12FtdiDriver.cpp.

◆ getTrajSpeeds() [2/2]

ReturnValue DynamixelAX12FtdiDriver::getTrajSpeeds ( double *  spds)
overridevirtual

Get reference speed of all joints.

These are the values used during the interpolation of the trajectory.

Parameters
spdspointer to the array that will store the speed values.

Implements yarp::dev::IPositionControl.

Definition at line 512 of file DynamixelAX12FtdiDriver.cpp.

◆ open()

bool DynamixelAX12FtdiDriver::open ( yarp::os::Searchable &  config)
overridevirtual

Open device Opens and configures the device.

Parameters
configConfig file containing string pairs for parameters
Returns
true on success

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 66 of file DynamixelAX12FtdiDriver.cpp.

◆ positionMove() [1/3]

ReturnValue DynamixelAX12FtdiDriver::positionMove ( const double *  refs)
overridevirtual
Parameters
refsshould be in range [1 300]

Implements yarp::dev::IPositionControl.

Definition at line 418 of file DynamixelAX12FtdiDriver.cpp.

◆ positionMove() [2/3]

ReturnValue DynamixelAX12FtdiDriver::positionMove ( const int  n_joint,
const int *  joints,
const double *  refs 
)
overridevirtual

Set new reference point for a subset of joints.

Parameters
jointspointer to the array of joint numbers
refspointer to the array specifying the new reference points
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 903 of file DynamixelAX12FtdiDriver.cpp.

◆ positionMove() [3/3]

ReturnValue DynamixelAX12FtdiDriver::positionMove ( int  j,
double  ref 
)
overridevirtual

Set new reference point for a single axis.

Parameters
jjoint number
refspecifies the new ref point
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 399 of file DynamixelAX12FtdiDriver.cpp.

◆ readParameter()

int DynamixelAX12FtdiDriver::readParameter ( unsigned char  id,
unsigned char  param 
)
virtual

Read parameter from motor Requests the value of a parameter from motor.

Parameters
idThe id of the device to be contacted
paramencodes address in control table and size of parameter (2 Bytes => address + 100, 1 byte => address)
Returns
value if read successful or -1

Definition at line 362 of file DynamixelAX12FtdiDriver.cpp.

◆ relativeMove() [1/3]

ReturnValue DynamixelAX12FtdiDriver::relativeMove ( const double *  deltas)
overridevirtual

Set relative position, all joints.

Parameters
deltaspointer to the relative commands
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 436 of file DynamixelAX12FtdiDriver.cpp.

◆ relativeMove() [2/3]

ReturnValue DynamixelAX12FtdiDriver::relativeMove ( const int  n_joint,
const int *  joints,
const double *  deltas 
)
overridevirtual

Set relative position for a subset of joints.

Parameters
jointspointer to the array of joint numbers
deltaspointer to the array of relative commands
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 913 of file DynamixelAX12FtdiDriver.cpp.

◆ relativeMove() [3/3]

ReturnValue DynamixelAX12FtdiDriver::relativeMove ( int  j,
double  delta 
)
overridevirtual

Set relative position.

The command is relative to the current position of the axis.

Parameters
jjoint axis number
deltarelative command
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 427 of file DynamixelAX12FtdiDriver.cpp.

◆ resetEncoder()

ReturnValue DynamixelAX12FtdiDriver::resetEncoder ( int  j)
overridevirtual

Reset encoder, single joint.

Set the encoder value to zero

Parameters
jencoder number
Returns
true/false

Implements yarp::dev::IEncoders.

Definition at line 741 of file DynamixelAX12FtdiDriver.cpp.

◆ resetEncoders()

ReturnValue DynamixelAX12FtdiDriver::resetEncoders ( )
overridevirtual

Reset encoders.

Set the encoders value to zero

Returns
true/false

Implements yarp::dev::IEncoders.

Definition at line 745 of file DynamixelAX12FtdiDriver.cpp.

◆ resetTorquePid()

ReturnValue DynamixelAX12FtdiDriver::resetTorquePid ( int  j)

Definition at line 711 of file DynamixelAX12FtdiDriver.cpp.

◆ sendCommand()

int DynamixelAX12FtdiDriver::sendCommand ( unsigned char  id,
unsigned char  inst[],
int  size,
unsigned char  ret[],
int &  retSize 
)
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.

Parameters
idThe hex id of the device to be contacted
instByte array containing the instruction body (instruction, address, parameters)
Returns
The content of the return packet of the device

TODO check if it works with Kaspar. Originally made by Sven. Need testing

Definition at line 220 of file DynamixelAX12FtdiDriver.cpp.

◆ setBemfParam()

ReturnValue DynamixelAX12FtdiDriver::setBemfParam ( int  j,
double  bemf 
)

Definition at line 736 of file DynamixelAX12FtdiDriver.cpp.

◆ setEncoder()

ReturnValue DynamixelAX12FtdiDriver::setEncoder ( int  j,
double  val 
)
overridevirtual

Set the value of the encoder for a given joint.

Parameters
jencoder number
valnew value
Returns
true/false

Implements yarp::dev::IEncoders.

Definition at line 749 of file DynamixelAX12FtdiDriver.cpp.

◆ setEncoders()

ReturnValue DynamixelAX12FtdiDriver::setEncoders ( const double *  vals)
overridevirtual

Set the value of all encoders.

Parameters
valspointer to the new values
Returns
true/false

Implements yarp::dev::IEncoders.

Definition at line 753 of file DynamixelAX12FtdiDriver.cpp.

◆ setMotorTorqueParams()

ReturnValue DynamixelAX12FtdiDriver::setMotorTorqueParams ( int  j,
const yarp::dev::MotorTorqueParameters  params 
)
overridevirtual

Set a subset of motor parameters (bemf, ktau etc) useful for torque control.

Parameters
jjoint number
paramsa struct containing the motor parameters to be set
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 1011 of file DynamixelAX12FtdiDriver.cpp.

◆ setRefTorque()

ReturnValue DynamixelAX12FtdiDriver::setRefTorque ( int  j,
double  t 
)
overridevirtual

Set the reference value of the torque for a given joint.

Parameters
jjoint number
tnew value
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 761 of file DynamixelAX12FtdiDriver.cpp.

◆ setRefTorques() [1/2]

ReturnValue DynamixelAX12FtdiDriver::setRefTorques ( const double *  t)
overridevirtual

Set the reference value of the torque for all joints.

Parameters
tpointer to the array of torque values
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 757 of file DynamixelAX12FtdiDriver.cpp.

◆ setRefTorques() [2/2]

ReturnValue DynamixelAX12FtdiDriver::setRefTorques ( const int  n_joint,
const int *  joints,
const double *  t 
)
overridevirtual

Set new torque reference for a subset of joints.

Parameters
jointspointer to the array of joint numbers
refspointer to the array specifying the new torque reference
Returns
true/false on success/failure

Implements yarp::dev::ITorqueControl.

Definition at line 1001 of file DynamixelAX12FtdiDriver.cpp.

◆ setTorque()

ReturnValue DynamixelAX12FtdiDriver::setTorque ( int  j,
double  t 
)
Parameters
thas 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 598 of file DynamixelAX12FtdiDriver.cpp.

◆ setTorqueErrorLimit()

ReturnValue DynamixelAX12FtdiDriver::setTorqueErrorLimit ( int  j,
double  limit 
)

Definition at line 661 of file DynamixelAX12FtdiDriver.cpp.

◆ setTorqueErrorLimits()

ReturnValue DynamixelAX12FtdiDriver::setTorqueErrorLimits ( const double *  limits)

Definition at line 666 of file DynamixelAX12FtdiDriver.cpp.

◆ setTorqueOffset()

ReturnValue DynamixelAX12FtdiDriver::setTorqueOffset ( int  j,
double  v 
)

Definition at line 726 of file DynamixelAX12FtdiDriver.cpp.

◆ setTorquePid()

ReturnValue DynamixelAX12FtdiDriver::setTorquePid ( int  j,
const Pid &  pid 
)

Definition at line 616 of file DynamixelAX12FtdiDriver.cpp.

◆ setTorquePids()

ReturnValue DynamixelAX12FtdiDriver::setTorquePids ( const Pid *  pids)

Definition at line 656 of file DynamixelAX12FtdiDriver.cpp.

◆ setTorques()

ReturnValue DynamixelAX12FtdiDriver::setTorques ( const double *  t)

Definition at line 585 of file DynamixelAX12FtdiDriver.cpp.

◆ setTrajAcceleration()

ReturnValue DynamixelAX12FtdiDriver::setTrajAcceleration ( int  j,
double  acc 
)
overridevirtual

not implemented

Implements yarp::dev::IPositionControl.

Definition at line 496 of file DynamixelAX12FtdiDriver.cpp.

◆ setTrajAccelerations() [1/2]

ReturnValue DynamixelAX12FtdiDriver::setTrajAccelerations ( const double *  accs)
overridevirtual

not implemented

Implements yarp::dev::IPositionControl.

Definition at line 503 of file DynamixelAX12FtdiDriver.cpp.

◆ setTrajAccelerations() [2/2]

ReturnValue DynamixelAX12FtdiDriver::setTrajAccelerations ( const int  n_joint,
const int *  joints,
const double *  accs 
)
overridevirtual

Set reference acceleration on all joints.

This is the value that is used during the generation of the trajectory.

Parameters
jointspointer to the array of joint numbers
accspointer to the array with acceleration values
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControl.

Definition at line 946 of file DynamixelAX12FtdiDriver.cpp.

◆ setTrajSpeed()

ReturnValue DynamixelAX12FtdiDriver::setTrajSpeed ( int  j,
double  sp 
)
overridevirtual

Set reference speed for a joint, this is the speed used during the interpolation of the trajectory.

Parameters
jjoint number
spspeed value
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControl.

Definition at line 469 of file DynamixelAX12FtdiDriver.cpp.

◆ setTrajSpeeds() [1/2]

ReturnValue DynamixelAX12FtdiDriver::setTrajSpeeds ( const double *  spds)
overridevirtual

Set reference speed on all joints.

These values are used during the interpolation of the trajectory.

Parameters
spdspointer to the array of speed values.
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControl.

Definition at line 484 of file DynamixelAX12FtdiDriver.cpp.

◆ setTrajSpeeds() [2/2]

ReturnValue DynamixelAX12FtdiDriver::setTrajSpeeds ( const int  n_joint,
const int *  joints,
const double *  spds 
)
overridevirtual

Set reference speed on all joints.

These values are used during the interpolation of the trajectory.

Parameters
jointspointer to the array of joint numbers
spdspointer to the array with speed values.
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControl.

Definition at line 936 of file DynamixelAX12FtdiDriver.cpp.

◆ stop() [1/3]

ReturnValue DynamixelAX12FtdiDriver::stop ( )
overridevirtual

Stop motion, multiple joints.

Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 537 of file DynamixelAX12FtdiDriver.cpp.

◆ stop() [2/3]

ReturnValue DynamixelAX12FtdiDriver::stop ( const int  n_joint,
const int *  joints 
)
overridevirtual

Stop motion for subset of joints.

Parameters
jointspointer to the array of joint numbers
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 976 of file DynamixelAX12FtdiDriver.cpp.

◆ stop() [3/3]

ReturnValue DynamixelAX12FtdiDriver::stop ( int  j)
overridevirtual

Stop motion, single joint.

Parameters
jjoint number
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 533 of file DynamixelAX12FtdiDriver.cpp.


The documentation for this class was generated from the following files: