Fawkes API  Fawkes Development Version
ObjectPositionInterface.cpp
1 
2 /***************************************************************************
3  * ObjectPositionInterface.cpp - Fawkes BlackBoard Interface - ObjectPositionInterface
4  *
5  * Templated created: Thu Oct 12 10:49:19 2006
6  * Copyright 2007-2008 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 #include <interfaces/ObjectPositionInterface.h>
25 
26 #include <core/exceptions/software.h>
27 
28 #include <map>
29 #include <string>
30 #include <cstring>
31 #include <cstdlib>
32 
33 namespace fawkes {
34 
35 /** @class ObjectPositionInterface <interfaces/ObjectPositionInterface.h>
36  * ObjectPositionInterface Fawkes BlackBoard Interface.
37  *
38  This interface provides access to arbitrary object positions and velocities. You
39  can use it to store the position of any object in the RoboCup domain. There is a type
40  indicator for the RoboCup soccer domain to easily distinguish several well
41  known objects. You may choose not to use this for other application in which case
42  the value should be other (which is also the default).
43 
44  * @ingroup FawkesInterfaces
45  */
46 
47 
48 /** TYPE_OTHER constant */
49 const uint32_t ObjectPositionInterface::TYPE_OTHER = 0u;
50 /** TYPE_BALL constant */
51 const uint32_t ObjectPositionInterface::TYPE_BALL = 1u;
52 /** TYPE_OPPONENT constant */
53 const uint32_t ObjectPositionInterface::TYPE_OPPONENT = 2u;
54 /** TYPE_TEAMMEMBER constant */
56 /** TYPE_LINE constant */
57 const uint32_t ObjectPositionInterface::TYPE_LINE = 4u;
58 /** TYPE_SELF constant */
59 const uint32_t ObjectPositionInterface::TYPE_SELF = 5u;
60 /** TYPE_GOAL_BLUE constant */
61 const uint32_t ObjectPositionInterface::TYPE_GOAL_BLUE = 6u;
62 /** TYPE_GOAL_YELLOW constant */
64 /** FLAG_NONE constant */
65 const uint32_t ObjectPositionInterface::FLAG_NONE = 0u;
66 /** FLAG_HAS_WORLD constant */
67 const uint32_t ObjectPositionInterface::FLAG_HAS_WORLD = 1u;
68 /** FLAG_HAS_RELATIVE_CARTESIAN constant */
70 /** FLAG_HAS_RELATIVE_POLAR constant */
72 /** FLAG_HAS_EULER_ANGLES constant */
74 /** FLAG_HAS_EXTENT constant */
75 const uint32_t ObjectPositionInterface::FLAG_HAS_EXTENT = 16u;
76 /** FLAG_HAS_VOLUME_EXTENT constant */
78 /** FLAG_HAS_CIRCULAR_EXTENT constant */
80 /** FLAG_HAS_COVARIANCES constant */
82 /** FLAG_HAS_WORLD_VELOCITY constant */
84 /** FLAG_HAS_Z_AS_ORI constant */
85 const uint32_t ObjectPositionInterface::FLAG_HAS_Z_AS_ORI = 512u;
86 /** FLAG_IS_FIXED_OBJECT constant */
88 
89 /** Constructor */
90 ObjectPositionInterface::ObjectPositionInterface() : Interface()
91 {
92  data_size = sizeof(ObjectPositionInterface_data_t);
93  data_ptr = malloc(data_size);
94  data = (ObjectPositionInterface_data_t *)data_ptr;
95  data_ts = (interface_data_ts_t *)data_ptr;
96  memset(data_ptr, 0, data_size);
97  add_fieldinfo(IFT_UINT32, "object_type", 1, &data->object_type);
98  add_fieldinfo(IFT_UINT32, "flags", 1, &data->flags);
99  add_fieldinfo(IFT_BOOL, "visible", 1, &data->visible);
100  add_fieldinfo(IFT_BOOL, "valid", 1, &data->valid);
101  add_fieldinfo(IFT_INT32, "visibility_history", 1, &data->visibility_history);
102  add_fieldinfo(IFT_FLOAT, "roll", 1, &data->roll);
103  add_fieldinfo(IFT_FLOAT, "pitch", 1, &data->pitch);
104  add_fieldinfo(IFT_FLOAT, "yaw", 1, &data->yaw);
105  add_fieldinfo(IFT_FLOAT, "distance", 1, &data->distance);
106  add_fieldinfo(IFT_FLOAT, "bearing", 1, &data->bearing);
107  add_fieldinfo(IFT_FLOAT, "slope", 1, &data->slope);
108  add_fieldinfo(IFT_FLOAT, "dbs_covariance", 9, &data->dbs_covariance);
109  add_fieldinfo(IFT_FLOAT, "world_x", 1, &data->world_x);
110  add_fieldinfo(IFT_FLOAT, "world_y", 1, &data->world_y);
111  add_fieldinfo(IFT_FLOAT, "world_z", 1, &data->world_z);
112  add_fieldinfo(IFT_FLOAT, "world_xyz_covariance", 9, &data->world_xyz_covariance);
113  add_fieldinfo(IFT_FLOAT, "relative_x", 1, &data->relative_x);
114  add_fieldinfo(IFT_FLOAT, "relative_y", 1, &data->relative_y);
115  add_fieldinfo(IFT_FLOAT, "relative_z", 1, &data->relative_z);
116  add_fieldinfo(IFT_FLOAT, "relative_xyz_covariance", 9, &data->relative_xyz_covariance);
117  add_fieldinfo(IFT_FLOAT, "extent_x", 1, &data->extent_x);
118  add_fieldinfo(IFT_FLOAT, "extent_y", 1, &data->extent_y);
119  add_fieldinfo(IFT_FLOAT, "extent_z", 1, &data->extent_z);
120  add_fieldinfo(IFT_FLOAT, "world_x_velocity", 1, &data->world_x_velocity);
121  add_fieldinfo(IFT_FLOAT, "world_y_velocity", 1, &data->world_y_velocity);
122  add_fieldinfo(IFT_FLOAT, "world_z_velocity", 1, &data->world_z_velocity);
123  add_fieldinfo(IFT_FLOAT, "world_xyz_velocity_covariance", 9, &data->world_xyz_velocity_covariance);
124  add_fieldinfo(IFT_FLOAT, "relative_x_velocity", 1, &data->relative_x_velocity);
125  add_fieldinfo(IFT_FLOAT, "relative_y_velocity", 1, &data->relative_y_velocity);
126  add_fieldinfo(IFT_FLOAT, "relative_z_velocity", 1, &data->relative_z_velocity);
127  add_fieldinfo(IFT_FLOAT, "relative_xyz_velocity_covariance", 9, &data->relative_xyz_velocity_covariance);
128  unsigned char tmp_hash[] = {0x9f, 0x72, 0x61, 0x39, 0x9a, 0xb4, 0x79, 0x4c, 0x33, 0x3, 0x3a, 0x75, 0xfc, 0xf0, 0xe5, 0x7e};
129  set_hash(tmp_hash);
130 }
131 
132 /** Destructor */
133 ObjectPositionInterface::~ObjectPositionInterface()
134 {
135  free(data_ptr);
136 }
137 /* Methods */
138 /** Get object_type value.
139  *
140  Object type, use constants to define
141 
142  * @return object_type value
143  */
144 uint32_t
146 {
147  return data->object_type;
148 }
149 
150 /** Get maximum length of object_type value.
151  * @return length of object_type value, can be length of the array or number of
152  * maximum number of characters for a string
153  */
154 size_t
156 {
157  return 1;
158 }
159 
160 /** Set object_type value.
161  *
162  Object type, use constants to define
163 
164  * @param new_object_type new object_type value
165  */
166 void
167 ObjectPositionInterface::set_object_type(const uint32_t new_object_type)
168 {
169  data->object_type = new_object_type;
170  data_changed = true;
171 }
172 
173 /** Get flags value.
174  *
175  Bit-wise concatenated fields of FLAG_* constants. Denotes features that the
176  writer of this interfaces provides. Use a bit-wise OR to concatenate multiple
177  flags, use a bit-wise AND to check if a flag has been set.
178 
179  * @return flags value
180  */
181 uint32_t
183 {
184  return data->flags;
185 }
186 
187 /** Get maximum length of flags value.
188  * @return length of flags value, can be length of the array or number of
189  * maximum number of characters for a string
190  */
191 size_t
193 {
194  return 1;
195 }
196 
197 /** Set flags value.
198  *
199  Bit-wise concatenated fields of FLAG_* constants. Denotes features that the
200  writer of this interfaces provides. Use a bit-wise OR to concatenate multiple
201  flags, use a bit-wise AND to check if a flag has been set.
202 
203  * @param new_flags new flags value
204  */
205 void
206 ObjectPositionInterface::set_flags(const uint32_t new_flags)
207 {
208  data->flags = new_flags;
209  data_changed = true;
210 }
211 
212 /** Get visible value.
213  * True, if object is visible.
214  * @return visible value
215  */
216 bool
218 {
219  return data->visible;
220 }
221 
222 /** Get maximum length of visible value.
223  * @return length of visible value, can be length of the array or number of
224  * maximum number of characters for a string
225  */
226 size_t
228 {
229  return 1;
230 }
231 
232 /** Set visible value.
233  * True, if object is visible.
234  * @param new_visible new visible value
235  */
236 void
238 {
239  data->visible = new_visible;
240  data_changed = true;
241 }
242 
243 /** Get valid value.
244  * True, if this position is valid.
245  * @return valid value
246  */
247 bool
249 {
250  return data->valid;
251 }
252 
253 /** Get maximum length of valid value.
254  * @return length of valid value, can be length of the array or number of
255  * maximum number of characters for a string
256  */
257 size_t
259 {
260  return 1;
261 }
262 
263 /** Set valid value.
264  * True, if this position is valid.
265  * @param new_valid new valid value
266  */
267 void
269 {
270  data->valid = new_valid;
271  data_changed = true;
272 }
273 
274 /** Get visibility_history value.
275  *
276  The visibilitiy history indicates the number of consecutive positive or negative
277  sightings. If the history is negative, there have been as many negative sightings
278  (object not visible) as the absolute value of the history. A positive value denotes
279  as many positive sightings. 0 shall only be used during the initialisation of the
280  interface or if the visibility history is not filled.
281 
282  * @return visibility_history value
283  */
284 int32_t
286 {
287  return data->visibility_history;
288 }
289 
290 /** Get maximum length of visibility_history value.
291  * @return length of visibility_history value, can be length of the array or number of
292  * maximum number of characters for a string
293  */
294 size_t
296 {
297  return 1;
298 }
299 
300 /** Set visibility_history value.
301  *
302  The visibilitiy history indicates the number of consecutive positive or negative
303  sightings. If the history is negative, there have been as many negative sightings
304  (object not visible) as the absolute value of the history. A positive value denotes
305  as many positive sightings. 0 shall only be used during the initialisation of the
306  interface or if the visibility history is not filled.
307 
308  * @param new_visibility_history new visibility_history value
309  */
310 void
311 ObjectPositionInterface::set_visibility_history(const int32_t new_visibility_history)
312 {
313  data->visibility_history = new_visibility_history;
314  data_changed = true;
315 }
316 
317 /** Get roll value.
318  *
319  Roll value for the orientation of the object in space.
320 
321  * @return roll value
322  */
323 float
325 {
326  return data->roll;
327 }
328 
329 /** Get maximum length of roll value.
330  * @return length of roll value, can be length of the array or number of
331  * maximum number of characters for a string
332  */
333 size_t
335 {
336  return 1;
337 }
338 
339 /** Set roll value.
340  *
341  Roll value for the orientation of the object in space.
342 
343  * @param new_roll new roll value
344  */
345 void
347 {
348  data->roll = new_roll;
349  data_changed = true;
350 }
351 
352 /** Get pitch value.
353  *
354  Pitch value for the orientation of the object in space.
355 
356  * @return pitch value
357  */
358 float
360 {
361  return data->pitch;
362 }
363 
364 /** Get maximum length of pitch value.
365  * @return length of pitch value, can be length of the array or number of
366  * maximum number of characters for a string
367  */
368 size_t
370 {
371  return 1;
372 }
373 
374 /** Set pitch value.
375  *
376  Pitch value for the orientation of the object in space.
377 
378  * @param new_pitch new pitch value
379  */
380 void
382 {
383  data->pitch = new_pitch;
384  data_changed = true;
385 }
386 
387 /** Get yaw value.
388  *
389  Yaw value for the orientation of the object in space.
390 
391  * @return yaw value
392  */
393 float
395 {
396  return data->yaw;
397 }
398 
399 /** Get maximum length of yaw value.
400  * @return length of yaw value, can be length of the array or number of
401  * maximum number of characters for a string
402  */
403 size_t
405 {
406  return 1;
407 }
408 
409 /** Set yaw value.
410  *
411  Yaw value for the orientation of the object in space.
412 
413  * @param new_yaw new yaw value
414  */
415 void
417 {
418  data->yaw = new_yaw;
419  data_changed = true;
420 }
421 
422 /** Get distance value.
423  *
424  Distance from the robot to the object on the ground plane. The distance is given
425  in meters.
426 
427  * @return distance value
428  */
429 float
431 {
432  return data->distance;
433 }
434 
435 /** Get maximum length of distance value.
436  * @return length of distance value, can be length of the array or number of
437  * maximum number of characters for a string
438  */
439 size_t
441 {
442  return 1;
443 }
444 
445 /** Set distance value.
446  *
447  Distance from the robot to the object on the ground plane. The distance is given
448  in meters.
449 
450  * @param new_distance new distance value
451  */
452 void
453 ObjectPositionInterface::set_distance(const float new_distance)
454 {
455  data->distance = new_distance;
456  data_changed = true;
457 }
458 
459 /** Get bearing value.
460  *
461  Angle between the robot's forward direction and the object on the ground plane.
462  This angle is in a local 3D coordinate system to the robot and given in radians.
463 
464  * @return bearing value
465  */
466 float
468 {
469  return data->bearing;
470 }
471 
472 /** Get maximum length of bearing value.
473  * @return length of bearing value, can be length of the array or number of
474  * maximum number of characters for a string
475  */
476 size_t
478 {
479  return 1;
480 }
481 
482 /** Set bearing value.
483  *
484  Angle between the robot's forward direction and the object on the ground plane.
485  This angle is in a local 3D coordinate system to the robot and given in radians.
486 
487  * @param new_bearing new bearing value
488  */
489 void
490 ObjectPositionInterface::set_bearing(const float new_bearing)
491 {
492  data->bearing = new_bearing;
493  data_changed = true;
494 }
495 
496 /** Get slope value.
497  *
498  Angle between the robot's center position on the ground plane and the middle point
499  of the object (e.g. this denotes the height of the object combined with the distance.
500  The angle is given in radians.
501 
502  * @return slope value
503  */
504 float
506 {
507  return data->slope;
508 }
509 
510 /** Get maximum length of slope value.
511  * @return length of slope value, can be length of the array or number of
512  * maximum number of characters for a string
513  */
514 size_t
516 {
517  return 1;
518 }
519 
520 /** Set slope value.
521  *
522  Angle between the robot's center position on the ground plane and the middle point
523  of the object (e.g. this denotes the height of the object combined with the distance.
524  The angle is given in radians.
525 
526  * @param new_slope new slope value
527  */
528 void
530 {
531  data->slope = new_slope;
532  data_changed = true;
533 }
534 
535 /** Get dbs_covariance value.
536  *
537  Covariance of Distance/Yaw/Pitch values. This is a 3x3 matrix ordered line by line,
538  first three values represent row, next tree values second row and last three values
539  last row from left to right each.
540 
541  * @return dbs_covariance value
542  */
543 float *
545 {
546  return data->dbs_covariance;
547 }
548 
549 /** Get dbs_covariance value at given index.
550  *
551  Covariance of Distance/Yaw/Pitch values. This is a 3x3 matrix ordered line by line,
552  first three values represent row, next tree values second row and last three values
553  last row from left to right each.
554 
555  * @param index index of value
556  * @return dbs_covariance value
557  * @exception Exception thrown if index is out of bounds
558  */
559 float
561 {
562  if (index > 9) {
563  throw Exception("Index value %u out of bounds (0..9)", index);
564  }
565  return data->dbs_covariance[index];
566 }
567 
568 /** Get maximum length of dbs_covariance value.
569  * @return length of dbs_covariance value, can be length of the array or number of
570  * maximum number of characters for a string
571  */
572 size_t
574 {
575  return 9;
576 }
577 
578 /** Set dbs_covariance value.
579  *
580  Covariance of Distance/Yaw/Pitch values. This is a 3x3 matrix ordered line by line,
581  first three values represent row, next tree values second row and last three values
582  last row from left to right each.
583 
584  * @param new_dbs_covariance new dbs_covariance value
585  */
586 void
587 ObjectPositionInterface::set_dbs_covariance(const float * new_dbs_covariance)
588 {
589  memcpy(data->dbs_covariance, new_dbs_covariance, sizeof(float) * 9);
590  data_changed = true;
591 }
592 
593 /** Set dbs_covariance value at given index.
594  *
595  Covariance of Distance/Yaw/Pitch values. This is a 3x3 matrix ordered line by line,
596  first three values represent row, next tree values second row and last three values
597  last row from left to right each.
598 
599  * @param new_dbs_covariance new dbs_covariance value
600  * @param index index for of the value
601  */
602 void
603 ObjectPositionInterface::set_dbs_covariance(unsigned int index, const float new_dbs_covariance)
604 {
605  if (index > 9) {
606  throw Exception("Index value %u out of bounds (0..9)", index);
607  }
608  data->dbs_covariance[index] = new_dbs_covariance;
609  data_changed = true;
610 }
611 /** Get world_x value.
612  *
613  This is the X coordinate in the cartesian right-handed world coordinate system.
614  This coordinate system has its origin in the center of the field, Y pointing to
615  the opponent's goal and X pointing to the right.
616 
617  * @return world_x value
618  */
619 float
621 {
622  return data->world_x;
623 }
624 
625 /** Get maximum length of world_x value.
626  * @return length of world_x value, can be length of the array or number of
627  * maximum number of characters for a string
628  */
629 size_t
631 {
632  return 1;
633 }
634 
635 /** Set world_x value.
636  *
637  This is the X coordinate in the cartesian right-handed world coordinate system.
638  This coordinate system has its origin in the center of the field, Y pointing to
639  the opponent's goal and X pointing to the right.
640 
641  * @param new_world_x new world_x value
642  */
643 void
644 ObjectPositionInterface::set_world_x(const float new_world_x)
645 {
646  data->world_x = new_world_x;
647  data_changed = true;
648 }
649 
650 /** Get world_y value.
651  *
652  This is the Y coordinate in the cartesian right-handed world coordinate system.
653  This coordinate system has its origin in the center of the field, Y pointing to
654  the opponent's goal and X pointing to the right and Z pointing downwards.
655 
656  * @return world_y value
657  */
658 float
660 {
661  return data->world_y;
662 }
663 
664 /** Get maximum length of world_y value.
665  * @return length of world_y value, can be length of the array or number of
666  * maximum number of characters for a string
667  */
668 size_t
670 {
671  return 1;
672 }
673 
674 /** Set world_y value.
675  *
676  This is the Y coordinate in the cartesian right-handed world coordinate system.
677  This coordinate system has its origin in the center of the field, Y pointing to
678  the opponent's goal and X pointing to the right and Z pointing downwards.
679 
680  * @param new_world_y new world_y value
681  */
682 void
683 ObjectPositionInterface::set_world_y(const float new_world_y)
684 {
685  data->world_y = new_world_y;
686  data_changed = true;
687 }
688 
689 /** Get world_z value.
690  *
691  This is the Z coordinate in the cartesian right-handed world coordinate system.
692  This coordinate system has its origin in the center of the field, Y pointing to
693  the opponent's goal and X pointing to the right.
694 
695  * @return world_z value
696  */
697 float
699 {
700  return data->world_z;
701 }
702 
703 /** Get maximum length of world_z value.
704  * @return length of world_z value, can be length of the array or number of
705  * maximum number of characters for a string
706  */
707 size_t
709 {
710  return 1;
711 }
712 
713 /** Set world_z value.
714  *
715  This is the Z coordinate in the cartesian right-handed world coordinate system.
716  This coordinate system has its origin in the center of the field, Y pointing to
717  the opponent's goal and X pointing to the right.
718 
719  * @param new_world_z new world_z value
720  */
721 void
722 ObjectPositionInterface::set_world_z(const float new_world_z)
723 {
724  data->world_z = new_world_z;
725  data_changed = true;
726 }
727 
728 /** Get world_xyz_covariance value.
729  *
730  Covariance of WorldX/WorldY/WorldZ values. This is a 3x3 matrix ordered line by line,
731  first three values represent row, next tree values second row and last three values
732  last row from left to right each.
733 
734  * @return world_xyz_covariance value
735  */
736 float *
738 {
739  return data->world_xyz_covariance;
740 }
741 
742 /** Get world_xyz_covariance value at given index.
743  *
744  Covariance of WorldX/WorldY/WorldZ values. This is a 3x3 matrix ordered line by line,
745  first three values represent row, next tree values second row and last three values
746  last row from left to right each.
747 
748  * @param index index of value
749  * @return world_xyz_covariance value
750  * @exception Exception thrown if index is out of bounds
751  */
752 float
754 {
755  if (index > 9) {
756  throw Exception("Index value %u out of bounds (0..9)", index);
757  }
758  return data->world_xyz_covariance[index];
759 }
760 
761 /** Get maximum length of world_xyz_covariance value.
762  * @return length of world_xyz_covariance value, can be length of the array or number of
763  * maximum number of characters for a string
764  */
765 size_t
767 {
768  return 9;
769 }
770 
771 /** Set world_xyz_covariance value.
772  *
773  Covariance of WorldX/WorldY/WorldZ values. This is a 3x3 matrix ordered line by line,
774  first three values represent row, next tree values second row and last three values
775  last row from left to right each.
776 
777  * @param new_world_xyz_covariance new world_xyz_covariance value
778  */
779 void
780 ObjectPositionInterface::set_world_xyz_covariance(const float * new_world_xyz_covariance)
781 {
782  memcpy(data->world_xyz_covariance, new_world_xyz_covariance, sizeof(float) * 9);
783  data_changed = true;
784 }
785 
786 /** Set world_xyz_covariance value at given index.
787  *
788  Covariance of WorldX/WorldY/WorldZ values. This is a 3x3 matrix ordered line by line,
789  first three values represent row, next tree values second row and last three values
790  last row from left to right each.
791 
792  * @param new_world_xyz_covariance new world_xyz_covariance value
793  * @param index index for of the value
794  */
795 void
796 ObjectPositionInterface::set_world_xyz_covariance(unsigned int index, const float new_world_xyz_covariance)
797 {
798  if (index > 9) {
799  throw Exception("Index value %u out of bounds (0..9)", index);
800  }
801  data->world_xyz_covariance[index] = new_world_xyz_covariance;
802  data_changed = true;
803 }
804 /** Get relative_x value.
805  *
806  This is the X coordinate in the cartesian right-handed robot coordinate system.
807 
808  * @return relative_x value
809  */
810 float
812 {
813  return data->relative_x;
814 }
815 
816 /** Get maximum length of relative_x value.
817  * @return length of relative_x value, can be length of the array or number of
818  * maximum number of characters for a string
819  */
820 size_t
822 {
823  return 1;
824 }
825 
826 /** Set relative_x value.
827  *
828  This is the X coordinate in the cartesian right-handed robot coordinate system.
829 
830  * @param new_relative_x new relative_x value
831  */
832 void
833 ObjectPositionInterface::set_relative_x(const float new_relative_x)
834 {
835  data->relative_x = new_relative_x;
836  data_changed = true;
837 }
838 
839 /** Get relative_y value.
840  *
841  This is the Y coordinate in the cartesian right-handed robot coordinate system.
842 
843  * @return relative_y value
844  */
845 float
847 {
848  return data->relative_y;
849 }
850 
851 /** Get maximum length of relative_y value.
852  * @return length of relative_y value, can be length of the array or number of
853  * maximum number of characters for a string
854  */
855 size_t
857 {
858  return 1;
859 }
860 
861 /** Set relative_y value.
862  *
863  This is the Y coordinate in the cartesian right-handed robot coordinate system.
864 
865  * @param new_relative_y new relative_y value
866  */
867 void
868 ObjectPositionInterface::set_relative_y(const float new_relative_y)
869 {
870  data->relative_y = new_relative_y;
871  data_changed = true;
872 }
873 
874 /** Get relative_z value.
875  *
876  This is the Z coordinate in the cartesian right-handed robot coordinate system.
877 
878  * @return relative_z value
879  */
880 float
882 {
883  return data->relative_z;
884 }
885 
886 /** Get maximum length of relative_z value.
887  * @return length of relative_z value, can be length of the array or number of
888  * maximum number of characters for a string
889  */
890 size_t
892 {
893  return 1;
894 }
895 
896 /** Set relative_z value.
897  *
898  This is the Z coordinate in the cartesian right-handed robot coordinate system.
899 
900  * @param new_relative_z new relative_z value
901  */
902 void
903 ObjectPositionInterface::set_relative_z(const float new_relative_z)
904 {
905  data->relative_z = new_relative_z;
906  data_changed = true;
907 }
908 
909 /** Get relative_xyz_covariance value.
910  *
911  Covariance of relative x/y/z values. This is a 3x3 matrix ordered line by line,
912  first three values represent row, next tree values second row and last three values
913  last row from left to right each.
914 
915  * @return relative_xyz_covariance value
916  */
917 float *
919 {
920  return data->relative_xyz_covariance;
921 }
922 
923 /** Get relative_xyz_covariance value at given index.
924  *
925  Covariance of relative x/y/z values. This is a 3x3 matrix ordered line by line,
926  first three values represent row, next tree values second row and last three values
927  last row from left to right each.
928 
929  * @param index index of value
930  * @return relative_xyz_covariance value
931  * @exception Exception thrown if index is out of bounds
932  */
933 float
935 {
936  if (index > 9) {
937  throw Exception("Index value %u out of bounds (0..9)", index);
938  }
939  return data->relative_xyz_covariance[index];
940 }
941 
942 /** Get maximum length of relative_xyz_covariance value.
943  * @return length of relative_xyz_covariance value, can be length of the array or number of
944  * maximum number of characters for a string
945  */
946 size_t
948 {
949  return 9;
950 }
951 
952 /** Set relative_xyz_covariance value.
953  *
954  Covariance of relative x/y/z values. This is a 3x3 matrix ordered line by line,
955  first three values represent row, next tree values second row and last three values
956  last row from left to right each.
957 
958  * @param new_relative_xyz_covariance new relative_xyz_covariance value
959  */
960 void
961 ObjectPositionInterface::set_relative_xyz_covariance(const float * new_relative_xyz_covariance)
962 {
963  memcpy(data->relative_xyz_covariance, new_relative_xyz_covariance, sizeof(float) * 9);
964  data_changed = true;
965 }
966 
967 /** Set relative_xyz_covariance value at given index.
968  *
969  Covariance of relative x/y/z values. This is a 3x3 matrix ordered line by line,
970  first three values represent row, next tree values second row and last three values
971  last row from left to right each.
972 
973  * @param new_relative_xyz_covariance new relative_xyz_covariance value
974  * @param index index for of the value
975  */
976 void
977 ObjectPositionInterface::set_relative_xyz_covariance(unsigned int index, const float new_relative_xyz_covariance)
978 {
979  if (index > 9) {
980  throw Exception("Index value %u out of bounds (0..9)", index);
981  }
982  data->relative_xyz_covariance[index] = new_relative_xyz_covariance;
983  data_changed = true;
984 }
985 /** Get extent_x value.
986  *
987  Extent of the seen object given in the relative x cartesian coordinate in m.
988 
989  * @return extent_x value
990  */
991 float
993 {
994  return data->extent_x;
995 }
996 
997 /** Get maximum length of extent_x value.
998  * @return length of extent_x value, can be length of the array or number of
999  * maximum number of characters for a string
1000  */
1001 size_t
1003 {
1004  return 1;
1005 }
1006 
1007 /** Set extent_x value.
1008  *
1009  Extent of the seen object given in the relative x cartesian coordinate in m.
1010 
1011  * @param new_extent_x new extent_x value
1012  */
1013 void
1014 ObjectPositionInterface::set_extent_x(const float new_extent_x)
1015 {
1016  data->extent_x = new_extent_x;
1017  data_changed = true;
1018 }
1019 
1020 /** Get extent_y value.
1021  *
1022  Extent of the seen object given in the relative y cartesian coordinate in m.
1023 
1024  * @return extent_y value
1025  */
1026 float
1028 {
1029  return data->extent_y;
1030 }
1031 
1032 /** Get maximum length of extent_y value.
1033  * @return length of extent_y value, can be length of the array or number of
1034  * maximum number of characters for a string
1035  */
1036 size_t
1038 {
1039  return 1;
1040 }
1041 
1042 /** Set extent_y value.
1043  *
1044  Extent of the seen object given in the relative y cartesian coordinate in m.
1045 
1046  * @param new_extent_y new extent_y value
1047  */
1048 void
1049 ObjectPositionInterface::set_extent_y(const float new_extent_y)
1050 {
1051  data->extent_y = new_extent_y;
1052  data_changed = true;
1053 }
1054 
1055 /** Get extent_z value.
1056  *
1057  Extent of the seen object given in the relative z cartesian coordinate in m.
1058 
1059  * @return extent_z value
1060  */
1061 float
1063 {
1064  return data->extent_z;
1065 }
1066 
1067 /** Get maximum length of extent_z value.
1068  * @return length of extent_z value, can be length of the array or number of
1069  * maximum number of characters for a string
1070  */
1071 size_t
1073 {
1074  return 1;
1075 }
1076 
1077 /** Set extent_z value.
1078  *
1079  Extent of the seen object given in the relative z cartesian coordinate in m.
1080 
1081  * @param new_extent_z new extent_z value
1082  */
1083 void
1084 ObjectPositionInterface::set_extent_z(const float new_extent_z)
1085 {
1086  data->extent_z = new_extent_z;
1087  data_changed = true;
1088 }
1089 
1090 /** Get world_x_velocity value.
1091  *
1092  Velocity of object in the world coordinate system in X-direction in meter per second.
1093 
1094  * @return world_x_velocity value
1095  */
1096 float
1098 {
1099  return data->world_x_velocity;
1100 }
1101 
1102 /** Get maximum length of world_x_velocity value.
1103  * @return length of world_x_velocity value, can be length of the array or number of
1104  * maximum number of characters for a string
1105  */
1106 size_t
1108 {
1109  return 1;
1110 }
1111 
1112 /** Set world_x_velocity value.
1113  *
1114  Velocity of object in the world coordinate system in X-direction in meter per second.
1115 
1116  * @param new_world_x_velocity new world_x_velocity value
1117  */
1118 void
1119 ObjectPositionInterface::set_world_x_velocity(const float new_world_x_velocity)
1120 {
1121  data->world_x_velocity = new_world_x_velocity;
1122  data_changed = true;
1123 }
1124 
1125 /** Get world_y_velocity value.
1126  *
1127  Velocity of object in the world coordinate system in Y-direction in meter per second.
1128 
1129  * @return world_y_velocity value
1130  */
1131 float
1133 {
1134  return data->world_y_velocity;
1135 }
1136 
1137 /** Get maximum length of world_y_velocity value.
1138  * @return length of world_y_velocity value, can be length of the array or number of
1139  * maximum number of characters for a string
1140  */
1141 size_t
1143 {
1144  return 1;
1145 }
1146 
1147 /** Set world_y_velocity value.
1148  *
1149  Velocity of object in the world coordinate system in Y-direction in meter per second.
1150 
1151  * @param new_world_y_velocity new world_y_velocity value
1152  */
1153 void
1154 ObjectPositionInterface::set_world_y_velocity(const float new_world_y_velocity)
1155 {
1156  data->world_y_velocity = new_world_y_velocity;
1157  data_changed = true;
1158 }
1159 
1160 /** Get world_z_velocity value.
1161  *
1162  Velocity of object in the world coordinate system in Z-direction in meter per second.
1163 
1164  * @return world_z_velocity value
1165  */
1166 float
1168 {
1169  return data->world_z_velocity;
1170 }
1171 
1172 /** Get maximum length of world_z_velocity value.
1173  * @return length of world_z_velocity value, can be length of the array or number of
1174  * maximum number of characters for a string
1175  */
1176 size_t
1178 {
1179  return 1;
1180 }
1181 
1182 /** Set world_z_velocity value.
1183  *
1184  Velocity of object in the world coordinate system in Z-direction in meter per second.
1185 
1186  * @param new_world_z_velocity new world_z_velocity value
1187  */
1188 void
1189 ObjectPositionInterface::set_world_z_velocity(const float new_world_z_velocity)
1190 {
1191  data->world_z_velocity = new_world_z_velocity;
1192  data_changed = true;
1193 }
1194 
1195 /** Get world_xyz_velocity_covariance value.
1196  *
1197  Covariance of WorldX/WorldY/WorldZ velocity values. This is a 3x3 matrix ordered line
1198  by line, first three values represent row, next tree values second row and last three
1199  values last row from left to right each.
1200 
1201  * @return world_xyz_velocity_covariance value
1202  */
1203 float *
1205 {
1206  return data->world_xyz_velocity_covariance;
1207 }
1208 
1209 /** Get world_xyz_velocity_covariance value at given index.
1210  *
1211  Covariance of WorldX/WorldY/WorldZ velocity values. This is a 3x3 matrix ordered line
1212  by line, first three values represent row, next tree values second row and last three
1213  values last row from left to right each.
1214 
1215  * @param index index of value
1216  * @return world_xyz_velocity_covariance value
1217  * @exception Exception thrown if index is out of bounds
1218  */
1219 float
1221 {
1222  if (index > 9) {
1223  throw Exception("Index value %u out of bounds (0..9)", index);
1224  }
1225  return data->world_xyz_velocity_covariance[index];
1226 }
1227 
1228 /** Get maximum length of world_xyz_velocity_covariance value.
1229  * @return length of world_xyz_velocity_covariance value, can be length of the array or number of
1230  * maximum number of characters for a string
1231  */
1232 size_t
1234 {
1235  return 9;
1236 }
1237 
1238 /** Set world_xyz_velocity_covariance value.
1239  *
1240  Covariance of WorldX/WorldY/WorldZ velocity values. This is a 3x3 matrix ordered line
1241  by line, first three values represent row, next tree values second row and last three
1242  values last row from left to right each.
1243 
1244  * @param new_world_xyz_velocity_covariance new world_xyz_velocity_covariance value
1245  */
1246 void
1247 ObjectPositionInterface::set_world_xyz_velocity_covariance(const float * new_world_xyz_velocity_covariance)
1248 {
1249  memcpy(data->world_xyz_velocity_covariance, new_world_xyz_velocity_covariance, sizeof(float) * 9);
1250  data_changed = true;
1251 }
1252 
1253 /** Set world_xyz_velocity_covariance value at given index.
1254  *
1255  Covariance of WorldX/WorldY/WorldZ velocity values. This is a 3x3 matrix ordered line
1256  by line, first three values represent row, next tree values second row and last three
1257  values last row from left to right each.
1258 
1259  * @param new_world_xyz_velocity_covariance new world_xyz_velocity_covariance value
1260  * @param index index for of the value
1261  */
1262 void
1263 ObjectPositionInterface::set_world_xyz_velocity_covariance(unsigned int index, const float new_world_xyz_velocity_covariance)
1264 {
1265  if (index > 9) {
1266  throw Exception("Index value %u out of bounds (0..9)", index);
1267  }
1268  data->world_xyz_velocity_covariance[index] = new_world_xyz_velocity_covariance;
1269  data_changed = true;
1270 }
1271 /** Get relative_x_velocity value.
1272  *
1273  Velocity of object in the world coordinate system in X-direction in meter per second.
1274 
1275  * @return relative_x_velocity value
1276  */
1277 float
1279 {
1280  return data->relative_x_velocity;
1281 }
1282 
1283 /** Get maximum length of relative_x_velocity value.
1284  * @return length of relative_x_velocity value, can be length of the array or number of
1285  * maximum number of characters for a string
1286  */
1287 size_t
1289 {
1290  return 1;
1291 }
1292 
1293 /** Set relative_x_velocity value.
1294  *
1295  Velocity of object in the world coordinate system in X-direction in meter per second.
1296 
1297  * @param new_relative_x_velocity new relative_x_velocity value
1298  */
1299 void
1300 ObjectPositionInterface::set_relative_x_velocity(const float new_relative_x_velocity)
1301 {
1302  data->relative_x_velocity = new_relative_x_velocity;
1303  data_changed = true;
1304 }
1305 
1306 /** Get relative_y_velocity value.
1307  *
1308  Velocity of object in the world coordinate system in Y-direction in meter per second.
1309 
1310  * @return relative_y_velocity value
1311  */
1312 float
1314 {
1315  return data->relative_y_velocity;
1316 }
1317 
1318 /** Get maximum length of relative_y_velocity value.
1319  * @return length of relative_y_velocity value, can be length of the array or number of
1320  * maximum number of characters for a string
1321  */
1322 size_t
1324 {
1325  return 1;
1326 }
1327 
1328 /** Set relative_y_velocity value.
1329  *
1330  Velocity of object in the world coordinate system in Y-direction in meter per second.
1331 
1332  * @param new_relative_y_velocity new relative_y_velocity value
1333  */
1334 void
1335 ObjectPositionInterface::set_relative_y_velocity(const float new_relative_y_velocity)
1336 {
1337  data->relative_y_velocity = new_relative_y_velocity;
1338  data_changed = true;
1339 }
1340 
1341 /** Get relative_z_velocity value.
1342  *
1343  Velocity of object in the world coordinate system in Z-direction in meter per second.
1344 
1345  * @return relative_z_velocity value
1346  */
1347 float
1349 {
1350  return data->relative_z_velocity;
1351 }
1352 
1353 /** Get maximum length of relative_z_velocity value.
1354  * @return length of relative_z_velocity value, can be length of the array or number of
1355  * maximum number of characters for a string
1356  */
1357 size_t
1359 {
1360  return 1;
1361 }
1362 
1363 /** Set relative_z_velocity value.
1364  *
1365  Velocity of object in the world coordinate system in Z-direction in meter per second.
1366 
1367  * @param new_relative_z_velocity new relative_z_velocity value
1368  */
1369 void
1370 ObjectPositionInterface::set_relative_z_velocity(const float new_relative_z_velocity)
1371 {
1372  data->relative_z_velocity = new_relative_z_velocity;
1373  data_changed = true;
1374 }
1375 
1376 /** Get relative_xyz_velocity_covariance value.
1377  *
1378  Covariance of relative x/y/z velocity values. This is a 3x3 matrix ordered line
1379  by line, first three values represent row, next tree values second row and last three
1380  values last row from left to right each.
1381 
1382  * @return relative_xyz_velocity_covariance value
1383  */
1384 float *
1386 {
1387  return data->relative_xyz_velocity_covariance;
1388 }
1389 
1390 /** Get relative_xyz_velocity_covariance value at given index.
1391  *
1392  Covariance of relative x/y/z velocity values. This is a 3x3 matrix ordered line
1393  by line, first three values represent row, next tree values second row and last three
1394  values last row from left to right each.
1395 
1396  * @param index index of value
1397  * @return relative_xyz_velocity_covariance value
1398  * @exception Exception thrown if index is out of bounds
1399  */
1400 float
1402 {
1403  if (index > 9) {
1404  throw Exception("Index value %u out of bounds (0..9)", index);
1405  }
1406  return data->relative_xyz_velocity_covariance[index];
1407 }
1408 
1409 /** Get maximum length of relative_xyz_velocity_covariance value.
1410  * @return length of relative_xyz_velocity_covariance value, can be length of the array or number of
1411  * maximum number of characters for a string
1412  */
1413 size_t
1415 {
1416  return 9;
1417 }
1418 
1419 /** Set relative_xyz_velocity_covariance value.
1420  *
1421  Covariance of relative x/y/z velocity values. This is a 3x3 matrix ordered line
1422  by line, first three values represent row, next tree values second row and last three
1423  values last row from left to right each.
1424 
1425  * @param new_relative_xyz_velocity_covariance new relative_xyz_velocity_covariance value
1426  */
1427 void
1428 ObjectPositionInterface::set_relative_xyz_velocity_covariance(const float * new_relative_xyz_velocity_covariance)
1429 {
1430  memcpy(data->relative_xyz_velocity_covariance, new_relative_xyz_velocity_covariance, sizeof(float) * 9);
1431  data_changed = true;
1432 }
1433 
1434 /** Set relative_xyz_velocity_covariance value at given index.
1435  *
1436  Covariance of relative x/y/z velocity values. This is a 3x3 matrix ordered line
1437  by line, first three values represent row, next tree values second row and last three
1438  values last row from left to right each.
1439 
1440  * @param new_relative_xyz_velocity_covariance new relative_xyz_velocity_covariance value
1441  * @param index index for of the value
1442  */
1443 void
1444 ObjectPositionInterface::set_relative_xyz_velocity_covariance(unsigned int index, const float new_relative_xyz_velocity_covariance)
1445 {
1446  if (index > 9) {
1447  throw Exception("Index value %u out of bounds (0..9)", index);
1448  }
1449  data->relative_xyz_velocity_covariance[index] = new_relative_xyz_velocity_covariance;
1450  data_changed = true;
1451 }
1452 /* =========== message create =========== */
1453 Message *
1455 {
1456  throw UnknownTypeException("The given type '%s' does not match any known "
1457  "message type for this interface type.", type);
1458 }
1459 
1460 
1461 /** Copy values from other interface.
1462  * @param other other interface to copy values from
1463  */
1464 void
1466 {
1467  const ObjectPositionInterface *oi = dynamic_cast<const ObjectPositionInterface *>(other);
1468  if (oi == NULL) {
1469  throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)",
1470  type(), other->type());
1471  }
1472  memcpy(data, oi->data, sizeof(ObjectPositionInterface_data_t));
1473 }
1474 
1475 const char *
1476 ObjectPositionInterface::enum_tostring(const char *enumtype, int val) const
1477 {
1478  throw UnknownTypeException("Unknown enum type %s", enumtype);
1479 }
1480 
1481 /* =========== messages =========== */
1482 /** Check if message is valid and can be enqueued.
1483  * @param message Message to check
1484  * @return true if the message is valid, false otherwise.
1485  */
1486 bool
1488 {
1489  return false;
1490 }
1491 
1492 /// @cond INTERNALS
1493 EXPORT_INTERFACE(ObjectPositionInterface)
1494 /// @endcond
1495 
1496 
1497 } // end namespace fawkes
void set_world_y_velocity(const float new_world_y_velocity)
Set world_y_velocity value.
void set_world_z_velocity(const float new_world_z_velocity)
Set world_z_velocity value.
static const uint32_t FLAG_HAS_COVARIANCES
FLAG_HAS_COVARIANCES constant.
float distance() const
Get distance value.
void set_world_x_velocity(const float new_world_x_velocity)
Set world_x_velocity value.
void set_relative_y_velocity(const float new_relative_y_velocity)
Set relative_y_velocity value.
size_t maxlenof_world_z() const
Get maximum length of world_z value.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:44
bool is_valid() const
Get valid value.
size_t maxlenof_relative_x() const
Get maximum length of relative_x value.
size_t maxlenof_world_z_velocity() const
Get maximum length of world_z_velocity value.
size_t maxlenof_valid() const
Get maximum length of valid value.
float extent_x() const
Get extent_x value.
void set_valid(const bool new_valid)
Set valid value.
ObjectPositionInterface Fawkes BlackBoard Interface.
size_t maxlenof_dbs_covariance() const
Get maximum length of dbs_covariance value.
void set_hash(unsigned char *ihash)
Set hash.
Definition: interface.cpp:314
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
static const uint32_t FLAG_HAS_EULER_ANGLES
FLAG_HAS_EULER_ANGLES constant.
static const uint32_t FLAG_HAS_VOLUME_EXTENT
FLAG_HAS_VOLUME_EXTENT constant.
Fawkes library namespace.
float relative_y_velocity() const
Get relative_y_velocity value.
void set_world_z(const float new_world_z)
Set world_z value.
void set_extent_y(const float new_extent_y)
Set extent_y value.
unsigned int data_size
Minimal data size to hold data storage.
Definition: interface.h:221
void set_flags(const uint32_t new_flags)
Set flags value.
size_t maxlenof_bearing() const
Get maximum length of bearing value.
size_t maxlenof_world_xyz_velocity_covariance() const
Get maximum length of world_xyz_velocity_covariance value.
static const uint32_t FLAG_IS_FIXED_OBJECT
FLAG_IS_FIXED_OBJECT constant.
void set_distance(const float new_distance)
Set distance value.
void set_roll(const float new_roll)
Set roll value.
void set_relative_y(const float new_relative_y)
Set relative_y value.
static const uint32_t FLAG_HAS_WORLD
FLAG_HAS_WORLD constant.
float * dbs_covariance() const
Get dbs_covariance value.
size_t maxlenof_object_type() const
Get maximum length of object_type value.
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:79
size_t maxlenof_extent_y() const
Get maximum length of extent_y value.
size_t maxlenof_distance() const
Get maximum length of distance value.
static const uint32_t FLAG_HAS_Z_AS_ORI
FLAG_HAS_Z_AS_ORI constant.
static const uint32_t TYPE_SELF
TYPE_SELF constant.
float world_y() const
Get world_y value.
float relative_x_velocity() const
Get relative_x_velocity value.
uint32_t object_type() const
Get object_type value.
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.
Definition: interface.cpp:335
float world_z_velocity() const
Get world_z_velocity value.
float * relative_xyz_covariance() const
Get relative_xyz_covariance value.
int32_t visibility_history() const
Get visibility_history value.
size_t maxlenof_roll() const
Get maximum length of roll value.
float extent_z() const
Get extent_z value.
bool data_changed
Indicator if data has changed.
Definition: interface.h:222
bool is_visible() const
Get visible value.
size_t maxlenof_extent_x() const
Get maximum length of extent_x value.
size_t maxlenof_world_y() const
Get maximum length of world_y value.
static const uint32_t FLAG_HAS_RELATIVE_POLAR
FLAG_HAS_RELATIVE_POLAR constant.
static const uint32_t FLAG_HAS_CIRCULAR_EXTENT
FLAG_HAS_CIRCULAR_EXTENT constant.
const char * type() const
Get type of interface.
Definition: interface.cpp:651
void * data_ptr
Pointer to local memory storage.
Definition: interface.h:220
void set_object_type(const uint32_t new_object_type)
Set object_type value.
static const uint32_t FLAG_NONE
FLAG_NONE constant.
static const uint32_t TYPE_GOAL_BLUE
TYPE_GOAL_BLUE constant.
void set_visibility_history(const int32_t new_visibility_history)
Set visibility_history value.
Base class for exceptions in Fawkes.
Definition: exception.h:36
void set_relative_x_velocity(const float new_relative_x_velocity)
Set relative_x_velocity value.
size_t maxlenof_extent_z() const
Get maximum length of extent_z value.
size_t maxlenof_slope() const
Get maximum length of slope value.
float world_x_velocity() const
Get world_x_velocity value.
float * world_xyz_velocity_covariance() const
Get world_xyz_velocity_covariance value.
size_t maxlenof_relative_y() const
Get maximum length of relative_y value.
void set_relative_z_velocity(const float new_relative_z_velocity)
Set relative_z_velocity value.
static const uint32_t FLAG_HAS_EXTENT
FLAG_HAS_EXTENT constant.
void set_pitch(const float new_pitch)
Set pitch value.
void set_extent_z(const float new_extent_z)
Set extent_z value.
void set_dbs_covariance(unsigned int index, const float new_dbs_covariance)
Set dbs_covariance value at given index.
void set_extent_x(const float new_extent_x)
Set extent_x value.
size_t maxlenof_world_x() const
Get maximum length of world_x value.
size_t maxlenof_world_xyz_covariance() const
Get maximum length of world_xyz_covariance value.
size_t maxlenof_relative_x_velocity() const
Get maximum length of relative_x_velocity value.
float extent_y() const
Get extent_y value.
size_t maxlenof_pitch() const
Get maximum length of pitch value.
size_t maxlenof_relative_z() const
Get maximum length of relative_z value.
uint32_t flags() const
Get flags value.
void set_world_xyz_velocity_covariance(unsigned int index, const float new_world_xyz_velocity_covariance)
Set world_xyz_velocity_covariance value at given index.
float world_z() const
Get world_z value.
void set_visible(const bool new_visible)
Set visible value.
float * world_xyz_covariance() const
Get world_xyz_covariance value.
void set_bearing(const float new_bearing)
Set bearing value.
float field
Definition: types.h:45
float bearing() const
Get bearing value.
static const uint32_t FLAG_HAS_RELATIVE_CARTESIAN
FLAG_HAS_RELATIVE_CARTESIAN constant.
void set_slope(const float new_slope)
Set slope value.
32 bit integer field
Definition: types.h:41
void set_world_x(const float new_world_x)
Set world_x value.
float world_y_velocity() const
Get world_y_velocity value.
void set_relative_x(const float new_relative_x)
Set relative_x value.
void set_relative_xyz_velocity_covariance(unsigned int index, const float new_relative_xyz_velocity_covariance)
Set relative_xyz_velocity_covariance value at given index.
size_t maxlenof_relative_z_velocity() const
Get maximum length of relative_z_velocity value.
static const uint32_t TYPE_OTHER
TYPE_OTHER constant.
static const uint32_t TYPE_TEAMMEMBER
TYPE_TEAMMEMBER constant.
float roll() const
Get roll value.
size_t maxlenof_relative_xyz_velocity_covariance() const
Get maximum length of relative_xyz_velocity_covariance value.
static const uint32_t TYPE_BALL
TYPE_BALL constant.
static const uint32_t FLAG_HAS_WORLD_VELOCITY
FLAG_HAS_WORLD_VELOCITY constant.
size_t maxlenof_world_x_velocity() const
Get maximum length of world_x_velocity value.
void set_relative_xyz_covariance(unsigned int index, const float new_relative_xyz_covariance)
Set relative_xyz_covariance value at given index.
size_t maxlenof_flags() const
Get maximum length of flags value.
float pitch() const
Get pitch value.
static const uint32_t TYPE_OPPONENT
TYPE_OPPONENT constant.
float world_x() const
Get world_x value.
size_t maxlenof_world_y_velocity() const
Get maximum length of world_y_velocity value.
size_t maxlenof_visibility_history() const
Get maximum length of visibility_history value.
void set_world_xyz_covariance(unsigned int index, const float new_world_xyz_covariance)
Set world_xyz_covariance value at given index.
float relative_z() const
Get relative_z value.
interface_data_ts_t * data_ts
Pointer to data casted to timestamp struct.
Definition: interface.h:224
static const uint32_t TYPE_GOAL_YELLOW
TYPE_GOAL_YELLOW constant.
boolean field
Definition: types.h:36
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
float slope() const
Get slope value.
size_t maxlenof_relative_xyz_covariance() const
Get maximum length of relative_xyz_covariance value.
size_t maxlenof_yaw() const
Get maximum length of yaw value.
virtual Message * create_message(const char *type) const
Create message based on type name.
float relative_z_velocity() const
Get relative_z_velocity value.
size_t maxlenof_visible() const
Get maximum length of visible value.
void set_yaw(const float new_yaw)
Set yaw value.
32 bit unsigned integer field
Definition: types.h:42
virtual void copy_values(const Interface *other)
Copy values from other interface.
float * relative_xyz_velocity_covariance() const
Get relative_xyz_velocity_covariance value.
void set_relative_z(const float new_relative_z)
Set relative_z value.
size_t maxlenof_relative_y_velocity() const
Get maximum length of relative_y_velocity value.
float relative_y() const
Get relative_y value.
static const uint32_t TYPE_LINE
TYPE_LINE constant.
float relative_x() const
Get relative_x value.
void set_world_y(const float new_world_y)
Set world_y value.