#include <yarp/dev/ImplementVelocityControl.h>
Public Member Functions | |
ImplementVelocityControl (yarp::dev::IVelocityControlRaw *y) | |
Constructor. | |
virtual | ~ImplementVelocityControl () |
Destructor. | |
bool | getAxes (int *axes) override |
Get the number of controlled axes. | |
bool | velocityMove (int j, double sp) override |
Start motion at a given speed, single joint. | |
bool | velocityMove (const double *sp) override |
Start motion at a given speed, multiple joints. | |
bool | setRefAcceleration (int j, double acc) override |
Set reference acceleration for a joint. | |
bool | setRefAccelerations (const double *accs) override |
Set reference acceleration on all joints. | |
bool | getRefAcceleration (int j, double *acc) override |
Get reference acceleration for a joint. | |
bool | getRefAccelerations (double *accs) override |
Get reference acceleration of all joints. | |
bool | stop (int j) override |
Stop motion, single joint. | |
bool | stop () override |
Stop motion, multiple joints. | |
bool | velocityMove (const int n_joint, const int *joints, const double *spds) override |
Start motion at a given speed for a subset of joints. | |
bool | getRefVelocity (const int joint, double *vel) override |
Get the last reference speed set by velocityMove for single joint. | |
bool | getRefVelocities (double *vels) override |
Get the last reference speed set by velocityMove for all joints. | |
bool | getRefVelocities (const int n_joint, const int *joints, double *vels) override |
Get the last reference speed set by velocityMove for a group of joints. | |
bool | setRefAccelerations (const int n_joint, const int *joints, const double *accs) override |
Set reference acceleration for a subset of joints. | |
bool | getRefAccelerations (const int n_joint, const int *joints, double *accs) override |
Get reference acceleration for a subset of joints. | |
bool | stop (const int n_joint, const int *joints) override |
Stop motion for a subset of joints. | |
![]() | |
virtual | ~IVelocityControl () |
Destructor. | |
Protected Member Functions | |
bool | initialize (int size, const int *amap, const double *enc, const double *zos) |
Initialize the internal data and alloc memory. | |
bool | uninitialize () |
Clean up internal data and memory. | |
Protected Attributes | |
IVelocityControlRaw * | iVelocity |
void * | helper |
yarp::dev::impl::FixedSizeBuffersManager< int > * | intBuffManager |
yarp::dev::impl::FixedSizeBuffersManager< double > * | doubleBuffManager |
Definition at line 25 of file ImplementVelocityControl.h.
ImplementVelocityControl::ImplementVelocityControl | ( | yarp::dev::IVelocityControlRaw * | y | ) |
Constructor.
y | is the pointer to the class instance inheriting from this implementation. |
Definition at line 17 of file ImplementVelocityControl.cpp.
|
virtual |
Destructor.
Definition at line 24 of file ImplementVelocityControl.cpp.
Get the number of controlled axes.
This command asks the number of controlled axes for the current physical interface. parame axes pointer to storage
Implements yarp::dev::IVelocityControl.
Definition at line 70 of file ImplementVelocityControl.cpp.
Get reference acceleration for a joint.
Returns the acceleration used to generate the trajectory profile.
j | joint number |
acc | pointer to storage for the return value |
Implements yarp::dev::IVelocityControl.
Definition at line 200 of file ImplementVelocityControl.cpp.
|
overridevirtual |
Get reference acceleration for a subset of joints.
These are the values used during the interpolation of the trajectory.
n_joint | how many joints this command is referring to |
joints | list of joints controlled. The size of this array is n_joints |
accs | pointer to the array containing acceleration values, one value for each joint, the size of the array is n_joints. The first value will be the new reference for the joint joints[0]. for example: n_joint 3 joints 0 2 4 accs 10 30 40 |
Implements yarp::dev::IVelocityControl.
Definition at line 211 of file ImplementVelocityControl.cpp.
Get reference acceleration of all joints.
These are the values used during the interpolation of the trajectory.
accs | pointer to the array that will store the acceleration values. |
Implements yarp::dev::IVelocityControl.
Definition at line 238 of file ImplementVelocityControl.cpp.
|
overridevirtual |
Get the last reference speed set by velocityMove for a group of joints.
n_joint | how many joints this command is referring to |
joints | of joints controlled. The size of this array is n_joints |
vels | pointer to the array containing the requested values, one value for each joint. The size of the array is n_joints. |
Reimplemented from yarp::dev::IVelocityControl.
Definition at line 135 of file ImplementVelocityControl.cpp.
Get the last reference speed set by velocityMove for all joints.
vels | pointer to the array containing the new speed values, one value for each joint |
Reimplemented from yarp::dev::IVelocityControl.
Definition at line 126 of file ImplementVelocityControl.cpp.
Get the last reference speed set by velocityMove for single joint.
j | joint number |
vel | returns the requested reference. |
Reimplemented from yarp::dev::IVelocityControl.
Definition at line 115 of file ImplementVelocityControl.cpp.
|
protected |
Initialize the internal data and alloc memory.
size | is the number of controlled axes the driver deals with. |
amap | is a lookup table mapping axes onto physical drivers. |
enc | is an array containing the encoder to angles conversion factors. |
zos | is an array containing the zeros of the encoders. respect to the control/output values of the driver. |
Definition at line 29 of file ImplementVelocityControl.cpp.
Set reference acceleration for a joint.
This value is used during the trajectory generation.
j | joint number |
acc | acceleration value |
Implements yarp::dev::IVelocityControl.
Definition at line 161 of file ImplementVelocityControl.cpp.
Set reference acceleration on all joints.
This is the valure that is used during the generation of the trajectory.
accs | pointer to the array of acceleration values |
Implements yarp::dev::IVelocityControl.
Definition at line 191 of file ImplementVelocityControl.cpp.
|
overridevirtual |
Set reference acceleration for a subset of joints.
This is the valure that is used during the generation of the trajectory.
n_joint | how many joints this command is referring to |
joints | list of joints controlled. The size of this array is n_joints |
accs | pointer to the array containing acceleration values, one value for each joint, the size of the array is n_joints. The first value will be the new reference for the joint joints[0]. for example: n_joint 3 joints 0 2 4 accs 10 30 40 |
Implements yarp::dev::IVelocityControl.
Definition at line 170 of file ImplementVelocityControl.cpp.
|
overridevirtual |
Stop motion, multiple joints.
Implements yarp::dev::IVelocityControl.
Definition at line 274 of file ImplementVelocityControl.cpp.
Stop motion for a subset of joints.
n_joint | how many joints this command is referring to |
joints | joints pointer to the array of joint numbers |
Implements yarp::dev::IVelocityControl.
Definition at line 257 of file ImplementVelocityControl.cpp.
Stop motion, single joint.
j | joint number |
Implements yarp::dev::IVelocityControl.
Definition at line 248 of file ImplementVelocityControl.cpp.
|
protected |
Clean up internal data and memory.
Definition at line 47 of file ImplementVelocityControl.cpp.
Start motion at a given speed, multiple joints.
sp | pointer to the array containing the new speed values |
Implements yarp::dev::IVelocityControl.
Definition at line 106 of file ImplementVelocityControl.cpp.
|
overridevirtual |
Start motion at a given speed for a subset of joints.
n_joint | how many joints this command is referring to |
joints | of joints controlled. The size of this array is n_joints |
spds | pointer to the array containing the new speed values, one value for each joint, the size of the array is n_joints. The first value will be the new reference for the joint joints[0]. for example: n_joint 3 joints 0 2 4 spds 10 30 40 |
Implements yarp::dev::IVelocityControl.
Definition at line 85 of file ImplementVelocityControl.cpp.
Start motion at a given speed, single joint.
j | joint number |
sp | speed value |
Implements yarp::dev::IVelocityControl.
Definition at line 76 of file ImplementVelocityControl.cpp.
|
protected |
Definition at line 31 of file ImplementVelocityControl.h.
|
protected |
Definition at line 29 of file ImplementVelocityControl.h.
|
protected |
Definition at line 30 of file ImplementVelocityControl.h.
|
protected |
Definition at line 28 of file ImplementVelocityControl.h.