class Command

August 13, 2019 ยท View on GitHub

Member values

Member nameData typeDescription
command_idMessageIdMessageId
flagsuint32Command flags (see enum CommandFlags)
positionfloat32Desired position of the actuator (degrees)
velocityfloat32Desired velocity of the actuator (degrees per second)
torque_jointfloat32Desired torque of the actuator (Newton-meters)
current_motorfloat32Desired current of the motor (Amperes)

Member functions

Function nameReturn typeInput typeDescription
has_command_id() constboolvoidReturns true if command_id is set.
command_id()const MessageId&voidReturns the current value of command_id. If command_id is not set, returns a MessageId with none of its fields set (possibly command_id::default_instance()).
mutable_command_id()MessageId *voidReturns a pointer to the mutable MessageId object that stores the field's value. If the field was not set prior to the call, then the returned MessageId will have none of its fields set (i.e. it will be identical to a newly-allocated MessageId). After calling this, has_command_id() will return true and command_id() will return a reference to the same instance of MessageId.
clear_command_id()voidvoidClears the value of the field. After calling this, has_command_id() will return false and command_id() will return the default value.
set_allocated_command_id()voidMessageId *Sets the MessageId object to the field and frees the previous field value if it exists. If the MessageId pointer is not NULL, the message takes ownership of the allocated MessageId object and has_ MessageId() will return true. Otherwise, if the command_id is NULL, the behavior is the same as calling clear_command_id().
release_command_id()MessageId *voidReleases the ownership of the field and returns the pointer of the MessageId object. After calling this, caller takes the ownership of the allocated MessageId object, has_command_id() will return false, and command_id() will return the default value.
flags()uint32voidReturns the current value of flags. If the flags is not set, returns 0.
set_flags()voiduint32Sets the value of flags. After calling this, flags() will return value.
clear_flags()voidvoidClears the value of flags. After calling this, flags() will return 0.
position()float32voidReturns the current value of position. If the position is not set, returns 0.
set_position()voidfloat32Sets the value of position. After calling this, position() will return value.
clear_position()voidvoidClears the value of position. After calling this, position() will return 0.
velocity()float32voidReturns the current value of velocity. If the velocity is not set, returns 0.
set_velocity()voidfloat32Sets the value of velocity. After calling this, velocity() will return value.
clear_velocity()voidvoidClears the value of velocity. After calling this, velocity() will return 0.
torque_joint()float32voidReturns the current value of torque_joint. If the torque_joint is not set, returns 0.
set_torque_joint()voidfloat32Sets the value of torque_joint. After calling this, torque_joint() will return value.
clear_torque_joint()voidvoidClears the value of torque_joint. After calling this, torque_joint() will return 0.
current_motor()float32voidReturns the current value of current_motor. If the current_motor is not set, returns 0.
set_current_motor()voidfloat32Sets the value of current_motor. After calling this, current_motor() will return value.
clear_current_motor()voidvoidClears the value of current_motor. After calling this, current_motor() will return 0.

Parent topic: ActuatorCyclic (C++)