Fawkes API
Fawkes Development Version
|
DynamixelServoInterface Fawkes BlackBoard Interface. More...
#include <>>
Public Types | |
enum | ErrorCode { ERROR_NONE = 0, ERROR_UNSPECIFIC = 1, ERROR_COMMUNICATION = 2, ERROR_ANGLE_OUTOFRANGE = 4 } |
Error code to explain an error. More... | |
enum | WorkingMode { JOINT = 0, WHEEL = 1 } |
Mode to be set for the servo. More... | |
Public Member Functions | |
const char * | tostring_ErrorCode (ErrorCode value) const |
Convert ErrorCode constant to string. More... | |
const char * | tostring_WorkingMode (WorkingMode value) const |
Convert WorkingMode constant to string. More... | |
virtual bool | message_valid (const Message *message) const |
Check if message is valid and can be enqueued. More... | |
char * | model () const |
Get model value. More... | |
void | set_model (const char *new_model) |
Set model value. More... | |
size_t | maxlenof_model () const |
Get maximum length of model value. More... | |
uint32_t | model_number () const |
Get model_number value. More... | |
void | set_model_number (const uint32_t new_model_number) |
Set model_number value. More... | |
size_t | maxlenof_model_number () const |
Get maximum length of model_number value. More... | |
uint32_t | cw_angle_limit () const |
Get cw_angle_limit value. More... | |
void | set_cw_angle_limit (const uint32_t new_cw_angle_limit) |
Set cw_angle_limit value. More... | |
size_t | maxlenof_cw_angle_limit () const |
Get maximum length of cw_angle_limit value. More... | |
uint32_t | ccw_angle_limit () const |
Get ccw_angle_limit value. More... | |
void | set_ccw_angle_limit (const uint32_t new_ccw_angle_limit) |
Set ccw_angle_limit value. More... | |
size_t | maxlenof_ccw_angle_limit () const |
Get maximum length of ccw_angle_limit value. More... | |
uint8_t | temperature_limit () const |
Get temperature_limit value. More... | |
void | set_temperature_limit (const uint8_t new_temperature_limit) |
Set temperature_limit value. More... | |
size_t | maxlenof_temperature_limit () const |
Get maximum length of temperature_limit value. More... | |
uint32_t | max_torque () const |
Get max_torque value. More... | |
void | set_max_torque (const uint32_t new_max_torque) |
Set max_torque value. More... | |
size_t | maxlenof_max_torque () const |
Get maximum length of max_torque value. More... | |
uint8_t | cw_margin () const |
Get cw_margin value. More... | |
void | set_cw_margin (const uint8_t new_cw_margin) |
Set cw_margin value. More... | |
size_t | maxlenof_cw_margin () const |
Get maximum length of cw_margin value. More... | |
uint8_t | ccw_margin () const |
Get ccw_margin value. More... | |
void | set_ccw_margin (const uint8_t new_ccw_margin) |
Set ccw_margin value. More... | |
size_t | maxlenof_ccw_margin () const |
Get maximum length of ccw_margin value. More... | |
uint8_t | cw_slope () const |
Get cw_slope value. More... | |
void | set_cw_slope (const uint8_t new_cw_slope) |
Set cw_slope value. More... | |
size_t | maxlenof_cw_slope () const |
Get maximum length of cw_slope value. More... | |
uint8_t | ccw_slope () const |
Get ccw_slope value. More... | |
void | set_ccw_slope (const uint8_t new_ccw_slope) |
Set ccw_slope value. More... | |
size_t | maxlenof_ccw_slope () const |
Get maximum length of ccw_slope value. More... | |
uint32_t | goal_position () const |
Get goal_position value. More... | |
void | set_goal_position (const uint32_t new_goal_position) |
Set goal_position value. More... | |
size_t | maxlenof_goal_position () const |
Get maximum length of goal_position value. More... | |
uint32_t | goal_speed () const |
Get goal_speed value. More... | |
void | set_goal_speed (const uint32_t new_goal_speed) |
Set goal_speed value. More... | |
size_t | maxlenof_goal_speed () const |
Get maximum length of goal_speed value. More... | |
uint32_t | torque_limit () const |
Get torque_limit value. More... | |
void | set_torque_limit (const uint32_t new_torque_limit) |
Set torque_limit value. More... | |
size_t | maxlenof_torque_limit () const |
Get maximum length of torque_limit value. More... | |
uint32_t | position () const |
Get position value. More... | |
void | set_position (const uint32_t new_position) |
Set position value. More... | |
size_t | maxlenof_position () const |
Get maximum length of position value. More... | |
uint32_t | speed () const |
Get speed value. More... | |
void | set_speed (const uint32_t new_speed) |
Set speed value. More... | |
size_t | maxlenof_speed () const |
Get maximum length of speed value. More... | |
uint32_t | load () const |
Get load value. More... | |
void | set_load (const uint32_t new_load) |
Set load value. More... | |
size_t | maxlenof_load () const |
Get maximum length of load value. More... | |
uint8_t | voltage () const |
Get voltage value. More... | |
void | set_voltage (const uint8_t new_voltage) |
Set voltage value. More... | |
size_t | maxlenof_voltage () const |
Get maximum length of voltage value. More... | |
uint8_t | temperature () const |
Get temperature value. More... | |
void | set_temperature (const uint8_t new_temperature) |
Set temperature value. More... | |
size_t | maxlenof_temperature () const |
Get maximum length of temperature value. More... | |
uint32_t | punch () const |
Get punch value. More... | |
void | set_punch (const uint32_t new_punch) |
Set punch value. More... | |
size_t | maxlenof_punch () const |
Get maximum length of punch value. More... | |
uint8_t | alarm_shutdown () const |
Get alarm_shutdown value. More... | |
void | set_alarm_shutdown (const uint8_t new_alarm_shutdown) |
Set alarm_shutdown value. More... | |
size_t | maxlenof_alarm_shutdown () const |
Get maximum length of alarm_shutdown value. More... | |
uint8_t | error () const |
Get error value. More... | |
void | set_error (const uint8_t new_error) |
Set error value. More... | |
size_t | maxlenof_error () const |
Get maximum length of error value. More... | |
bool | is_enable_prevent_alarm_shutdown () const |
Get enable_prevent_alarm_shutdown value. More... | |
void | set_enable_prevent_alarm_shutdown (const bool new_enable_prevent_alarm_shutdown) |
Set enable_prevent_alarm_shutdown value. More... | |
size_t | maxlenof_enable_prevent_alarm_shutdown () const |
Get maximum length of enable_prevent_alarm_shutdown value. More... | |
float | angle () const |
Get angle value. More... | |
void | set_angle (const float new_angle) |
Set angle value. More... | |
size_t | maxlenof_angle () const |
Get maximum length of angle value. More... | |
bool | is_enabled () const |
Get enabled value. More... | |
void | set_enabled (const bool new_enabled) |
Set enabled value. More... | |
size_t | maxlenof_enabled () const |
Get maximum length of enabled value. More... | |
float | min_angle () const |
Get min_angle value. More... | |
void | set_min_angle (const float new_min_angle) |
Set min_angle value. More... | |
size_t | maxlenof_min_angle () const |
Get maximum length of min_angle value. More... | |
float | max_angle () const |
Get max_angle value. More... | |
void | set_max_angle (const float new_max_angle) |
Set max_angle value. More... | |
size_t | maxlenof_max_angle () const |
Get maximum length of max_angle value. More... | |
float | max_velocity () const |
Get max_velocity value. More... | |
void | set_max_velocity (const float new_max_velocity) |
Set max_velocity value. More... | |
size_t | maxlenof_max_velocity () const |
Get maximum length of max_velocity value. More... | |
float | velocity () const |
Get velocity value. More... | |
void | set_velocity (const float new_velocity) |
Set velocity value. More... | |
size_t | maxlenof_velocity () const |
Get maximum length of velocity value. More... | |
char * | mode () const |
Get mode value. More... | |
void | set_mode (const char *new_mode) |
Set mode value. More... | |
size_t | maxlenof_mode () const |
Get maximum length of mode value. More... | |
float | angle_margin () const |
Get angle_margin value. More... | |
void | set_angle_margin (const float new_angle_margin) |
Set angle_margin value. More... | |
size_t | maxlenof_angle_margin () const |
Get maximum length of angle_margin value. More... | |
bool | is_autorecover_enabled () const |
Get autorecover_enabled value. More... | |
void | set_autorecover_enabled (const bool new_autorecover_enabled) |
Set autorecover_enabled value. More... | |
size_t | maxlenof_autorecover_enabled () const |
Get maximum length of autorecover_enabled value. More... | |
uint32_t | msgid () const |
Get msgid value. More... | |
void | set_msgid (const uint32_t new_msgid) |
Set msgid value. More... | |
size_t | maxlenof_msgid () const |
Get maximum length of msgid value. More... | |
bool | is_final () const |
Get final value. More... | |
void | set_final (const bool new_final) |
Set final value. More... | |
size_t | maxlenof_final () const |
Get maximum length of final value. More... | |
ErrorCode | error_code () const |
Get error_code value. More... | |
void | set_error_code (const ErrorCode new_error_code) |
Set error_code value. More... | |
size_t | maxlenof_error_code () const |
Get maximum length of error_code value. More... | |
virtual Message * | create_message (const char *type) const |
Create message based on type name. More... | |
virtual void | copy_values (const Interface *other) |
Copy values from other interface. More... | |
virtual const char * | enum_tostring (const char *enumtype, int val) const |
Convert arbitrary enum value to string. More... | |
![]() | |
virtual | ~Interface () |
Destructor. More... | |
bool | oftype (const char *interface_type) const |
Check if interface is of given type. More... | |
const void * | datachunk () const |
Get data chunk. More... | |
unsigned int | datasize () const |
Get data size. More... | |
const char * | type () const |
Get type of interface. More... | |
const char * | id () const |
Get identifier of interface. More... | |
const char * | uid () const |
Get unique identifier of interface. More... | |
unsigned short | serial () const |
Get instance serial of interface. More... | |
unsigned int | mem_serial () const |
Get memory serial of interface. More... | |
bool | operator== (Interface &comp) const |
Check equality of two interfaces. More... | |
const unsigned char * | hash () const |
Get interface hash. More... | |
size_t | hash_size () const |
Get size of interface hash. More... | |
const char * | hash_printable () const |
Get printable interface hash. More... | |
bool | is_writer () const |
Check if this is a writing instance. More... | |
void | set_validity (bool valid) |
Mark this interface invalid. More... | |
bool | is_valid () const |
Check validity of interface. More... | |
const char * | owner () const |
Get owner of interface. More... | |
void | set_from_chunk (void *chunk) |
Set from a raw data chunk. More... | |
void | resize_buffers (unsigned int num_buffers) |
Resize buffer array. More... | |
unsigned int | num_buffers () const |
Get number of buffers. More... | |
void | copy_shared_to_buffer (unsigned int buffer) |
Copy data from private memory to buffer. More... | |
void | copy_private_to_buffer (unsigned int buffer) |
Copy data from private memory to buffer. More... | |
void | read_from_buffer (unsigned int buffer) |
Copy data from buffer to private memory. More... | |
int | compare_buffers (unsigned int buffer) |
Compare buffer to private memory. More... | |
Time | buffer_timestamp (unsigned int buffer) |
Get time of a buffer. More... | |
void | buffer_timestamp (unsigned int buffer, Time *timestamp) |
Get time of a buffer. More... | |
void | read () |
Read from BlackBoard into local copy. More... | |
void | write () |
Write from local copy into BlackBoard memory. More... | |
bool | has_writer () const |
Check if there is a writer for the interface. More... | |
unsigned int | num_readers () const |
Get the number of readers. More... | |
std::string | writer () const |
Get owner name of writing interface instance. More... | |
std::list< std::string > | readers () const |
Get owner names of reading interface instances. More... | |
bool | changed () const |
Check if data has been changed. More... | |
const Time * | timestamp () const |
Get timestamp of last write. More... | |
void | set_auto_timestamping (bool enabled) |
Enable or disable automated timestamping. More... | |
void | set_timestamp (const Time *t=NULL) |
Set timestamp. More... | |
void | set_clock (Clock *clock) |
Set clock to use for timestamping. More... | |
void | mark_data_changed () |
Mark data as changed. More... | |
std::list< const char * > | get_message_types () |
Obtain a list of textual representations of the message types available for this interface. More... | |
unsigned int | msgq_enqueue (Message *message) |
Enqueue message at end of queue. More... | |
unsigned int | msgq_enqueue_copy (Message *message) |
Enqueue copy of message at end of queue. More... | |
void | msgq_remove (Message *message) |
Remove message from queue. More... | |
void | msgq_remove (unsigned int message_id) |
Remove message from queue. More... | |
unsigned int | msgq_size () |
Get size of message queue. More... | |
void | msgq_flush () |
Flush all messages. More... | |
void | msgq_lock () |
Lock message queue. More... | |
bool | msgq_try_lock () |
Try to lock message queue. More... | |
void | msgq_unlock () |
Unlock message queue. More... | |
void | msgq_pop () |
Erase first message from queue. More... | |
Message * | msgq_first () |
Get the first message from the message queue. More... | |
bool | msgq_empty () |
Check if queue is empty. More... | |
void | msgq_append (Message *message) |
Enqueue message. More... | |
template<class MessageType > | |
bool | msgq_first_is () |
Check if first message has desired type. More... | |
template<class MessageType > | |
MessageType * | msgq_first () |
Get first message casted to the desired type. More... | |
template<class MessageType > | |
MessageType * | msgq_first (MessageType *&msg) |
Get first message casted to the desired type. More... | |
template<class MessageType > | |
MessageType * | msgq_first_safe (MessageType *&msg) throw () |
Get first message casted to the desired type without exceptions. More... | |
MessageQueue::MessageIterator | msgq_begin () |
Get start iterator for message queue. More... | |
MessageQueue::MessageIterator | msgq_end () |
Get end iterator for message queue. More... | |
InterfaceFieldIterator | fields () |
Get iterator over all fields of this interface instance. More... | |
InterfaceFieldIterator | fields_end () |
Invalid iterator. More... | |
unsigned int | num_fields () |
Get the number of fields in the interface. More... | |
Additional Inherited Members | |
![]() | |
static void | parse_uid (const char *uid, std::string &type, std::string &id) |
Parse UID to type and ID strings. More... | |
![]() | |
Interface () | |
Constructor. More... | |
void | set_hash (unsigned char *ihash) |
Set hash. More... | |
void | add_fieldinfo (interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0, const interface_enum_map_t *enum_map=0) |
Add an entry to the field info list. More... | |
void | add_messageinfo (const char *name) |
Add an entry to the message info list. More... | |
![]() | |
void * | data_ptr |
Pointer to local memory storage. More... | |
unsigned int | data_size |
Minimal data size to hold data storage. More... | |
bool | data_changed |
Indicator if data has changed. More... | |
interface_data_ts_t * | data_ts |
Pointer to data casted to timestamp struct. More... | |
DynamixelServoInterface Fawkes BlackBoard Interface.
Interface to access Robotis Dynamixel Servos.
Definition at line 33 of file DynamixelServoInterface.h.
Error code to explain an error.
Enumerator | |
---|---|
ERROR_NONE | No error occured. |
ERROR_UNSPECIFIC | Some unspecified error occured. |
ERROR_COMMUNICATION | Communication with device failed. |
ERROR_ANGLE_OUTOFRANGE | Desired angle is out of range. |
Definition at line 42 of file DynamixelServoInterface.h.
Mode to be set for the servo.
Definition at line 55 of file DynamixelServoInterface.h.
uint8_t fawkes::DynamixelServoInterface::alarm_shutdown | ( | ) | const |
Get alarm_shutdown value.
Alarm Shutdown. The bitmask is set as follows (taken from Trossen Robotics PDF "AX-12(English).pdf"): Bit 7: 0 Bit 6: If set to 1, torque off when an Instruction Error occurs Bit 5: If set to 1, torque off when an Overload Error occurs Bit 4: If set to 1, torque off when a Checksum Error occurs Bit 3: If set to 1, torque off when a Range Error occurs Bit 2: If set to 1, torque off when an Overheating Error occurs Bit 1: If set to 1, torque off when an Angle Limit Error occurs Bit 0: If set to 1, torque off when an Input Voltage Error occurs
Definition at line 754 of file DynamixelServoInterface.cpp.
float fawkes::DynamixelServoInterface::angle | ( | ) | const |
Get angle value.
Current angle.
Definition at line 877 of file DynamixelServoInterface.cpp.
float fawkes::DynamixelServoInterface::angle_margin | ( | ) | const |
Get angle_margin value.
Margin in radians around a target servo value to consider the motion as final.
Definition at line 1097 of file DynamixelServoInterface.cpp.
uint32_t fawkes::DynamixelServoInterface::ccw_angle_limit | ( | ) | const |
Get ccw_angle_limit value.
Counter-clockwise angle limit
Definition at line 248 of file DynamixelServoInterface.cpp.
uint8_t fawkes::DynamixelServoInterface::ccw_margin | ( | ) | const |
Get ccw_margin value.
CCW Compliance Margin
Definition at line 372 of file DynamixelServoInterface.cpp.
uint8_t fawkes::DynamixelServoInterface::ccw_slope | ( | ) | const |
Get ccw_slope value.
CCW Compliance Slope
Definition at line 434 of file DynamixelServoInterface.cpp.
|
virtual |
Copy values from other interface.
other | other interface to copy values from |
Implements fawkes::Interface.
Definition at line 1309 of file DynamixelServoInterface.cpp.
References fawkes::Interface::type().
|
virtual |
Create message based on type name.
This will create a new message of the given type. The type must be given without the InterfaceName:: prefix but just the plain class name of the message.
type | message type |
UnknownTypeException | thrown if this interface cannot create a message of the given type. |
Implements fawkes::Interface.
Definition at line 1258 of file DynamixelServoInterface.cpp.
uint32_t fawkes::DynamixelServoInterface::cw_angle_limit | ( | ) | const |
Get cw_angle_limit value.
Clockwise angle limit
Definition at line 217 of file DynamixelServoInterface.cpp.
uint8_t fawkes::DynamixelServoInterface::cw_margin | ( | ) | const |
Get cw_margin value.
CW Compliance Margin
Definition at line 341 of file DynamixelServoInterface.cpp.
uint8_t fawkes::DynamixelServoInterface::cw_slope | ( | ) | const |
Get cw_slope value.
CW Compliance Slope
Definition at line 403 of file DynamixelServoInterface.cpp.
|
virtual |
Convert arbitrary enum value to string.
Given the string representation of the enum type and the value this method returns the string representation of the specific value, or the string UNKNOWN if the value is not defined. An exception is thrown if the enum type is invalid.
enumtype | enum type as string |
val | value to convert |
UnknownTypeException | thrown if enumtype is not specified for interface. |
Implements fawkes::Interface.
Definition at line 1320 of file DynamixelServoInterface.cpp.
uint8_t fawkes::DynamixelServoInterface::error | ( | ) | const |
Get error value.
Raw error code from servo. The bitmask is set as follows (taken from Trossen Robotics PDF "AX-12(English).pdf"): Bit 7: 0 Bit 6: Set to 1 if an undefined instruction is sent or an action instruction is sent without a Reg_Write instruction. Bit 5: Set to 1 if the specified maximum torque can't control the applied load. Bit 4: Set to 1 if the checksum of the instruction packet is incorrect. Bit 3: Set to 1 if the instruction sent is out of the defined range. Bit 2: Set to 1 if the internal temperature of the Dynamixel unit is above the operating temperature range as defined in the control table. Bit 1: Set as 1 if the Goal Position is set outside of the range between CW Angle Limit and CCW Angle Limit. Bit 0: Set to 1 if the voltage is out of the operating voltage range as defined in the control table.
Definition at line 805 of file DynamixelServoInterface.cpp.
DynamixelServoInterface::ErrorCode fawkes::DynamixelServoInterface::error_code | ( | ) | const |
Get error_code value.
Failure code set if final is true. ERROR_NONE if no error occured.
Definition at line 1229 of file DynamixelServoInterface.cpp.
uint32_t fawkes::DynamixelServoInterface::goal_position | ( | ) | const |
Get goal_position value.
Goal position
Definition at line 465 of file DynamixelServoInterface.cpp.
uint32_t fawkes::DynamixelServoInterface::goal_speed | ( | ) | const |
Get goal_speed value.
Goal speed
Definition at line 496 of file DynamixelServoInterface.cpp.
bool fawkes::DynamixelServoInterface::is_autorecover_enabled | ( | ) | const |
Get autorecover_enabled value.
Automatically recover on alarm shutdown
Definition at line 1131 of file DynamixelServoInterface.cpp.
bool fawkes::DynamixelServoInterface::is_enable_prevent_alarm_shutdown | ( | ) | const |
Get enable_prevent_alarm_shutdown value.
Enable alarm shutdown
Definition at line 846 of file DynamixelServoInterface.cpp.
bool fawkes::DynamixelServoInterface::is_enabled | ( | ) | const |
Get enabled value.
Is the servo enabled?
Definition at line 908 of file DynamixelServoInterface.cpp.
bool fawkes::DynamixelServoInterface::is_final | ( | ) | const |
Get final value.
True, if the last goto command has been finished, false if it is still running
Definition at line 1196 of file DynamixelServoInterface.cpp.
uint32_t fawkes::DynamixelServoInterface::load | ( | ) | const |
Get load value.
Present load
Definition at line 620 of file DynamixelServoInterface.cpp.
float fawkes::DynamixelServoInterface::max_angle | ( | ) | const |
Get max_angle value.
Maximum angle allowed.
Definition at line 970 of file DynamixelServoInterface.cpp.
uint32_t fawkes::DynamixelServoInterface::max_torque | ( | ) | const |
Get max_torque value.
Max torque
Definition at line 310 of file DynamixelServoInterface.cpp.
float fawkes::DynamixelServoInterface::max_velocity | ( | ) | const |
Get max_velocity value.
Maximum supported velocity.
Definition at line 1001 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_alarm_shutdown | ( | ) | const |
Get maximum length of alarm_shutdown value.
Definition at line 764 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_angle | ( | ) | const |
Get maximum length of angle value.
Definition at line 887 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_angle_margin | ( | ) | const |
Get maximum length of angle_margin value.
Definition at line 1107 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_autorecover_enabled | ( | ) | const |
Get maximum length of autorecover_enabled value.
Definition at line 1141 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_ccw_angle_limit | ( | ) | const |
Get maximum length of ccw_angle_limit value.
Definition at line 258 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_ccw_margin | ( | ) | const |
Get maximum length of ccw_margin value.
Definition at line 382 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_ccw_slope | ( | ) | const |
Get maximum length of ccw_slope value.
Definition at line 444 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_cw_angle_limit | ( | ) | const |
Get maximum length of cw_angle_limit value.
Definition at line 227 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_cw_margin | ( | ) | const |
Get maximum length of cw_margin value.
Definition at line 351 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_cw_slope | ( | ) | const |
Get maximum length of cw_slope value.
Definition at line 413 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_enable_prevent_alarm_shutdown | ( | ) | const |
Get maximum length of enable_prevent_alarm_shutdown value.
Definition at line 856 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_enabled | ( | ) | const |
Get maximum length of enabled value.
Definition at line 918 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_error | ( | ) | const |
Get maximum length of error value.
Definition at line 815 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_error_code | ( | ) | const |
Get maximum length of error_code value.
Definition at line 1239 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_final | ( | ) | const |
Get maximum length of final value.
Definition at line 1206 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_goal_position | ( | ) | const |
Get maximum length of goal_position value.
Definition at line 475 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_goal_speed | ( | ) | const |
Get maximum length of goal_speed value.
Definition at line 506 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_load | ( | ) | const |
Get maximum length of load value.
Definition at line 630 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_max_angle | ( | ) | const |
Get maximum length of max_angle value.
Definition at line 980 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_max_torque | ( | ) | const |
Get maximum length of max_torque value.
Definition at line 320 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_max_velocity | ( | ) | const |
Get maximum length of max_velocity value.
Definition at line 1011 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_min_angle | ( | ) | const |
Get maximum length of min_angle value.
Definition at line 949 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_mode | ( | ) | const |
Get maximum length of mode value.
Definition at line 1073 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_model | ( | ) | const |
Get maximum length of model value.
Definition at line 165 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_model_number | ( | ) | const |
Get maximum length of model_number value.
Definition at line 196 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_msgid | ( | ) | const |
Get maximum length of msgid value.
Definition at line 1173 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_position | ( | ) | const |
Get maximum length of position value.
Definition at line 568 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_punch | ( | ) | const |
Get maximum length of punch value.
Definition at line 723 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_speed | ( | ) | const |
Get maximum length of speed value.
Definition at line 599 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_temperature | ( | ) | const |
Get maximum length of temperature value.
Definition at line 692 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_temperature_limit | ( | ) | const |
Get maximum length of temperature_limit value.
Definition at line 289 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_torque_limit | ( | ) | const |
Get maximum length of torque_limit value.
Definition at line 537 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_velocity | ( | ) | const |
Get maximum length of velocity value.
Definition at line 1042 of file DynamixelServoInterface.cpp.
size_t fawkes::DynamixelServoInterface::maxlenof_voltage | ( | ) | const |
Get maximum length of voltage value.
Definition at line 661 of file DynamixelServoInterface.cpp.
|
virtual |
Check if message is valid and can be enqueued.
message | Message to check |
Implements fawkes::Interface.
Definition at line 3253 of file DynamixelServoInterface.cpp.
float fawkes::DynamixelServoInterface::min_angle | ( | ) | const |
Get min_angle value.
Minimum angle allowed.
Definition at line 939 of file DynamixelServoInterface.cpp.
char * fawkes::DynamixelServoInterface::mode | ( | ) | const |
Get mode value.
Working mode, can either be JOINT or WHEEL
Definition at line 1063 of file DynamixelServoInterface.cpp.
char * fawkes::DynamixelServoInterface::model | ( | ) | const |
Get model value.
Model if known
Definition at line 155 of file DynamixelServoInterface.cpp.
uint32_t fawkes::DynamixelServoInterface::model_number | ( | ) | const |
Get model_number value.
Model number
Definition at line 186 of file DynamixelServoInterface.cpp.
uint32_t fawkes::DynamixelServoInterface::msgid | ( | ) | const |
Get msgid value.
The ID of the message that is currently being processed, or 0 if no message is being processed.
Definition at line 1163 of file DynamixelServoInterface.cpp.
uint32_t fawkes::DynamixelServoInterface::position | ( | ) | const |
Get position value.
Present position
Definition at line 558 of file DynamixelServoInterface.cpp.
uint32_t fawkes::DynamixelServoInterface::punch | ( | ) | const |
Get punch value.
Punch
Definition at line 713 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_alarm_shutdown | ( | const uint8_t | new_alarm_shutdown | ) |
Set alarm_shutdown value.
Alarm Shutdown. The bitmask is set as follows (taken from Trossen Robotics PDF "AX-12(English).pdf"): Bit 7: 0 Bit 6: If set to 1, torque off when an Instruction Error occurs Bit 5: If set to 1, torque off when an Overload Error occurs Bit 4: If set to 1, torque off when a Checksum Error occurs Bit 3: If set to 1, torque off when a Range Error occurs Bit 2: If set to 1, torque off when an Overheating Error occurs Bit 1: If set to 1, torque off when an Angle Limit Error occurs Bit 0: If set to 1, torque off when an Input Voltage Error occurs
new_alarm_shutdown | new alarm_shutdown value |
Definition at line 784 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_angle | ( | const float | new_angle | ) |
Set angle value.
Current angle.
new_angle | new angle value |
Definition at line 897 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_angle_margin | ( | const float | new_angle_margin | ) |
Set angle_margin value.
Margin in radians around a target servo value to consider the motion as final.
new_angle_margin | new angle_margin value |
Definition at line 1120 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_autorecover_enabled | ( | const bool | new_autorecover_enabled | ) |
Set autorecover_enabled value.
Automatically recover on alarm shutdown
new_autorecover_enabled | new autorecover_enabled value |
Definition at line 1151 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_ccw_angle_limit | ( | const uint32_t | new_ccw_angle_limit | ) |
Set ccw_angle_limit value.
Counter-clockwise angle limit
new_ccw_angle_limit | new ccw_angle_limit value |
Definition at line 268 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_ccw_margin | ( | const uint8_t | new_ccw_margin | ) |
Set ccw_margin value.
CCW Compliance Margin
new_ccw_margin | new ccw_margin value |
Definition at line 392 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_ccw_slope | ( | const uint8_t | new_ccw_slope | ) |
Set ccw_slope value.
CCW Compliance Slope
new_ccw_slope | new ccw_slope value |
Definition at line 454 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_cw_angle_limit | ( | const uint32_t | new_cw_angle_limit | ) |
Set cw_angle_limit value.
Clockwise angle limit
new_cw_angle_limit | new cw_angle_limit value |
Definition at line 237 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_cw_margin | ( | const uint8_t | new_cw_margin | ) |
Set cw_margin value.
CW Compliance Margin
new_cw_margin | new cw_margin value |
Definition at line 361 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_cw_slope | ( | const uint8_t | new_cw_slope | ) |
Set cw_slope value.
CW Compliance Slope
new_cw_slope | new cw_slope value |
Definition at line 423 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_enable_prevent_alarm_shutdown | ( | const bool | new_enable_prevent_alarm_shutdown | ) |
Set enable_prevent_alarm_shutdown value.
Enable alarm shutdown
new_enable_prevent_alarm_shutdown | new enable_prevent_alarm_shutdown value |
Definition at line 866 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_enabled | ( | const bool | new_enabled | ) |
Set enabled value.
Is the servo enabled?
new_enabled | new enabled value |
Definition at line 928 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_error | ( | const uint8_t | new_error | ) |
Set error value.
Raw error code from servo. The bitmask is set as follows (taken from Trossen Robotics PDF "AX-12(English).pdf"): Bit 7: 0 Bit 6: Set to 1 if an undefined instruction is sent or an action instruction is sent without a Reg_Write instruction. Bit 5: Set to 1 if the specified maximum torque can't control the applied load. Bit 4: Set to 1 if the checksum of the instruction packet is incorrect. Bit 3: Set to 1 if the instruction sent is out of the defined range. Bit 2: Set to 1 if the internal temperature of the Dynamixel unit is above the operating temperature range as defined in the control table. Bit 1: Set as 1 if the Goal Position is set outside of the range between CW Angle Limit and CCW Angle Limit. Bit 0: Set to 1 if the voltage is out of the operating voltage range as defined in the control table.
new_error | new error value |
Definition at line 835 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_error_code | ( | const ErrorCode | new_error_code | ) |
Set error_code value.
Failure code set if final is true. ERROR_NONE if no error occured.
new_error_code | new error_code value |
Definition at line 1250 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_final | ( | const bool | new_final | ) |
Set final value.
True, if the last goto command has been finished, false if it is still running
new_final | new final value |
Definition at line 1217 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_goal_position | ( | const uint32_t | new_goal_position | ) |
Set goal_position value.
Goal position
new_goal_position | new goal_position value |
Definition at line 485 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_goal_speed | ( | const uint32_t | new_goal_speed | ) |
Set goal_speed value.
Goal speed
new_goal_speed | new goal_speed value |
Definition at line 516 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_load | ( | const uint32_t | new_load | ) |
Set load value.
Present load
new_load | new load value |
Definition at line 640 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_max_angle | ( | const float | new_max_angle | ) |
Set max_angle value.
Maximum angle allowed.
new_max_angle | new max_angle value |
Definition at line 990 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_max_torque | ( | const uint32_t | new_max_torque | ) |
Set max_torque value.
Max torque
new_max_torque | new max_torque value |
Definition at line 330 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_max_velocity | ( | const float | new_max_velocity | ) |
Set max_velocity value.
Maximum supported velocity.
new_max_velocity | new max_velocity value |
Definition at line 1021 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_min_angle | ( | const float | new_min_angle | ) |
Set min_angle value.
Minimum angle allowed.
new_min_angle | new min_angle value |
Definition at line 959 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_mode | ( | const char * | new_mode | ) |
Set mode value.
Working mode, can either be JOINT or WHEEL
new_mode | new mode value |
Definition at line 1083 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_model | ( | const char * | new_model | ) |
Set model value.
Model if known
new_model | new model value |
Definition at line 175 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_model_number | ( | const uint32_t | new_model_number | ) |
Set model_number value.
Model number
new_model_number | new model_number value |
Definition at line 206 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_msgid | ( | const uint32_t | new_msgid | ) |
Set msgid value.
The ID of the message that is currently being processed, or 0 if no message is being processed.
new_msgid | new msgid value |
Definition at line 1184 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_position | ( | const uint32_t | new_position | ) |
Set position value.
Present position
new_position | new position value |
Definition at line 578 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_punch | ( | const uint32_t | new_punch | ) |
Set punch value.
Punch
new_punch | new punch value |
Definition at line 733 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_speed | ( | const uint32_t | new_speed | ) |
Set speed value.
Present speed
new_speed | new speed value |
Definition at line 609 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_temperature | ( | const uint8_t | new_temperature | ) |
Set temperature value.
Present temperature
new_temperature | new temperature value |
Definition at line 702 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_temperature_limit | ( | const uint8_t | new_temperature_limit | ) |
Set temperature_limit value.
Temperature limit
new_temperature_limit | new temperature_limit value |
Definition at line 299 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_torque_limit | ( | const uint32_t | new_torque_limit | ) |
Set torque_limit value.
Torque limit
new_torque_limit | new torque_limit value |
Definition at line 547 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_velocity | ( | const float | new_velocity | ) |
Set velocity value.
Maximum servo velocity currently reached.
new_velocity | new velocity value |
Definition at line 1052 of file DynamixelServoInterface.cpp.
void fawkes::DynamixelServoInterface::set_voltage | ( | const uint8_t | new_voltage | ) |
Set voltage value.
Present voltage
new_voltage | new voltage value |
Definition at line 671 of file DynamixelServoInterface.cpp.
uint32_t fawkes::DynamixelServoInterface::speed | ( | ) | const |
Get speed value.
Present speed
Definition at line 589 of file DynamixelServoInterface.cpp.
uint8_t fawkes::DynamixelServoInterface::temperature | ( | ) | const |
Get temperature value.
Present temperature
Definition at line 682 of file DynamixelServoInterface.cpp.
uint8_t fawkes::DynamixelServoInterface::temperature_limit | ( | ) | const |
Get temperature_limit value.
Temperature limit
Definition at line 279 of file DynamixelServoInterface.cpp.
uint32_t fawkes::DynamixelServoInterface::torque_limit | ( | ) | const |
Get torque_limit value.
Torque limit
Definition at line 527 of file DynamixelServoInterface.cpp.
const char * fawkes::DynamixelServoInterface::tostring_ErrorCode | ( | ErrorCode | value | ) | const |
Convert ErrorCode constant to string.
value | value to convert to string |
Definition at line 126 of file DynamixelServoInterface.cpp.
const char * fawkes::DynamixelServoInterface::tostring_WorkingMode | ( | WorkingMode | value | ) | const |
Convert WorkingMode constant to string.
value | value to convert to string |
Definition at line 141 of file DynamixelServoInterface.cpp.
float fawkes::DynamixelServoInterface::velocity | ( | ) | const |
Get velocity value.
Maximum servo velocity currently reached.
Definition at line 1032 of file DynamixelServoInterface.cpp.
uint8_t fawkes::DynamixelServoInterface::voltage | ( | ) | const |
Get voltage value.
Present voltage
Definition at line 651 of file DynamixelServoInterface.cpp.