24 stream_IPosCtrl(nullptr),
25 stream_IPosDirect(nullptr),
27 stream_ITorque(nullptr),
29 stream_ICurrent(nullptr),
67 yCError(
CONTROLBOARDWRAPPER,
"Received command vector with number of elements bigger than axis controlled by this wrapper (cmd: %s requested jnts: %d received jnts: %d)\n",str.c_str(),
stream_nJoints,(
int)cmdVector.
size());
70 if (cmdVector.
data()==
nullptr)
145 if (((
int)jlut->
size() != n_joints) && ((
int)cmdVector.
size() != n_joints))
147 yCError(
CONTROLBOARDWRAPPER,
"Received VOCAB_CURRENT_REF_GROUP size of joints vector or currents vector does not match the selected joint number\n");
150 int *joint_list =
new int[n_joints];
151 for (
int i = 0; i < n_joints; i++)
255 if( ((
int)jlut->
size() != n_joints) && ((
int)cmdVector.
size() != n_joints) )
257 yCError(
CONTROLBOARDWRAPPER,
"Received VOCAB_TORQUES_DIRECT_GROUP size of joints vector or torques vector does not match the selected joint number\n" );
260 int *joint_list =
new int[n_joints];
261 for (
int i = 0; i < n_joints; i++)
280 if( ((
int)jlut->
size() != n_joints) && ((
int)cmdVector.
size() != n_joints) )
282 yCError(
CONTROLBOARDWRAPPER,
"Received VOCAB_POSITION_DIRECT_GROUP size of joints vector or positions vector does not match the selected joint number\n" );
285 int *joint_list =
new int[n_joints];
286 for (
int i = 0; i < n_joints; i++)
315 if( ((
int)jlut->
size() != n_joints) && ((
int)cmdVector.
size() != n_joints) )
316 yCError(
CONTROLBOARDWRAPPER,
"Received VOCAB_VELOCITY_MOVE_GROUP size of joints vector or positions vector does not match the selected joint number\n" );
318 int *joint_list =
new int[n_joints];
319 for (
int i = 0; i < n_joints; i++)
constexpr yarp::conf::vocab32_t VOCAB_VELOCITY_MOVE
constexpr yarp::conf::vocab32_t VOCAB_VELOCITY_MODE
constexpr yarp::conf::vocab32_t VOCAB_POSITION_MODE
constexpr yarp::conf::vocab32_t VOCAB_VELOCITY_MOVES
constexpr yarp::conf::vocab32_t VOCAB_POSITION_MOVES
const yarp::os::LogComponent & CONTROLBOARDWRAPPER()
constexpr yarp::conf::vocab32_t VOCAB_CURRENT_REF_GROUP
constexpr yarp::conf::vocab32_t VOCAB_CURRENT_REFS
constexpr yarp::conf::vocab32_t VOCAB_CURRENTCONTROL_INTERFACE
constexpr yarp::conf::vocab32_t VOCAB_CURRENT_REF
constexpr yarp::conf::vocab32_t VOCAB_PWMCONTROL_INTERFACE
constexpr yarp::conf::vocab32_t VOCAB_PWMCONTROL_REF_PWMS
constexpr yarp::conf::vocab32_t VOCAB_PWMCONTROL_REF_PWM
constexpr yarp::conf::vocab32_t VOCAB_POSITION_DIRECTS
constexpr yarp::conf::vocab32_t VOCAB_POSITION_DIRECT
constexpr yarp::conf::vocab32_t VOCAB_POSITION_DIRECT_GROUP
constexpr yarp::conf::vocab32_t VOCAB_TORQUES_DIRECTS
constexpr yarp::conf::vocab32_t VOCAB_TORQUES_DIRECT_GROUP
constexpr yarp::conf::vocab32_t VOCAB_TORQUES_DIRECT
constexpr yarp::conf::vocab32_t VOCAB_VELOCITY_MOVE_GROUP
yarp::dev::IPositionDirect * stream_IPosDirect
void init(ControlBoardWrapper *x)
Initialization.
StreamingMessagesParser()
Constructor.
yarp::dev::IVelocityControl * stream_IVel
yarp::dev::ICurrentControl * stream_ICurrent
void onRead(CommandMessage &v) override
Callback function.
yarp::dev::IPWMControl * stream_IPWM
yarp::dev::ITorqueControl * stream_ITorque
yarp::dev::IPositionControl * stream_IPosCtrl
Interface for control boards implementing current control.
virtual bool setRefCurrent(int m, double curr)=0
Set the reference value of the current for a single motor.
virtual bool setRefCurrents(const double *currs)=0
Set the reference value of the currents for all motors.
Interface for controlling an axis, by sending directly a PWM reference signal to a motor.
virtual bool setRefDutyCycle(int m, double ref)=0
Sets the reference dutycycle to a single motor.
virtual bool setRefDutyCycles(const double *refs)=0
Sets the reference dutycycle for all the motors.
Interface for a generic control board device implementing position control.
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
virtual bool positionMove(int j, double ref)=0
Set new reference point for a single axis.
Interface for a generic control board device implementing position control.
virtual bool setPositions(const int n_joint, const int *joints, const double *refs)=0
Set new reference point for all axes.
virtual bool setPosition(int j, double ref)=0
Set new position for a single axis.
Interface for control boards implementing torque control.
virtual bool setRefTorque(int j, double t)=0
Set the reference value of the torque for a given joint.
virtual bool setRefTorques(const double *t)=0
Set the reference value of the torque for all joints.
Interface for control boards implementing velocity control.
virtual bool velocityMove(int j, double sp)=0
Start motion at a given speed, single joint.
A simple collection of objects that can be described and transmitted in a portable way.
size_type size() const
Gets the number of elements in the bottle.
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
std::string toString() const override
Gives a human-readable textual representation of the bottle.
Group a pair of objects to be sent and received together.
BODY body
An object of the second type (BODY).
HEAD head
An object of the first type (HEAD).
virtual std::int32_t asInt32() const
Get 32-bit integer value.
virtual Bottle * asList() const
Get list value.
virtual std::int32_t asVocab() const
Get vocabulary identifier as an integer.
std::string toString(int precision=-1, int width=-1) const
Creates a string object containing a text representation of the object.
T * data()
Return a pointer to the first element of the vector.
#define yCError(component,...)
#define yCTrace(component,...)
An interface for the device drivers.
std::string decode(NetInt32 code)
Convert a vocabulary identifier into a string.
An interface to the operating system, including Port based communication.