24 #ifndef __INTERFACES_DYNAMIXELSERVOINTERFACE_H_ 25 #define __INTERFACES_DYNAMIXELSERVOINTERFACE_H_ 27 #include <interface/interface.h> 28 #include <interface/message.h> 29 #include <interface/field_iterator.h> 64 typedef struct __attribute__((packed)) {
65 int64_t timestamp_sec;
66 int64_t timestamp_usec;
108 bool enable_prevent_alarm_shutdown;
120 bool autorecover_enabled;
127 } DynamixelServoInterface_data_t;
129 DynamixelServoInterface_data_t *data;
139 typedef struct __attribute__((packed)) {
140 int64_t timestamp_sec;
141 int64_t timestamp_usec;
142 } StopMessage_data_t;
144 StopMessage_data_t *data;
154 virtual Message * clone()
const;
161 typedef struct __attribute__((packed)) {
162 int64_t timestamp_sec;
163 int64_t timestamp_usec;
164 } FlushMessage_data_t;
166 FlushMessage_data_t *data;
176 virtual Message * clone()
const;
183 typedef struct __attribute__((packed)) {
184 int64_t timestamp_sec;
185 int64_t timestamp_usec;
187 } GotoMessage_data_t;
189 GotoMessage_data_t *data;
203 virtual Message * clone()
const;
210 typedef struct __attribute__((packed)) {
211 int64_t timestamp_sec;
212 int64_t timestamp_usec;
216 } TimedGotoMessage_data_t;
218 TimedGotoMessage_data_t *data;
229 float time_sec()
const;
230 void set_time_sec(
const float new_time_sec);
231 size_t maxlenof_time_sec()
const;
235 virtual Message * clone()
const;
242 typedef struct __attribute__((packed)) {
243 int64_t timestamp_sec;
244 int64_t timestamp_usec;
246 } SetModeMessage_data_t;
248 SetModeMessage_data_t *data;
259 uint8_t
mode()
const;
260 void set_mode(
const uint8_t new_mode);
262 virtual Message * clone()
const;
269 typedef struct __attribute__((packed)) {
270 int64_t timestamp_sec;
271 int64_t timestamp_usec;
273 } SetSpeedMessage_data_t;
275 SetSpeedMessage_data_t *data;
286 uint16_t
speed()
const;
287 void set_speed(
const uint16_t new_speed);
289 virtual Message * clone()
const;
296 typedef struct __attribute__((packed)) {
297 int64_t timestamp_sec;
298 int64_t timestamp_usec;
300 } SetEnabledMessage_data_t;
302 SetEnabledMessage_data_t *data;
316 virtual Message * clone()
const;
323 typedef struct __attribute__((packed)) {
324 int64_t timestamp_sec;
325 int64_t timestamp_usec;
327 } SetVelocityMessage_data_t;
329 SetVelocityMessage_data_t *data;
343 virtual Message * clone()
const;
350 typedef struct __attribute__((packed)) {
351 int64_t timestamp_sec;
352 int64_t timestamp_usec;
357 } SetMarginMessage_data_t;
359 SetMarginMessage_data_t *data;
373 virtual Message * clone()
const;
380 typedef struct __attribute__((packed)) {
381 int64_t timestamp_sec;
382 int64_t timestamp_usec;
387 } SetComplianceValuesMessage_data_t;
389 SetComplianceValuesMessage_data_t *data;
394 SetComplianceValuesMessage(
const uint8_t ini_cw_margin,
const uint8_t ini_ccw_margin,
const uint8_t ini_cw_slope,
const uint8_t ini_ccw_slope);
412 virtual Message * clone()
const;
419 typedef struct __attribute__((packed)) {
420 int64_t timestamp_sec;
421 int64_t timestamp_usec;
423 } SetGoalSpeedMessage_data_t;
425 SetGoalSpeedMessage_data_t *data;
439 virtual Message * clone()
const;
446 typedef struct __attribute__((packed)) {
447 int64_t timestamp_sec;
448 int64_t timestamp_usec;
450 } SetTorqueLimitMessage_data_t;
452 SetTorqueLimitMessage_data_t *data;
466 virtual Message * clone()
const;
473 typedef struct __attribute__((packed)) {
474 int64_t timestamp_sec;
475 int64_t timestamp_usec;
477 } SetPunchMessage_data_t;
479 SetPunchMessage_data_t *data;
490 uint32_t
punch()
const;
491 void set_punch(
const uint32_t new_punch);
493 virtual Message * clone()
const;
500 typedef struct __attribute__((packed)) {
501 int64_t timestamp_sec;
502 int64_t timestamp_usec;
504 } GotoPositionMessage_data_t;
506 GotoPositionMessage_data_t *data;
520 virtual Message * clone()
const;
527 typedef struct __attribute__((packed)) {
528 int64_t timestamp_sec;
529 int64_t timestamp_usec;
530 uint32_t angle_limit_cw;
531 uint32_t angle_limit_ccw;
532 } SetAngleLimitsMessage_data_t;
534 SetAngleLimitsMessage_data_t *data;
545 uint32_t angle_limit_cw()
const;
546 void set_angle_limit_cw(
const uint32_t new_angle_limit_cw);
547 size_t maxlenof_angle_limit_cw()
const;
548 uint32_t angle_limit_ccw()
const;
549 void set_angle_limit_ccw(
const uint32_t new_angle_limit_ccw);
550 size_t maxlenof_angle_limit_ccw()
const;
551 virtual Message * clone()
const;
558 typedef struct __attribute__((packed)) {
559 int64_t timestamp_sec;
560 int64_t timestamp_usec;
561 } ResetRawErrorMessage_data_t;
563 ResetRawErrorMessage_data_t *data;
573 virtual Message * clone()
const;
580 typedef struct __attribute__((packed)) {
581 int64_t timestamp_sec;
582 int64_t timestamp_usec;
583 bool enable_prevent_alarm_shutdown;
584 } SetPreventAlarmShutdownMessage_data_t;
586 SetPreventAlarmShutdownMessage_data_t *data;
600 virtual Message * clone()
const;
607 typedef struct __attribute__((packed)) {
608 int64_t timestamp_sec;
609 int64_t timestamp_usec;
610 bool autorecover_enabled;
611 } SetAutorecoverEnabledMessage_data_t;
613 SetAutorecoverEnabledMessage_data_t *data;
627 virtual Message * clone()
const;
634 typedef struct __attribute__((packed)) {
635 int64_t timestamp_sec;
636 int64_t timestamp_usec;
637 } RecoverMessage_data_t;
639 RecoverMessage_data_t *data;
649 virtual Message * clone()
const;
659 char *
model()
const;
701 uint32_t
speed()
const;
702 void set_speed(
const uint32_t new_speed);
704 uint32_t
load()
const;
705 void set_load(
const uint32_t new_load);
713 uint32_t
punch()
const;
714 void set_punch(
const uint32_t new_punch);
719 uint8_t
error()
const;
744 void set_mode(
const char * new_mode);
752 uint32_t
msgid()
const;
753 void set_msgid(
const uint32_t new_msgid);
764 virtual const char *
enum_tostring(
const char *enumtype,
int val)
const;
size_t maxlenof_model_number() const
Get maximum length of model_number value.
size_t maxlenof_velocity() const
Get maximum length of velocity value.
size_t maxlenof_error() const
Get maximum length of error value.
void set_cw_slope(const uint8_t new_cw_slope)
Set cw_slope value.
void set_model_number(const uint32_t new_model_number)
Set model_number value.
size_t maxlenof_load() const
Get maximum length of load value.
void set_error(const uint8_t new_error)
Set error value.
void set_angle_margin(const float new_angle_margin)
Set angle_margin value.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Joint mode to move in a range of -2.616 to +2.616 rad.
void set_velocity(const float new_velocity)
Set velocity value.
SetAutorecoverEnabledMessage Fawkes BlackBoard Interface Message.
uint32_t load() const
Get load value.
size_t maxlenof_autorecover_enabled() const
Get maximum length of autorecover_enabled value.
size_t maxlenof_speed() const
Get maximum length of speed value.
size_t maxlenof_model() const
Get maximum length of model value.
Communication with device failed.
size_t maxlenof_voltage() const
Get maximum length of voltage value.
SetGoalSpeedMessage Fawkes BlackBoard Interface Message.
void set_goal_speed(const uint32_t new_goal_speed)
Set goal_speed value.
size_t maxlenof_temperature_limit() const
Get maximum length of temperature_limit value.
virtual Message * create_message(const char *type) const
Create message based on type name.
size_t maxlenof_cw_margin() const
Get maximum length of cw_margin value.
size_t maxlenof_msgid() const
Get maximum length of msgid value.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
SetAngleLimitsMessage Fawkes BlackBoard Interface Message.
void set_cw_angle_limit(const uint32_t new_cw_angle_limit)
Set cw_angle_limit value.
size_t maxlenof_mode() const
Get maximum length of mode value.
Fawkes library namespace.
uint32_t position() const
Get position value.
size_t maxlenof_position() const
Get maximum length of position value.
uint32_t model_number() const
Get model_number value.
void set_msgid(const uint32_t new_msgid)
Set msgid value.
uint32_t max_torque() const
Get max_torque value.
size_t maxlenof_max_velocity() const
Get maximum length of max_velocity value.
SetTorqueLimitMessage Fawkes BlackBoard Interface Message.
uint32_t ccw_angle_limit() const
Get ccw_angle_limit value.
void set_enabled(const bool new_enabled)
Set enabled value.
bool is_final() const
Get final value.
SetComplianceValuesMessage Fawkes BlackBoard Interface Message.
virtual void copy_values(const Interface *other)
Copy values from other interface.
const char * tostring_ErrorCode(ErrorCode value) const
Convert ErrorCode constant to string.
size_t maxlenof_ccw_angle_limit() const
Get maximum length of ccw_angle_limit value.
size_t maxlenof_angle() const
Get maximum length of angle value.
bool is_enabled() const
Get enabled value.
SetMarginMessage Fawkes BlackBoard Interface Message.
const char * tostring_WorkingMode(WorkingMode value) const
Convert WorkingMode constant to string.
void set_position(const uint32_t new_position)
Set position value.
Base class for all Fawkes BlackBoard interfaces.
float max_angle() const
Get max_angle value.
float max_velocity() const
Get max_velocity value.
ResetRawErrorMessage Fawkes BlackBoard Interface Message.
bool is_autorecover_enabled() const
Get autorecover_enabled value.
size_t maxlenof_max_angle() const
Get maximum length of max_angle value.
StopMessage Fawkes BlackBoard Interface Message.
Wheel mode to use the servo in a continuously rotating mode.
SetModeMessage Fawkes BlackBoard Interface Message.
void set_mode(const char *new_mode)
Set mode value.
size_t maxlenof_final() const
Get maximum length of final value.
FlushMessage Fawkes BlackBoard Interface Message.
uint32_t msgid() const
Get msgid value.
float min_angle() const
Get min_angle value.
uint32_t torque_limit() const
Get torque_limit value.
float angle() const
Get angle value.
void set_model(const char *new_model)
Set model value.
void set_ccw_margin(const uint8_t new_ccw_margin)
Set ccw_margin value.
const char * type() const
Get type of interface.
size_t maxlenof_max_torque() const
Get maximum length of max_torque value.
char * model() const
Get model value.
SetPunchMessage Fawkes BlackBoard Interface Message.
void set_punch(const uint32_t new_punch)
Set punch value.
void set_voltage(const uint8_t new_voltage)
Set voltage value.
uint32_t speed() const
Get speed value.
void set_error_code(const ErrorCode new_error_code)
Set error_code value.
void set_max_torque(const uint32_t new_max_torque)
Set max_torque value.
size_t maxlenof_temperature() const
Get maximum length of temperature value.
float angle_margin() const
Get angle_margin value.
size_t maxlenof_alarm_shutdown() const
Get maximum length of alarm_shutdown value.
TimedGotoMessage Fawkes BlackBoard Interface Message.
uint32_t cw_angle_limit() const
Get cw_angle_limit value.
uint8_t voltage() const
Get voltage value.
bool is_enable_prevent_alarm_shutdown() const
Get enable_prevent_alarm_shutdown value.
void set_cw_margin(const uint8_t new_cw_margin)
Set cw_margin value.
uint8_t alarm_shutdown() const
Get alarm_shutdown value.
SetEnabledMessage Fawkes BlackBoard Interface Message.
Some unspecified error occured.
uint8_t ccw_slope() const
Get ccw_slope value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
ErrorCode
Error code to explain an error.
size_t maxlenof_torque_limit() const
Get maximum length of torque_limit value.
float velocity() const
Get velocity value.
uint8_t cw_margin() const
Get cw_margin value.
void set_min_angle(const float new_min_angle)
Set min_angle value.
SetSpeedMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_angle_margin() const
Get maximum length of angle_margin value.
void set_alarm_shutdown(const uint8_t new_alarm_shutdown)
Set alarm_shutdown value.
GotoPositionMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_goal_speed() const
Get maximum length of goal_speed value.
void set_max_angle(const float new_max_angle)
Set max_angle value.
GotoMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_enable_prevent_alarm_shutdown() const
Get maximum length of enable_prevent_alarm_shutdown value.
void set_load(const uint32_t new_load)
Set load value.
void set_autorecover_enabled(const bool new_autorecover_enabled)
Set autorecover_enabled value.
WorkingMode
Mode to be set for the servo.
size_t maxlenof_ccw_slope() const
Get maximum length of ccw_slope value.
uint8_t cw_slope() const
Get cw_slope value.
DynamixelServoInterface Fawkes BlackBoard Interface.
size_t maxlenof_enabled() const
Get maximum length of enabled value.
size_t maxlenof_ccw_margin() const
Get maximum length of ccw_margin value.
uint32_t goal_position() const
Get goal_position value.
ErrorCode error_code() const
Get error_code value.
void set_temperature_limit(const uint8_t new_temperature_limit)
Set temperature_limit value.
void set_ccw_angle_limit(const uint32_t new_ccw_angle_limit)
Set ccw_angle_limit value.
void set_enable_prevent_alarm_shutdown(const bool new_enable_prevent_alarm_shutdown)
Set enable_prevent_alarm_shutdown value.
uint8_t error() const
Get error value.
uint32_t goal_speed() const
Get goal_speed value.
void set_final(const bool new_final)
Set final value.
void set_ccw_slope(const uint8_t new_ccw_slope)
Set ccw_slope value.
uint32_t punch() const
Get punch value.
uint8_t ccw_margin() const
Get ccw_margin value.
void set_max_velocity(const float new_max_velocity)
Set max_velocity value.
RecoverMessage Fawkes BlackBoard Interface Message.
void set_torque_limit(const uint32_t new_torque_limit)
Set torque_limit value.
size_t maxlenof_cw_slope() const
Get maximum length of cw_slope value.
void set_temperature(const uint8_t new_temperature)
Set temperature value.
size_t maxlenof_error_code() const
Get maximum length of error_code value.
std::map< int, std::string > interface_enum_map_t
Map of enum integer to string values.
uint8_t temperature() const
Get temperature value.
size_t maxlenof_min_angle() const
Get maximum length of min_angle value.
uint8_t temperature_limit() const
Get temperature_limit value.
void set_goal_position(const uint32_t new_goal_position)
Set goal_position value.
size_t maxlenof_cw_angle_limit() const
Get maximum length of cw_angle_limit value.
void set_speed(const uint32_t new_speed)
Set speed value.
char * mode() const
Get mode value.
void set_angle(const float new_angle)
Set angle value.
SetVelocityMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_goal_position() const
Get maximum length of goal_position value.
SetPreventAlarmShutdownMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_punch() const
Get maximum length of punch value.
Desired angle is out of range.