Fawkes API Fawkes Development Version
KatanaInterface.h
1
2/***************************************************************************
3 * KatanaInterface.h - Fawkes BlackBoard Interface - KatanaInterface
4 *
5 * Templated created: Thu Oct 12 10:49:19 2006
6 * Copyright 2009 Tim Niemueller
7 *
8 ****************************************************************************/
9
10/* This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version. A runtime exception applies to
14 * this software (see LICENSE.GPL_WRE file mentioned below for details).
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Library General Public License for more details.
20 *
21 * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22 */
23
24#ifndef _INTERFACES_KATANAINTERFACE_H_
25#define _INTERFACES_KATANAINTERFACE_H_
26
27#include <interface/interface.h>
28#include <interface/message.h>
29#include <interface/field_iterator.h>
30
31namespace fawkes {
32
34{
35 /// @cond INTERNALS
36 INTERFACE_MGMT_FRIENDS(KatanaInterface)
37 /// @endcond
38 public:
39 /* constants */
40 static const uint32_t SENSOR_IR_RIGHT_INNER_MIDDLE;
41 static const uint32_t SENSOR_IR_RIGHT_INNER_FRONT;
42 static const uint32_t SENSOR_RESERVED_2;
43 static const uint32_t SENSOR_COND_BOTH;
44 static const uint32_t SENSOR_IR_RIGHT_OUTER_FRONT;
45 static const uint32_t SENSOR_IR_RIGHT_BOTTOM_FRONT;
46 static const uint32_t SENSOR_FORCE_RIGHT_REAR;
47 static const uint32_t SENSOR_FORCE_RIGHT_FRONT;
48 static const uint32_t SENSOR_IR_LEFT_INNER_MIDDLE;
49 static const uint32_t SENSOR_IR_LEFT_INNER_FRONT;
50 static const uint32_t SENSOR_RESERVED_10;
51 static const uint32_t SENSOR_IR_CENTER_GRIPPER;
52 static const uint32_t SENSOR_IR_LEFT_OUTER_FRONT;
53 static const uint32_t SENSOR_IR_LEFT_BOTTOM_FRONT;
54 static const uint32_t SENSOR_FORCE_LEFT_REAR;
55 static const uint32_t SENSOR_FORCE_LEFT_FRONT;
56 static const uint32_t ERROR_NONE;
57 static const uint32_t ERROR_UNSPECIFIC;
58 static const uint32_t ERROR_CMD_START_FAILED;
59 static const uint32_t ERROR_NO_SOLUTION;
60 static const uint32_t ERROR_COMMUNICATION;
61 static const uint32_t ERROR_MOTOR_CRASHED;
62
63 private:
64 /** Internal data storage, do NOT modify! */
65 typedef struct {
66 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
67 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
68 uint8_t sensor_value[16]; /**< Sensor
69 values. Use SENSOR_* indexes for accessing the values. */
70 float x; /**< DEPRECATED! X-Coordinate for tool position
71 compared to base coordinate system. */
72 float y; /**< DEPRECATED! Y-Coordinate for tool position
73 compared to base coordinate system. */
74 float z; /**< DEPRECATED! Z-Coordinate for tool position
75 compared to base coordinate system. */
76 float phi; /**< DEPRECATED! Euler angle Phi of tool orientation. */
77 float theta; /**< DEPRECATED! Euler angle Theta of tool orientation. */
78 float psi; /**< DEPRECATED! Euler angle Psi of tool orientation. */
79 int32_t encoders[6]; /**< Encoder values of motors */
80 float angles[6]; /**< Angle values of motors */
81 uint32_t msgid; /**< The ID of the message that is currently being
82 processed, or 0 if no message is being processed. */
83 bool final; /**< True, if the last goto command has been finished,
84 false if it is still running */
85 uint32_t error_code; /**< Failure code set if
86 final is true. 0 if no error occured, an error code from ERROR_*
87 constants otherwise (or a bit-wise combination). */
88 bool enabled; /**< Are motors enabled? */
89 bool calibrated; /**< Has arm been calibrated? */
90 uint8_t max_velocity; /**< Maximum velocity */
91 uint8_t num_motors; /**< Number of motors */
92 } KatanaInterface_data_t;
93
94 KatanaInterface_data_t *data;
95
96 public:
97 /* messages */
98 class StopMessage : public Message
99 {
100 private:
101 /** Internal data storage, do NOT modify! */
102 typedef struct {
103 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
104 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
105 } StopMessage_data_t;
106
107 StopMessage_data_t *data;
108
109 public:
110 StopMessage();
111 ~StopMessage();
112
113 explicit StopMessage(const StopMessage *m);
114 /* Methods */
115 virtual Message * clone() const;
116 };
117
118 class FlushMessage : public Message
119 {
120 private:
121 /** Internal data storage, do NOT modify! */
122 typedef struct {
123 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
124 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
125 } FlushMessage_data_t;
126
127 FlushMessage_data_t *data;
128
129 public:
130 FlushMessage();
132
133 explicit FlushMessage(const FlushMessage *m);
134 /* Methods */
135 virtual Message * clone() const;
136 };
137
138 class ParkMessage : public Message
139 {
140 private:
141 /** Internal data storage, do NOT modify! */
142 typedef struct {
143 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
144 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
145 } ParkMessage_data_t;
146
147 ParkMessage_data_t *data;
148
149 public:
150 ParkMessage();
151 ~ParkMessage();
152
153 explicit ParkMessage(const ParkMessage *m);
154 /* Methods */
155 virtual Message * clone() const;
156 };
157
159 {
160 private:
161 /** Internal data storage, do NOT modify! */
162 typedef struct {
163 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
164 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
165 float theta_error; /**< Error range of theta rotation, gives more flexibility
166 for IK-solution searching. */
167 float offset_xy; /**< Offset to target. Distance in m (on the way to the target) */
168 bool straight; /**< Move in a straight line? */
169 char trans_frame[32]; /**< tf frame-id of origin's coordinate system,
170 regarding the translation */
171 char rot_frame[32]; /**< tf frame-id of origin's coordinate system,
172 regarding the rotation. In most cases, this is the robot's base coordinate system. */
173 float x; /**< DEPRECATED! X-Coordinate for tool position
174 compared to base coordinate system. */
175 float y; /**< DEPRECATED! Y-Coordinate for tool position
176 compared to base coordinate system. */
177 float z; /**< DEPRECATED! Z-Coordinate for tool position
178 compared to base coordinate system. */
179 float phi; /**< DEPRECATED! Euler angle Phi of tool orientation. */
180 float theta; /**< DEPRECATED! Euler angle Theta of tool orientation. */
181 float psi; /**< DEPRECATED! Euler angle Psi of tool orientation. */
182 } LinearGotoMessage_data_t;
183
184 LinearGotoMessage_data_t *data;
185
186 public:
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);
190
191 explicit LinearGotoMessage(const LinearGotoMessage *m);
192 /* Methods */
193 float theta_error() const;
194 void set_theta_error(const float new_theta_error);
195 size_t maxlenof_theta_error() const;
196 float offset_xy() const;
197 void set_offset_xy(const float new_offset_xy);
198 size_t maxlenof_offset_xy() const;
199 bool is_straight() const;
200 void set_straight(const bool new_straight);
201 size_t maxlenof_straight() const;
202 char * trans_frame() const;
203 void set_trans_frame(const char * new_trans_frame);
204 size_t maxlenof_trans_frame() const;
205 char * rot_frame() const;
206 void set_rot_frame(const char * new_rot_frame);
207 size_t maxlenof_rot_frame() const;
208 float x() const;
209 void set_x(const float new_x);
210 size_t maxlenof_x() const;
211 float y() const;
212 void set_y(const float new_y);
213 size_t maxlenof_y() const;
214 float z() const;
215 void set_z(const float new_z);
216 size_t maxlenof_z() const;
217 float phi() const;
218 void set_phi(const float new_phi);
219 size_t maxlenof_phi() const;
220 float theta() const;
221 void set_theta(const float new_theta);
222 size_t maxlenof_theta() const;
223 float psi() const;
224 void set_psi(const float new_psi);
225 size_t maxlenof_psi() const;
226 virtual Message * clone() const;
227 };
228
230 {
231 private:
232 /** Internal data storage, do NOT modify! */
233 typedef struct {
234 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
235 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
236 float x; /**< X-Coordinate for tool position
237 compared to base libkni coordinate system. */
238 float y; /**< Y-Coordinate for tool position
239 compared to base libkni coordinate system. */
240 float z; /**< Z-Coordinate for tool position
241 compared to base libkni coordinate system. */
242 float phi; /**< Euler angle Phi of tool orientation. */
243 float theta; /**< Euler angle Theta of tool orientation. */
244 float psi; /**< Euler angle Psi of tool orientation. */
245 } LinearGotoKniMessage_data_t;
246
247 LinearGotoKniMessage_data_t *data;
248
249 public:
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);
253
255 /* Methods */
256 float x() const;
257 void set_x(const float new_x);
258 size_t maxlenof_x() const;
259 float y() const;
260 void set_y(const float new_y);
261 size_t maxlenof_y() const;
262 float z() const;
263 void set_z(const float new_z);
264 size_t maxlenof_z() const;
265 float phi() const;
266 void set_phi(const float new_phi);
267 size_t maxlenof_phi() const;
268 float theta() const;
269 void set_theta(const float new_theta);
270 size_t maxlenof_theta() const;
271 float psi() const;
272 void set_psi(const float new_psi);
273 size_t maxlenof_psi() const;
274 virtual Message * clone() const;
275 };
276
278 {
279 private:
280 /** Internal data storage, do NOT modify! */
281 typedef struct {
282 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
283 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
284 char object[32]; /**< Name of object */
285 float rot_x; /**< Rotation of object on its x-axis */
286 } ObjectGotoMessage_data_t;
287
288 ObjectGotoMessage_data_t *data;
289
290 public:
291 ObjectGotoMessage(const char * ini_object, const float ini_rot_x);
294
295 explicit ObjectGotoMessage(const ObjectGotoMessage *m);
296 /* Methods */
297 char * object() const;
298 void set_object(const char * new_object);
299 size_t maxlenof_object() const;
300 float rot_x() const;
301 void set_rot_x(const float new_rot_x);
302 size_t maxlenof_rot_x() const;
303 virtual Message * clone() const;
304 };
305
307 {
308 private:
309 /** Internal data storage, do NOT modify! */
310 typedef struct {
311 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
312 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
313 } CalibrateMessage_data_t;
314
315 CalibrateMessage_data_t *data;
316
317 public:
320
321 explicit CalibrateMessage(const CalibrateMessage *m);
322 /* Methods */
323 virtual Message * clone() const;
324 };
325
327 {
328 private:
329 /** Internal data storage, do NOT modify! */
330 typedef struct {
331 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
332 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
333 } OpenGripperMessage_data_t;
334
335 OpenGripperMessage_data_t *data;
336
337 public:
340
341 explicit OpenGripperMessage(const OpenGripperMessage *m);
342 /* Methods */
343 virtual Message * clone() const;
344 };
345
347 {
348 private:
349 /** Internal data storage, do NOT modify! */
350 typedef struct {
351 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
352 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
353 } CloseGripperMessage_data_t;
354
355 CloseGripperMessage_data_t *data;
356
357 public:
360
361 explicit CloseGripperMessage(const CloseGripperMessage *m);
362 /* Methods */
363 virtual Message * clone() const;
364 };
365
367 {
368 private:
369 /** Internal data storage, do NOT modify! */
370 typedef struct {
371 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
372 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
373 bool enabled; /**< Are motors enabled? */
374 } SetEnabledMessage_data_t;
375
376 SetEnabledMessage_data_t *data;
377
378 public:
379 SetEnabledMessage(const bool ini_enabled);
382
383 explicit SetEnabledMessage(const SetEnabledMessage *m);
384 /* Methods */
385 bool is_enabled() const;
386 void set_enabled(const bool new_enabled);
387 size_t maxlenof_enabled() const;
388 virtual Message * clone() const;
389 };
390
392 {
393 private:
394 /** Internal data storage, do NOT modify! */
395 typedef struct {
396 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
397 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
398 uint8_t max_velocity; /**< Maximum velocity */
399 } SetMaxVelocityMessage_data_t;
400
401 SetMaxVelocityMessage_data_t *data;
402
403 public:
404 SetMaxVelocityMessage(const uint8_t ini_max_velocity);
407
409 /* Methods */
410 uint8_t max_velocity() const;
411 void set_max_velocity(const uint8_t new_max_velocity);
412 size_t maxlenof_max_velocity() const;
413 virtual Message * clone() const;
414 };
415
417 {
418 private:
419 /** Internal data storage, do NOT modify! */
420 typedef struct {
421 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
422 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
423 char plannerparams[1024]; /**< Planner parameters */
424 bool straight; /**< Parameters for straight movement? */
425 } SetPlannerParamsMessage_data_t;
426
427 SetPlannerParamsMessage_data_t *data;
428
429 public:
430 SetPlannerParamsMessage(const char * ini_plannerparams, const bool ini_straight);
433
435 /* Methods */
436 char * plannerparams() const;
437 void set_plannerparams(const char * new_plannerparams);
438 size_t maxlenof_plannerparams() const;
439 bool is_straight() const;
440 void set_straight(const bool new_straight);
441 size_t maxlenof_straight() const;
442 virtual Message * clone() const;
443 };
444
446 {
447 private:
448 /** Internal data storage, do NOT modify! */
449 typedef struct {
450 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
451 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
452 uint32_t nr; /**< Motor number */
453 uint32_t enc; /**< Encoder value */
454 } SetMotorEncoderMessage_data_t;
455
456 SetMotorEncoderMessage_data_t *data;
457
458 public:
459 SetMotorEncoderMessage(const uint32_t ini_nr, const uint32_t ini_enc);
462
464 /* Methods */
465 uint32_t nr() const;
466 void set_nr(const uint32_t new_nr);
467 size_t maxlenof_nr() const;
468 uint32_t enc() const;
469 void set_enc(const uint32_t new_enc);
470 size_t maxlenof_enc() const;
471 virtual Message * clone() const;
472 };
473
475 {
476 private:
477 /** Internal data storage, do NOT modify! */
478 typedef struct {
479 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
480 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
481 uint32_t nr; /**< Motor number */
482 uint32_t enc; /**< Encoder value */
483 } MoveMotorEncoderMessage_data_t;
484
485 MoveMotorEncoderMessage_data_t *data;
486
487 public:
488 MoveMotorEncoderMessage(const uint32_t ini_nr, const uint32_t ini_enc);
491
493 /* Methods */
494 uint32_t nr() const;
495 void set_nr(const uint32_t new_nr);
496 size_t maxlenof_nr() const;
497 uint32_t enc() const;
498 void set_enc(const uint32_t new_enc);
499 size_t maxlenof_enc() const;
500 virtual Message * clone() const;
501 };
502
504 {
505 private:
506 /** Internal data storage, do NOT modify! */
507 typedef struct {
508 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
509 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
510 uint32_t nr; /**< Motor number */
511 float angle; /**< Angle value (positive: increase; negative: decrease) */
512 } SetMotorAngleMessage_data_t;
513
514 SetMotorAngleMessage_data_t *data;
515
516 public:
517 SetMotorAngleMessage(const uint32_t ini_nr, const float ini_angle);
520
522 /* Methods */
523 uint32_t nr() const;
524 void set_nr(const uint32_t new_nr);
525 size_t maxlenof_nr() const;
526 float angle() const;
527 void set_angle(const float new_angle);
528 size_t maxlenof_angle() const;
529 virtual Message * clone() const;
530 };
531
533 {
534 private:
535 /** Internal data storage, do NOT modify! */
536 typedef struct {
537 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
538 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
539 uint32_t nr; /**< Motor number */
540 float angle; /**< Angle value (positive: increase; negative: decrease) */
541 } MoveMotorAngleMessage_data_t;
542
543 MoveMotorAngleMessage_data_t *data;
544
545 public:
546 MoveMotorAngleMessage(const uint32_t ini_nr, const float ini_angle);
549
551 /* Methods */
552 uint32_t nr() const;
553 void set_nr(const uint32_t new_nr);
554 size_t maxlenof_nr() const;
555 float angle() const;
556 void set_angle(const float new_angle);
557 size_t maxlenof_angle() const;
558 virtual Message * clone() const;
559 };
560
561 virtual bool message_valid(const Message *message) const;
562 private:
565
566 public:
567 /* Methods */
568 uint8_t * sensor_value() const;
569 uint8_t sensor_value(unsigned int index) const;
570 void set_sensor_value(unsigned int index, const uint8_t new_sensor_value);
571 void set_sensor_value(const uint8_t * new_sensor_value);
572 size_t maxlenof_sensor_value() const;
573 float x() const;
574 void set_x(const float new_x);
575 size_t maxlenof_x() const;
576 float y() const;
577 void set_y(const float new_y);
578 size_t maxlenof_y() const;
579 float z() const;
580 void set_z(const float new_z);
581 size_t maxlenof_z() const;
582 float phi() const;
583 void set_phi(const float new_phi);
584 size_t maxlenof_phi() const;
585 float theta() const;
586 void set_theta(const float new_theta);
587 size_t maxlenof_theta() const;
588 float psi() const;
589 void set_psi(const float new_psi);
590 size_t maxlenof_psi() const;
591 int32_t * encoders() const;
592 int32_t encoders(unsigned int index) const;
593 void set_encoders(unsigned int index, const int32_t new_encoders);
594 void set_encoders(const int32_t * new_encoders);
595 size_t maxlenof_encoders() const;
596 float * angles() const;
597 float angles(unsigned int index) const;
598 void set_angles(unsigned int index, const float new_angles);
599 void set_angles(const float * new_angles);
600 size_t maxlenof_angles() const;
601 uint32_t msgid() const;
602 void set_msgid(const uint32_t new_msgid);
603 size_t maxlenof_msgid() const;
604 bool is_final() const;
605 void set_final(const bool new_final);
606 size_t maxlenof_final() const;
607 uint32_t error_code() const;
608 void set_error_code(const uint32_t new_error_code);
609 size_t maxlenof_error_code() const;
610 bool is_enabled() const;
611 void set_enabled(const bool new_enabled);
612 size_t maxlenof_enabled() const;
613 bool is_calibrated() const;
614 void set_calibrated(const bool new_calibrated);
615 size_t maxlenof_calibrated() const;
616 uint8_t max_velocity() const;
617 void set_max_velocity(const uint8_t new_max_velocity);
618 size_t maxlenof_max_velocity() const;
619 uint8_t num_motors() const;
620 void set_num_motors(const uint8_t new_num_motors);
621 size_t maxlenof_num_motors() const;
622 virtual Message * create_message(const char *type) const;
623
624 virtual void copy_values(const Interface *other);
625 virtual const char * enum_tostring(const char *enumtype, int val) const;
626
627};
628
629} // end namespace fawkes
630
631#endif
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:80
const char * type() const
Get type of interface.
Definition: interface.cpp:652
CalibrateMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
CloseGripperMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
FlushMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
LinearGotoKniMessage Fawkes BlackBoard Interface Message.
void set_y(const float new_y)
Set y value.
void set_phi(const float new_phi)
Set phi 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.
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_y() const
Get maximum length of y value.
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.
LinearGotoMessage Fawkes BlackBoard Interface Message.
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 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.
void set_trans_frame(const char *new_trans_frame)
Set trans_frame 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.
size_t maxlenof_phi() const
Get maximum length of phi value.
void set_straight(const bool new_straight)
Set straight value.
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.
void set_angle(const float new_angle)
Set 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.
size_t maxlenof_enc() const
Get maximum length of enc value.
ObjectGotoMessage Fawkes BlackBoard Interface Message.
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.
virtual Message * clone() const
Clone this message.
OpenGripperMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
ParkMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
SetEnabledMessage Fawkes BlackBoard Interface Message.
bool is_enabled() const
Get enabled value.
void set_enabled(const bool new_enabled)
Set enabled value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_enabled() const
Get maximum length of enabled value.
SetMaxVelocityMessage Fawkes BlackBoard Interface Message.
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.
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.
void set_angle(const float new_angle)
Set angle value.
void set_nr(const uint32_t new_nr)
Set nr value.
SetMotorEncoderMessage Fawkes BlackBoard Interface Message.
void set_nr(const uint32_t new_nr)
Set nr value.
size_t maxlenof_enc() const
Get maximum length of enc value.
virtual Message * clone() const
Clone this message.
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.
void set_plannerparams(const char *new_plannerparams)
Set plannerparams value.
char * plannerparams() const
Get plannerparams value.
virtual Message * clone() const
Clone this message.
void set_straight(const bool new_straight)
Set straight value.
StopMessage Fawkes BlackBoard Interface Message.
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.
Definition: message.h:44
Fawkes library namespace.