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>
66 int64_t timestamp_sec;
67 int64_t timestamp_usec;
92 } KatanaInterface_data_t;
94 KatanaInterface_data_t *data;
103 int64_t timestamp_sec;
104 int64_t timestamp_usec;
105 } StopMessage_data_t;
107 StopMessage_data_t *data;
123 int64_t timestamp_sec;
124 int64_t timestamp_usec;
125 } FlushMessage_data_t;
127 FlushMessage_data_t *data;
143 int64_t timestamp_sec;
144 int64_t timestamp_usec;
145 } ParkMessage_data_t;
147 ParkMessage_data_t *data;
163 int64_t timestamp_sec;
164 int64_t timestamp_usec;
182 } LinearGotoMessage_data_t;
184 LinearGotoMessage_data_t *data;
187 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);
209 void set_x(
const float new_x);
212 void set_y(
const float new_y);
215 void set_z(
const float new_z);
218 void set_phi(
const float new_phi);
224 void set_psi(
const float new_psi);
234 int64_t timestamp_sec;
235 int64_t timestamp_usec;
245 } LinearGotoKniMessage_data_t;
247 LinearGotoKniMessage_data_t *data;
250 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);
257 void set_x(
const float new_x);
260 void set_y(
const float new_y);
263 void set_z(
const float new_z);
266 void set_phi(
const float new_phi);
272 void set_psi(
const float new_psi);
282 int64_t timestamp_sec;
283 int64_t timestamp_usec;
286 } ObjectGotoMessage_data_t;
288 ObjectGotoMessage_data_t *data;
311 int64_t timestamp_sec;
312 int64_t timestamp_usec;
313 } CalibrateMessage_data_t;
315 CalibrateMessage_data_t *data;
331 int64_t timestamp_sec;
332 int64_t timestamp_usec;
333 } OpenGripperMessage_data_t;
335 OpenGripperMessage_data_t *data;
351 int64_t timestamp_sec;
352 int64_t timestamp_usec;
353 } CloseGripperMessage_data_t;
355 CloseGripperMessage_data_t *data;
371 int64_t timestamp_sec;
372 int64_t timestamp_usec;
374 } SetEnabledMessage_data_t;
376 SetEnabledMessage_data_t *data;
396 int64_t timestamp_sec;
397 int64_t timestamp_usec;
399 } SetMaxVelocityMessage_data_t;
401 SetMaxVelocityMessage_data_t *data;
421 int64_t timestamp_sec;
422 int64_t timestamp_usec;
425 } SetPlannerParamsMessage_data_t;
427 SetPlannerParamsMessage_data_t *data;
450 int64_t timestamp_sec;
451 int64_t timestamp_usec;
454 } SetMotorEncoderMessage_data_t;
456 SetMotorEncoderMessage_data_t *data;
466 void set_nr(
const uint32_t new_nr);
468 uint32_t
enc()
const;
469 void set_enc(
const uint32_t new_enc);
479 int64_t timestamp_sec;
480 int64_t timestamp_usec;
483 } MoveMotorEncoderMessage_data_t;
485 MoveMotorEncoderMessage_data_t *data;
495 void set_nr(
const uint32_t new_nr);
497 uint32_t
enc()
const;
498 void set_enc(
const uint32_t new_enc);
508 int64_t timestamp_sec;
509 int64_t timestamp_usec;
512 } SetMotorAngleMessage_data_t;
514 SetMotorAngleMessage_data_t *data;
524 void set_nr(
const uint32_t new_nr);
537 int64_t timestamp_sec;
538 int64_t timestamp_usec;
541 } MoveMotorAngleMessage_data_t;
543 MoveMotorAngleMessage_data_t *data;
553 void set_nr(
const uint32_t new_nr);
574 void set_x(
const float new_x);
577 void set_y(
const float new_y);
580 void set_z(
const float new_z);
583 void set_phi(
const float new_phi);
589 void set_psi(
const float new_psi);
592 int32_t
encoders(
unsigned int index)
const;
593 void set_encoders(
unsigned int index,
const int32_t new_encoders);
597 float angles(
unsigned int index)
const;
598 void set_angles(
unsigned int index,
const float new_angles);
601 uint32_t
msgid()
const;
602 void set_msgid(
const uint32_t new_msgid);
625 virtual const char *
enum_tostring(
const char *enumtype,
int val)
const;
Base class for all Fawkes BlackBoard interfaces.
const char * type() const
Get type of interface.
CalibrateMessage Fawkes BlackBoard Interface Message.
CalibrateMessage()
Constructor.
virtual Message * clone() const
Clone this message.
~CalibrateMessage()
Destructor.
CloseGripperMessage Fawkes BlackBoard Interface Message.
CloseGripperMessage()
Constructor.
~CloseGripperMessage()
Destructor.
virtual Message * clone() const
Clone this message.
FlushMessage Fawkes BlackBoard Interface Message.
FlushMessage()
Constructor.
~FlushMessage()
Destructor.
virtual Message * clone() const
Clone this message.
LinearGotoKniMessage Fawkes BlackBoard Interface Message.
float y() const
Get y value.
void set_y(const float new_y)
Set y value.
void set_phi(const float new_phi)
Set phi value.
float z() const
Get z value.
void set_z(const float new_z)
Set z value.
void set_psi(const float new_psi)
Set psi value.
size_t maxlenof_theta() const
Get maximum length of theta value.
LinearGotoKniMessage()
Constructor.
size_t maxlenof_z() const
Get maximum length of z value.
float psi() const
Get psi value.
size_t maxlenof_x() const
Get maximum length of x value.
float x() const
Get x value.
size_t maxlenof_y() const
Get maximum length of y value.
~LinearGotoKniMessage()
Destructor.
void set_x(const float new_x)
Set x value.
size_t maxlenof_phi() const
Get maximum length of phi value.
size_t maxlenof_psi() const
Get maximum length of psi value.
void set_theta(const float new_theta)
Set theta value.
virtual Message * clone() const
Clone this message.
float theta() const
Get theta value.
float phi() const
Get phi value.
LinearGotoMessage Fawkes BlackBoard Interface Message.
float z() const
Get z value.
void set_phi(const float new_phi)
Set phi value.
void set_rot_frame(const char *new_rot_frame)
Set rot_frame value.
char * trans_frame() const
Get trans_frame value.
size_t maxlenof_trans_frame() const
Get maximum length of trans_frame value.
float psi() const
Get psi value.
float phi() const
Get phi value.
float offset_xy() const
Get offset_xy value.
void set_x(const float new_x)
Set x value.
void set_y(const float new_y)
Set y value.
size_t maxlenof_z() const
Get maximum length of z value.
size_t maxlenof_x() const
Get maximum length of x value.
size_t maxlenof_rot_frame() const
Get maximum length of rot_frame value.
size_t maxlenof_y() const
Get maximum length of y value.
virtual Message * clone() const
Clone this message.
float theta_error() const
Get theta_error value.
char * rot_frame() const
Get rot_frame value.
size_t maxlenof_theta() const
Get maximum length of theta value.
float theta() const
Get theta value.
void set_trans_frame(const char *new_trans_frame)
Set trans_frame value.
LinearGotoMessage()
Constructor.
float y() const
Get y value.
void set_offset_xy(const float new_offset_xy)
Set offset_xy value.
size_t maxlenof_straight() const
Get maximum length of straight value.
size_t maxlenof_theta_error() const
Get maximum length of theta_error value.
void set_z(const float new_z)
Set z value.
void set_theta(const float new_theta)
Set theta value.
void set_theta_error(const float new_theta_error)
Set theta_error value.
size_t maxlenof_offset_xy() const
Get maximum length of offset_xy value.
float x() const
Get x value.
size_t maxlenof_phi() const
Get maximum length of phi value.
void set_straight(const bool new_straight)
Set straight value.
~LinearGotoMessage()
Destructor.
void set_psi(const float new_psi)
Set psi value.
size_t maxlenof_psi() const
Get maximum length of psi value.
bool is_straight() const
Get straight value.
MoveMotorAngleMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_angle() const
Get maximum length of angle value.
~MoveMotorAngleMessage()
Destructor.
uint32_t nr() const
Get nr value.
MoveMotorAngleMessage()
Constructor.
void set_angle(const float new_angle)
Set angle value.
float angle() const
Get angle value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_nr() const
Get maximum length of nr value.
void set_nr(const uint32_t new_nr)
Set nr value.
MoveMotorEncoderMessage Fawkes BlackBoard Interface Message.
void set_nr(const uint32_t new_nr)
Set nr value.
virtual Message * clone() const
Clone this message.
void set_enc(const uint32_t new_enc)
Set enc value.
size_t maxlenof_nr() const
Get maximum length of nr value.
uint32_t nr() const
Get nr value.
MoveMotorEncoderMessage()
Constructor.
size_t maxlenof_enc() const
Get maximum length of enc value.
uint32_t enc() const
Get enc value.
~MoveMotorEncoderMessage()
Destructor.
ObjectGotoMessage Fawkes BlackBoard Interface Message.
~ObjectGotoMessage()
Destructor.
void set_object(const char *new_object)
Set object value.
size_t maxlenof_object() const
Get maximum length of object value.
char * object() const
Get object value.
void set_rot_x(const float new_rot_x)
Set rot_x value.
size_t maxlenof_rot_x() const
Get maximum length of rot_x value.
float rot_x() const
Get rot_x value.
virtual Message * clone() const
Clone this message.
ObjectGotoMessage()
Constructor.
OpenGripperMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
OpenGripperMessage()
Constructor.
~OpenGripperMessage()
Destructor.
ParkMessage Fawkes BlackBoard Interface Message.
ParkMessage()
Constructor.
virtual Message * clone() const
Clone this message.
~ParkMessage()
Destructor.
SetEnabledMessage Fawkes BlackBoard Interface Message.
bool is_enabled() const
Get enabled value.
void set_enabled(const bool new_enabled)
Set enabled value.
SetEnabledMessage()
Constructor.
virtual Message * clone() const
Clone this message.
~SetEnabledMessage()
Destructor.
size_t maxlenof_enabled() const
Get maximum length of enabled value.
SetMaxVelocityMessage Fawkes BlackBoard Interface Message.
SetMaxVelocityMessage()
Constructor.
void set_max_velocity(const uint8_t new_max_velocity)
Set max_velocity value.
virtual Message * clone() const
Clone this message.
uint8_t max_velocity() const
Get max_velocity value.
size_t maxlenof_max_velocity() const
Get maximum length of max_velocity value.
~SetMaxVelocityMessage()
Destructor.
SetMotorAngleMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
size_t maxlenof_nr() const
Get maximum length of nr value.
size_t maxlenof_angle() const
Get maximum length of angle value.
SetMotorAngleMessage()
Constructor.
void set_angle(const float new_angle)
Set angle value.
uint32_t nr() const
Get nr value.
float angle() const
Get angle value.
~SetMotorAngleMessage()
Destructor.
void set_nr(const uint32_t new_nr)
Set nr value.
SetMotorEncoderMessage Fawkes BlackBoard Interface Message.
uint32_t enc() const
Get enc value.
void set_nr(const uint32_t new_nr)
Set nr value.
~SetMotorEncoderMessage()
Destructor.
size_t maxlenof_enc() const
Get maximum length of enc value.
uint32_t nr() const
Get nr value.
virtual Message * clone() const
Clone this message.
SetMotorEncoderMessage()
Constructor.
size_t maxlenof_nr() const
Get maximum length of nr value.
void set_enc(const uint32_t new_enc)
Set enc value.
SetPlannerParamsMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_straight() const
Get maximum length of straight value.
size_t maxlenof_plannerparams() const
Get maximum length of plannerparams value.
bool is_straight() const
Get straight value.
void set_plannerparams(const char *new_plannerparams)
Set plannerparams value.
char * plannerparams() const
Get plannerparams value.
~SetPlannerParamsMessage()
Destructor.
SetPlannerParamsMessage()
Constructor.
virtual Message * clone() const
Clone this message.
void set_straight(const bool new_straight)
Set straight value.
StopMessage Fawkes BlackBoard Interface Message.
StopMessage()
Constructor.
~StopMessage()
Destructor.
virtual Message * clone() const
Clone this message.
KatanaInterface Fawkes BlackBoard Interface.
static const uint32_t ERROR_NO_SOLUTION
ERROR_NO_SOLUTION constant.
uint8_t * sensor_value() const
Get sensor_value value.
size_t maxlenof_theta() const
Get maximum length of theta value.
void set_error_code(const uint32_t new_error_code)
Set error_code value.
static const uint32_t ERROR_COMMUNICATION
ERROR_COMMUNICATION constant.
static const uint32_t SENSOR_IR_LEFT_OUTER_FRONT
SENSOR_IR_LEFT_OUTER_FRONT constant.
float z() const
Get z value.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
size_t maxlenof_angles() const
Get maximum length of angles value.
float psi() const
Get psi value.
bool is_enabled() const
Get enabled value.
void set_calibrated(const bool new_calibrated)
Set calibrated value.
static const uint32_t SENSOR_IR_RIGHT_OUTER_FRONT
SENSOR_IR_RIGHT_OUTER_FRONT constant.
static const uint32_t SENSOR_IR_RIGHT_BOTTOM_FRONT
SENSOR_IR_RIGHT_BOTTOM_FRONT constant.
size_t maxlenof_final() const
Get maximum length of final value.
void set_sensor_value(unsigned int index, const uint8_t new_sensor_value)
Set sensor_value value at given index.
uint8_t num_motors() const
Get num_motors value.
void set_final(const bool new_final)
Set final value.
void set_phi(const float new_phi)
Set phi value.
void set_encoders(unsigned int index, const int32_t new_encoders)
Set encoders value at given index.
static const uint32_t SENSOR_IR_CENTER_GRIPPER
SENSOR_IR_CENTER_GRIPPER constant.
float * angles() const
Get angles value.
uint8_t max_velocity() const
Get max_velocity value.
static const uint32_t SENSOR_IR_LEFT_INNER_MIDDLE
SENSOR_IR_LEFT_INNER_MIDDLE constant.
size_t maxlenof_y() const
Get maximum length of y value.
size_t maxlenof_x() const
Get maximum length of x value.
void set_msgid(const uint32_t new_msgid)
Set msgid value.
static const uint32_t ERROR_NONE
ERROR_NONE constant.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
float y() const
Get y value.
static const uint32_t ERROR_MOTOR_CRASHED
ERROR_MOTOR_CRASHED constant.
static const uint32_t SENSOR_RESERVED_2
SENSOR_RESERVED_2 constant.
void set_max_velocity(const uint8_t new_max_velocity)
Set max_velocity value.
uint32_t msgid() const
Get msgid value.
static const uint32_t SENSOR_FORCE_LEFT_REAR
SENSOR_FORCE_LEFT_REAR constant.
static const uint32_t SENSOR_IR_RIGHT_INNER_MIDDLE
SENSOR_IR_RIGHT_INNER_MIDDLE constant.
uint32_t error_code() const
Get error_code value.
size_t maxlenof_z() const
Get maximum length of z value.
void set_theta(const float new_theta)
Set theta value.
static const uint32_t SENSOR_IR_LEFT_BOTTOM_FRONT
SENSOR_IR_LEFT_BOTTOM_FRONT constant.
bool is_calibrated() const
Get calibrated value.
static const uint32_t SENSOR_FORCE_LEFT_FRONT
SENSOR_FORCE_LEFT_FRONT constant.
int32_t * encoders() const
Get encoders value.
static const uint32_t SENSOR_RESERVED_10
SENSOR_RESERVED_10 constant.
size_t maxlenof_calibrated() const
Get maximum length of calibrated value.
static const uint32_t SENSOR_FORCE_RIGHT_FRONT
SENSOR_FORCE_RIGHT_FRONT constant.
size_t maxlenof_msgid() const
Get maximum length of msgid value.
static const uint32_t SENSOR_IR_RIGHT_INNER_FRONT
SENSOR_IR_RIGHT_INNER_FRONT constant.
virtual void copy_values(const Interface *other)
Copy values from other interface.
static const uint32_t ERROR_CMD_START_FAILED
ERROR_CMD_START_FAILED constant.
size_t maxlenof_error_code() const
Get maximum length of error_code value.
static const uint32_t SENSOR_COND_BOTH
SENSOR_COND_BOTH constant.
void set_y(const float new_y)
Set y value.
float theta() const
Get theta value.
float phi() const
Get phi value.
float x() const
Get x value.
size_t maxlenof_enabled() const
Get maximum length of enabled value.
bool is_final() const
Get final value.
static const uint32_t ERROR_UNSPECIFIC
ERROR_UNSPECIFIC constant.
void set_z(const float new_z)
Set z value.
size_t maxlenof_sensor_value() const
Get maximum length of sensor_value value.
size_t maxlenof_psi() const
Get maximum length of psi value.
virtual Message * create_message(const char *type) const
Create message based on type name.
void set_enabled(const bool new_enabled)
Set enabled value.
size_t maxlenof_num_motors() const
Get maximum length of num_motors value.
void set_x(const float new_x)
Set x value.
size_t maxlenof_max_velocity() const
Get maximum length of max_velocity value.
void set_psi(const float new_psi)
Set psi value.
size_t maxlenof_encoders() const
Get maximum length of encoders value.
static const uint32_t SENSOR_IR_LEFT_INNER_FRONT
SENSOR_IR_LEFT_INNER_FRONT constant.
void set_num_motors(const uint8_t new_num_motors)
Set num_motors value.
static const uint32_t SENSOR_FORCE_RIGHT_REAR
SENSOR_FORCE_RIGHT_REAR constant.
void set_angles(unsigned int index, const float new_angles)
Set angles value at given index.
size_t maxlenof_phi() const
Get maximum length of phi value.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Fawkes library namespace.