24 #ifndef __INTERFACES_KATANAINTERFACE_H_ 25 #define __INTERFACES_KATANAINTERFACE_H_ 27 #include <interface/interface.h> 28 #include <interface/message.h> 29 #include <interface/field_iterator.h> 67 int64_t timestamp_sec;
68 int64_t timestamp_usec;
93 } KatanaInterface_data_t;
96 KatanaInterface_data_t *data;
106 int64_t timestamp_sec;
107 int64_t timestamp_usec;
108 } StopMessage_data_t;
111 StopMessage_data_t *data;
128 int64_t timestamp_sec;
129 int64_t timestamp_usec;
130 } FlushMessage_data_t;
133 FlushMessage_data_t *data;
150 int64_t timestamp_sec;
151 int64_t timestamp_usec;
152 } ParkMessage_data_t;
155 ParkMessage_data_t *data;
172 int64_t timestamp_sec;
173 int64_t timestamp_usec;
178 char trans_frame[32];
191 } LinearGotoMessage_data_t;
194 LinearGotoMessage_data_t *data;
197 LinearGotoMessage(
const float ini_theta_error,
const float ini_offset_xy,
const bool ini_straight,
const char * ini_trans_frame,
const char * ini_rot_frame,
const float ini_x,
const float ini_y,
const float ini_z,
const float ini_phi,
const float ini_theta,
const float ini_psi);
203 float theta_error()
const;
204 void set_theta_error(
const float new_theta_error);
205 size_t maxlenof_theta_error()
const;
206 float offset_xy()
const;
207 void set_offset_xy(
const float new_offset_xy);
208 size_t maxlenof_offset_xy()
const;
209 bool is_straight()
const;
210 void set_straight(
const bool new_straight);
211 size_t maxlenof_straight()
const;
212 char * trans_frame()
const;
213 void set_trans_frame(
const char * new_trans_frame);
214 size_t maxlenof_trans_frame()
const;
215 char * rot_frame()
const;
216 void set_rot_frame(
const char * new_rot_frame);
217 size_t maxlenof_rot_frame()
const;
219 void set_x(
const float new_x);
222 void set_y(
const float new_y);
225 void set_z(
const float new_z);
228 void set_phi(
const float new_phi);
234 void set_psi(
const float new_psi);
245 int64_t timestamp_sec;
246 int64_t timestamp_usec;
256 } LinearGotoKniMessage_data_t;
259 LinearGotoKniMessage_data_t *data;
262 LinearGotoKniMessage(
const float ini_x,
const float ini_y,
const float ini_z,
const float ini_phi,
const float ini_theta,
const float ini_psi);
269 void set_x(
const float new_x);
272 void set_y(
const float new_y);
275 void set_z(
const float new_z);
278 void set_phi(
const float new_phi);
284 void set_psi(
const float new_psi);
295 int64_t timestamp_sec;
296 int64_t timestamp_usec;
299 } ObjectGotoMessage_data_t;
302 ObjectGotoMessage_data_t *data;
311 char * object()
const;
312 void set_object(
const char * new_object);
313 size_t maxlenof_object()
const;
315 void set_rot_x(
const float new_rot_x);
316 size_t maxlenof_rot_x()
const;
326 int64_t timestamp_sec;
327 int64_t timestamp_usec;
328 } CalibrateMessage_data_t;
331 CalibrateMessage_data_t *data;
348 int64_t timestamp_sec;
349 int64_t timestamp_usec;
350 } OpenGripperMessage_data_t;
353 OpenGripperMessage_data_t *data;
370 int64_t timestamp_sec;
371 int64_t timestamp_usec;
372 } CloseGripperMessage_data_t;
375 CloseGripperMessage_data_t *data;
392 int64_t timestamp_sec;
393 int64_t timestamp_usec;
395 } SetEnabledMessage_data_t;
398 SetEnabledMessage_data_t *data;
419 int64_t timestamp_sec;
420 int64_t timestamp_usec;
422 } SetMaxVelocityMessage_data_t;
425 SetMaxVelocityMessage_data_t *data;
446 int64_t timestamp_sec;
447 int64_t timestamp_usec;
448 char plannerparams[1024];
450 } SetPlannerParamsMessage_data_t;
453 SetPlannerParamsMessage_data_t *data;
462 char * plannerparams()
const;
463 void set_plannerparams(
const char * new_plannerparams);
464 size_t maxlenof_plannerparams()
const;
465 bool is_straight()
const;
466 void set_straight(
const bool new_straight);
467 size_t maxlenof_straight()
const;
477 int64_t timestamp_sec;
478 int64_t timestamp_usec;
481 } SetMotorEncoderMessage_data_t;
484 SetMotorEncoderMessage_data_t *data;
494 void set_nr(
const uint32_t new_nr);
495 size_t maxlenof_nr()
const;
496 uint32_t enc()
const;
497 void set_enc(
const uint32_t new_enc);
498 size_t maxlenof_enc()
const;
508 int64_t timestamp_sec;
509 int64_t timestamp_usec;
512 } MoveMotorEncoderMessage_data_t;
515 MoveMotorEncoderMessage_data_t *data;
525 void set_nr(
const uint32_t new_nr);
526 size_t maxlenof_nr()
const;
527 uint32_t enc()
const;
528 void set_enc(
const uint32_t new_enc);
529 size_t maxlenof_enc()
const;
539 int64_t timestamp_sec;
540 int64_t timestamp_usec;
543 } SetMotorAngleMessage_data_t;
546 SetMotorAngleMessage_data_t *data;
556 void set_nr(
const uint32_t new_nr);
557 size_t maxlenof_nr()
const;
559 void set_angle(
const float new_angle);
560 size_t maxlenof_angle()
const;
570 int64_t timestamp_sec;
571 int64_t timestamp_usec;
574 } MoveMotorAngleMessage_data_t;
577 MoveMotorAngleMessage_data_t *data;
587 void set_nr(
const uint32_t new_nr);
588 size_t maxlenof_nr()
const;
590 void set_angle(
const float new_angle);
591 size_t maxlenof_angle()
const;
608 void set_x(
const float new_x);
611 void set_y(
const float new_y);
614 void set_z(
const float new_z);
617 void set_phi(
const float new_phi);
623 void set_psi(
const float new_psi);
626 int32_t
encoders(
unsigned int index)
const;
627 void set_encoders(
unsigned int index,
const int32_t new_encoders);
631 float angles(
unsigned int index)
const;
632 void set_angles(
unsigned int index,
const float new_angles);
635 uint32_t
msgid()
const;
636 void set_msgid(
const uint32_t new_msgid);
659 virtual const char *
enum_tostring(
const char *enumtype,
int val)
const;
static const uint32_t SENSOR_IR_LEFT_INNER_FRONT
SENSOR_IR_LEFT_INNER_FRONT constant.
float phi() const
Get phi value.
static const uint32_t ERROR_NO_SOLUTION
ERROR_NO_SOLUTION constant.
static const uint32_t SENSOR_IR_RIGHT_INNER_FRONT
SENSOR_IR_RIGHT_INNER_FRONT constant.
void set_enabled(const bool new_enabled)
Set enabled value.
bool is_enabled() const
Get enabled value.
size_t maxlenof_enabled() const
Get maximum length of enabled value.
void set_sensor_value(unsigned int index, const uint8_t new_sensor_value)
Set sensor_value value at given index.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
float x() const
Get x value.
size_t maxlenof_calibrated() const
Get maximum length of calibrated value.
size_t maxlenof_final() const
Get maximum length of final value.
void set_z(const float new_z)
Set z value.
int32_t * encoders() const
Get encoders value.
const char * type() const
Get message type.
static const uint32_t SENSOR_IR_CENTER_GRIPPER
SENSOR_IR_CENTER_GRIPPER constant.
LinearGotoKniMessage Fawkes BlackBoard Interface Message.
void set_num_motors(const uint8_t new_num_motors)
Set num_motors value.
void set_y(const float new_y)
Set y value.
Fawkes library namespace.
CalibrateMessage Fawkes BlackBoard Interface Message.
bool is_calibrated() const
Get calibrated value.
static const uint32_t SENSOR_IR_LEFT_INNER_MIDDLE
SENSOR_IR_LEFT_INNER_MIDDLE constant.
void set_final(const bool new_final)
Set final value.
size_t maxlenof_x() const
Get maximum length of x value.
float psi() const
Get psi value.
SetMotorEncoderMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_psi() const
Get maximum length of psi value.
static const uint32_t SENSOR_IR_RIGHT_BOTTOM_FRONT
SENSOR_IR_RIGHT_BOTTOM_FRONT constant.
void set_calibrated(const bool new_calibrated)
Set calibrated value.
static const uint32_t SENSOR_IR_LEFT_OUTER_FRONT
SENSOR_IR_LEFT_OUTER_FRONT constant.
static const uint32_t SENSOR_FORCE_LEFT_FRONT
SENSOR_FORCE_LEFT_FRONT constant.
size_t maxlenof_sensor_value() const
Get maximum length of sensor_value value.
SetMotorAngleMessage Fawkes BlackBoard Interface Message.
uint32_t error_code() const
Get error_code value.
void set_phi(const float new_phi)
Set phi value.
Base class for all Fawkes BlackBoard interfaces.
void set_psi(const float new_psi)
Set psi value.
static const uint32_t SENSOR_COND_BOTH
SENSOR_COND_BOTH constant.
void set_theta(const float new_theta)
Set theta value.
static const uint32_t ERROR_UNSPECIFIC
ERROR_UNSPECIFIC constant.
static const uint32_t SENSOR_FORCE_RIGHT_REAR
SENSOR_FORCE_RIGHT_REAR constant.
void set_msgid(const uint32_t new_msgid)
Set msgid value.
ObjectGotoMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_num_motors() const
Get maximum length of num_motors value.
static const uint32_t SENSOR_RESERVED_2
SENSOR_RESERVED_2 constant.
static const uint32_t ERROR_COMMUNICATION
ERROR_COMMUNICATION constant.
OpenGripperMessage Fawkes BlackBoard Interface Message.
virtual void copy_values(const Interface *other)
Copy values from other interface.
size_t maxlenof_max_velocity() const
Get maximum length of max_velocity value.
KatanaInterface Fawkes BlackBoard Interface.
static const uint32_t SENSOR_IR_RIGHT_OUTER_FRONT
SENSOR_IR_RIGHT_OUTER_FRONT constant.
size_t maxlenof_error_code() const
Get maximum length of error_code value.
LinearGotoMessage Fawkes BlackBoard Interface Message.
uint8_t max_velocity() const
Get max_velocity value.
bool is_final() const
Get final value.
SetPlannerParamsMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_phi() const
Get maximum length of phi value.
static const uint32_t ERROR_NONE
ERROR_NONE constant.
SetMaxVelocityMessage Fawkes BlackBoard Interface Message.
float z() const
Get z value.
void set_error_code(const uint32_t new_error_code)
Set error_code value.
size_t maxlenof_z() const
Get maximum length of z value.
static const uint32_t ERROR_MOTOR_CRASHED
ERROR_MOTOR_CRASHED constant.
uint32_t msgid() const
Get msgid value.
void set_angles(unsigned int index, const float new_angles)
Set angles value at given index.
CloseGripperMessage Fawkes BlackBoard Interface Message.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
~StopMessage()
Destructor.
static const uint32_t SENSOR_FORCE_LEFT_REAR
SENSOR_FORCE_LEFT_REAR constant.
void set_x(const float new_x)
Set x value.
StopMessage Fawkes BlackBoard Interface Message.
MoveMotorAngleMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_y() const
Get maximum length of y value.
void set_encoders(unsigned int index, const int32_t new_encoders)
Set encoders value at given index.
float theta() const
Get theta value.
static const uint32_t SENSOR_FORCE_RIGHT_FRONT
SENSOR_FORCE_RIGHT_FRONT constant.
static const uint32_t SENSOR_IR_RIGHT_INNER_MIDDLE
SENSOR_IR_RIGHT_INNER_MIDDLE constant.
size_t maxlenof_angles() const
Get maximum length of angles value.
uint8_t num_motors() const
Get num_motors value.
MoveMotorEncoderMessage Fawkes BlackBoard Interface Message.
float y() const
Get y value.
static const uint32_t SENSOR_IR_LEFT_BOTTOM_FRONT
SENSOR_IR_LEFT_BOTTOM_FRONT constant.
size_t maxlenof_theta() const
Get maximum length of theta value.
ParkMessage Fawkes BlackBoard Interface Message.
virtual Message * create_message(const char *type) const
Create message based on type name.
void set_max_velocity(const uint8_t new_max_velocity)
Set max_velocity value.
StopMessage()
Constructor.
FlushMessage Fawkes BlackBoard Interface Message.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
size_t maxlenof_msgid() const
Get maximum length of msgid value.
static const uint32_t SENSOR_RESERVED_10
SENSOR_RESERVED_10 constant.
virtual Message * clone() const
Clone this message.
SetEnabledMessage Fawkes BlackBoard Interface Message.
static const uint32_t ERROR_CMD_START_FAILED
ERROR_CMD_START_FAILED constant.
uint8_t * sensor_value() const
Get sensor_value value.
float * angles() const
Get angles value.
size_t maxlenof_encoders() const
Get maximum length of encoders value.