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_INT32, "visibility_history", 1, &data->visibility_history);
101  add_fieldinfo(IFT_FLOAT, "roll", 1, &data->roll);
102  add_fieldinfo(IFT_FLOAT, "pitch", 1, &data->pitch);
103  add_fieldinfo(IFT_FLOAT, "yaw", 1, &data->yaw);
104  add_fieldinfo(IFT_FLOAT, "distance", 1, &data->distance);
105  add_fieldinfo(IFT_FLOAT, "bearing", 1, &data->bearing);
106  add_fieldinfo(IFT_FLOAT, "slope", 1, &data->slope);
107  add_fieldinfo(IFT_FLOAT, "dbs_covariance", 9, &data->dbs_covariance);
108  add_fieldinfo(IFT_FLOAT, "world_x", 1, &data->world_x);
109  add_fieldinfo(IFT_FLOAT, "world_y", 1, &data->world_y);
110  add_fieldinfo(IFT_FLOAT, "world_z", 1, &data->world_z);
111  add_fieldinfo(IFT_FLOAT, "world_xyz_covariance", 9, &data->world_xyz_covariance);
112  add_fieldinfo(IFT_FLOAT, "relative_x", 1, &data->relative_x);
113  add_fieldinfo(IFT_FLOAT, "relative_y", 1, &data->relative_y);
114  add_fieldinfo(IFT_FLOAT, "relative_z", 1, &data->relative_z);
115  add_fieldinfo(IFT_FLOAT, "relative_xyz_covariance", 9, &data->relative_xyz_covariance);
116  add_fieldinfo(IFT_FLOAT, "extent_x", 1, &data->extent_x);
117  add_fieldinfo(IFT_FLOAT, "extent_y", 1, &data->extent_y);
118  add_fieldinfo(IFT_FLOAT, "extent_z", 1, &data->extent_z);
119  add_fieldinfo(IFT_FLOAT, "world_x_velocity", 1, &data->world_x_velocity);
120  add_fieldinfo(IFT_FLOAT, "world_y_velocity", 1, &data->world_y_velocity);
121  add_fieldinfo(IFT_FLOAT, "world_z_velocity", 1, &data->world_z_velocity);
122  add_fieldinfo(IFT_FLOAT, "world_xyz_velocity_covariance", 9, &data->world_xyz_velocity_covariance);
123  add_fieldinfo(IFT_FLOAT, "relative_x_velocity", 1, &data->relative_x_velocity);
124  add_fieldinfo(IFT_FLOAT, "relative_y_velocity", 1, &data->relative_y_velocity);
125  add_fieldinfo(IFT_FLOAT, "relative_z_velocity", 1, &data->relative_z_velocity);
126  add_fieldinfo(IFT_FLOAT, "relative_xyz_velocity_covariance", 9, &data->relative_xyz_velocity_covariance);
127  unsigned char tmp_hash[] = {0x65, 0xac, 0x82, 0xde, 0xcd, 0x8b, 0x12, 0x81, 0x7b, 0xe6, 0x61, 0xdd, 0x30, 0x55, 0xd, 0x38};
128  set_hash(tmp_hash);
129 }
130 
131 /** Destructor */
132 ObjectPositionInterface::~ObjectPositionInterface()
133 {
134  free(data_ptr);
135 }
136 /* Methods */
137 /** Get object_type value.
138  *
139  Object type, use constants to define
140 
141  * @return object_type value
142  */
143 uint32_t
145 {
146  return data->object_type;
147 }
148 
149 /** Get maximum length of object_type value.
150  * @return length of object_type value, can be length of the array or number of
151  * maximum number of characters for a string
152  */
153 size_t
155 {
156  return 1;
157 }
158 
159 /** Set object_type value.
160  *
161  Object type, use constants to define
162 
163  * @param new_object_type new object_type value
164  */
165 void
166 ObjectPositionInterface::set_object_type(const uint32_t new_object_type)
167 {
168  data->object_type = new_object_type;
169  data_changed = true;
170 }
171 
172 /** Get flags value.
173  *
174  Bit-wise concatenated fields of FLAG_* constants. Denotes features that the
175  writer of this interfaces provides. Use a bit-wise OR to concatenate multiple
176  flags, use a bit-wise AND to check if a flag has been set.
177 
178  * @return flags value
179  */
180 uint32_t
182 {
183  return data->flags;
184 }
185 
186 /** Get maximum length of flags value.
187  * @return length of flags value, can be length of the array or number of
188  * maximum number of characters for a string
189  */
190 size_t
192 {
193  return 1;
194 }
195 
196 /** Set flags value.
197  *
198  Bit-wise concatenated fields of FLAG_* constants. Denotes features that the
199  writer of this interfaces provides. Use a bit-wise OR to concatenate multiple
200  flags, use a bit-wise AND to check if a flag has been set.
201 
202  * @param new_flags new flags value
203  */
204 void
205 ObjectPositionInterface::set_flags(const uint32_t new_flags)
206 {
207  data->flags = new_flags;
208  data_changed = true;
209 }
210 
211 /** Get visible value.
212  * True, if object is visible.
213  * @return visible value
214  */
215 bool
217 {
218  return data->visible;
219 }
220 
221 /** Get maximum length of visible value.
222  * @return length of visible value, can be length of the array or number of
223  * maximum number of characters for a string
224  */
225 size_t
227 {
228  return 1;
229 }
230 
231 /** Set visible value.
232  * True, if object is visible.
233  * @param new_visible new visible value
234  */
235 void
237 {
238  data->visible = new_visible;
239  data_changed = true;
240 }
241 
242 /** Get visibility_history value.
243  *
244  The visibilitiy history indicates the number of consecutive positive or negative
245  sightings. If the history is negative, there have been as many negative sightings
246  (object not visible) as the absolute value of the history. A positive value denotes
247  as many positive sightings. 0 shall only be used during the initialisation of the
248  interface or if the visibility history is not filled.
249 
250  * @return visibility_history value
251  */
252 int32_t
254 {
255  return data->visibility_history;
256 }
257 
258 /** Get maximum length of visibility_history value.
259  * @return length of visibility_history value, can be length of the array or number of
260  * maximum number of characters for a string
261  */
262 size_t
264 {
265  return 1;
266 }
267 
268 /** Set visibility_history value.
269  *
270  The visibilitiy history indicates the number of consecutive positive or negative
271  sightings. If the history is negative, there have been as many negative sightings
272  (object not visible) as the absolute value of the history. A positive value denotes
273  as many positive sightings. 0 shall only be used during the initialisation of the
274  interface or if the visibility history is not filled.
275 
276  * @param new_visibility_history new visibility_history value
277  */
278 void
279 ObjectPositionInterface::set_visibility_history(const int32_t new_visibility_history)
280 {
281  data->visibility_history = new_visibility_history;
282  data_changed = true;
283 }
284 
285 /** Get roll value.
286  *
287  Roll value for the orientation of the object in space.
288 
289  * @return roll value
290  */
291 float
293 {
294  return data->roll;
295 }
296 
297 /** Get maximum length of roll value.
298  * @return length of roll value, can be length of the array or number of
299  * maximum number of characters for a string
300  */
301 size_t
303 {
304  return 1;
305 }
306 
307 /** Set roll value.
308  *
309  Roll value for the orientation of the object in space.
310 
311  * @param new_roll new roll value
312  */
313 void
315 {
316  data->roll = new_roll;
317  data_changed = true;
318 }
319 
320 /** Get pitch value.
321  *
322  Pitch value for the orientation of the object in space.
323 
324  * @return pitch value
325  */
326 float
328 {
329  return data->pitch;
330 }
331 
332 /** Get maximum length of pitch value.
333  * @return length of pitch value, can be length of the array or number of
334  * maximum number of characters for a string
335  */
336 size_t
338 {
339  return 1;
340 }
341 
342 /** Set pitch value.
343  *
344  Pitch value for the orientation of the object in space.
345 
346  * @param new_pitch new pitch value
347  */
348 void
350 {
351  data->pitch = new_pitch;
352  data_changed = true;
353 }
354 
355 /** Get yaw value.
356  *
357  Yaw value for the orientation of the object in space.
358 
359  * @return yaw value
360  */
361 float
363 {
364  return data->yaw;
365 }
366 
367 /** Get maximum length of yaw value.
368  * @return length of yaw value, can be length of the array or number of
369  * maximum number of characters for a string
370  */
371 size_t
373 {
374  return 1;
375 }
376 
377 /** Set yaw value.
378  *
379  Yaw value for the orientation of the object in space.
380 
381  * @param new_yaw new yaw value
382  */
383 void
385 {
386  data->yaw = new_yaw;
387  data_changed = true;
388 }
389 
390 /** Get distance value.
391  *
392  Distance from the robot to the object on the ground plane. The distance is given
393  in meters.
394 
395  * @return distance value
396  */
397 float
399 {
400  return data->distance;
401 }
402 
403 /** Get maximum length of distance value.
404  * @return length of distance value, can be length of the array or number of
405  * maximum number of characters for a string
406  */
407 size_t
409 {
410  return 1;
411 }
412 
413 /** Set distance value.
414  *
415  Distance from the robot to the object on the ground plane. The distance is given
416  in meters.
417 
418  * @param new_distance new distance value
419  */
420 void
421 ObjectPositionInterface::set_distance(const float new_distance)
422 {
423  data->distance = new_distance;
424  data_changed = true;
425 }
426 
427 /** Get bearing value.
428  *
429  Angle between the robot's forward direction and the object on the ground plane.
430  This angle is in a local 3D coordinate system to the robot and given in radians.
431 
432  * @return bearing value
433  */
434 float
436 {
437  return data->bearing;
438 }
439 
440 /** Get maximum length of bearing value.
441  * @return length of bearing value, can be length of the array or number of
442  * maximum number of characters for a string
443  */
444 size_t
446 {
447  return 1;
448 }
449 
450 /** Set bearing value.
451  *
452  Angle between the robot's forward direction and the object on the ground plane.
453  This angle is in a local 3D coordinate system to the robot and given in radians.
454 
455  * @param new_bearing new bearing value
456  */
457 void
458 ObjectPositionInterface::set_bearing(const float new_bearing)
459 {
460  data->bearing = new_bearing;
461  data_changed = true;
462 }
463 
464 /** Get slope value.
465  *
466  Angle between the robot's center position on the ground plane and the middle point
467  of the object (e.g. this denotes the height of the object combined with the distance.
468  The angle is given in radians.
469 
470  * @return slope value
471  */
472 float
474 {
475  return data->slope;
476 }
477 
478 /** Get maximum length of slope value.
479  * @return length of slope value, can be length of the array or number of
480  * maximum number of characters for a string
481  */
482 size_t
484 {
485  return 1;
486 }
487 
488 /** Set slope value.
489  *
490  Angle between the robot's center position on the ground plane and the middle point
491  of the object (e.g. this denotes the height of the object combined with the distance.
492  The angle is given in radians.
493 
494  * @param new_slope new slope value
495  */
496 void
498 {
499  data->slope = new_slope;
500  data_changed = true;
501 }
502 
503 /** Get dbs_covariance value.
504  *
505  Covariance of Distance/Yaw/Pitch values. This is a 3x3 matrix ordered line by line,
506  first three values represent row, next tree values second row and last three values
507  last row from left to right each.
508 
509  * @return dbs_covariance value
510  */
511 float *
513 {
514  return data->dbs_covariance;
515 }
516 
517 /** Get dbs_covariance value at given index.
518  *
519  Covariance of Distance/Yaw/Pitch values. This is a 3x3 matrix ordered line by line,
520  first three values represent row, next tree values second row and last three values
521  last row from left to right each.
522 
523  * @param index index of value
524  * @return dbs_covariance value
525  * @exception Exception thrown if index is out of bounds
526  */
527 float
529 {
530  if (index > 9) {
531  throw Exception("Index value %u out of bounds (0..9)", index);
532  }
533  return data->dbs_covariance[index];
534 }
535 
536 /** Get maximum length of dbs_covariance value.
537  * @return length of dbs_covariance value, can be length of the array or number of
538  * maximum number of characters for a string
539  */
540 size_t
542 {
543  return 9;
544 }
545 
546 /** Set dbs_covariance value.
547  *
548  Covariance of Distance/Yaw/Pitch values. This is a 3x3 matrix ordered line by line,
549  first three values represent row, next tree values second row and last three values
550  last row from left to right each.
551 
552  * @param new_dbs_covariance new dbs_covariance value
553  */
554 void
555 ObjectPositionInterface::set_dbs_covariance(const float * new_dbs_covariance)
556 {
557  memcpy(data->dbs_covariance, new_dbs_covariance, sizeof(float) * 9);
558  data_changed = true;
559 }
560 
561 /** Set dbs_covariance value at given index.
562  *
563  Covariance of Distance/Yaw/Pitch values. This is a 3x3 matrix ordered line by line,
564  first three values represent row, next tree values second row and last three values
565  last row from left to right each.
566 
567  * @param new_dbs_covariance new dbs_covariance value
568  * @param index index for of the value
569  */
570 void
571 ObjectPositionInterface::set_dbs_covariance(unsigned int index, const float new_dbs_covariance)
572 {
573  if (index > 9) {
574  throw Exception("Index value %u out of bounds (0..9)", index);
575  }
576  data->dbs_covariance[index] = new_dbs_covariance;
577  data_changed = true;
578 }
579 /** Get world_x value.
580  *
581  This is the X coordinate in the cartesian right-handed world coordinate system.
582  This coordinate system has its origin in the center of the field, Y pointing to
583  the opponent's goal and X pointing to the right.
584 
585  * @return world_x value
586  */
587 float
589 {
590  return data->world_x;
591 }
592 
593 /** Get maximum length of world_x value.
594  * @return length of world_x value, can be length of the array or number of
595  * maximum number of characters for a string
596  */
597 size_t
599 {
600  return 1;
601 }
602 
603 /** Set world_x value.
604  *
605  This is the X coordinate in the cartesian right-handed world coordinate system.
606  This coordinate system has its origin in the center of the field, Y pointing to
607  the opponent's goal and X pointing to the right.
608 
609  * @param new_world_x new world_x value
610  */
611 void
612 ObjectPositionInterface::set_world_x(const float new_world_x)
613 {
614  data->world_x = new_world_x;
615  data_changed = true;
616 }
617 
618 /** Get world_y value.
619  *
620  This is the Y coordinate in the cartesian right-handed world coordinate system.
621  This coordinate system has its origin in the center of the field, Y pointing to
622  the opponent's goal and X pointing to the right and Z pointing downwards.
623 
624  * @return world_y value
625  */
626 float
628 {
629  return data->world_y;
630 }
631 
632 /** Get maximum length of world_y value.
633  * @return length of world_y value, can be length of the array or number of
634  * maximum number of characters for a string
635  */
636 size_t
638 {
639  return 1;
640 }
641 
642 /** Set world_y value.
643  *
644  This is the Y coordinate in the cartesian right-handed world coordinate system.
645  This coordinate system has its origin in the center of the field, Y pointing to
646  the opponent's goal and X pointing to the right and Z pointing downwards.
647 
648  * @param new_world_y new world_y value
649  */
650 void
651 ObjectPositionInterface::set_world_y(const float new_world_y)
652 {
653  data->world_y = new_world_y;
654  data_changed = true;
655 }
656 
657 /** Get world_z value.
658  *
659  This is the Z coordinate in the cartesian right-handed world coordinate system.
660  This coordinate system has its origin in the center of the field, Y pointing to
661  the opponent's goal and X pointing to the right.
662 
663  * @return world_z value
664  */
665 float
667 {
668  return data->world_z;
669 }
670 
671 /** Get maximum length of world_z value.
672  * @return length of world_z value, can be length of the array or number of
673  * maximum number of characters for a string
674  */
675 size_t
677 {
678  return 1;
679 }
680 
681 /** Set world_z value.
682  *
683  This is the Z coordinate in the cartesian right-handed world coordinate system.
684  This coordinate system has its origin in the center of the field, Y pointing to
685  the opponent's goal and X pointing to the right.
686 
687  * @param new_world_z new world_z value
688  */
689 void
690 ObjectPositionInterface::set_world_z(const float new_world_z)
691 {
692  data->world_z = new_world_z;
693  data_changed = true;
694 }
695 
696 /** Get world_xyz_covariance value.
697  *
698  Covariance of WorldX/WorldY/WorldZ values. This is a 3x3 matrix ordered line by line,
699  first three values represent row, next tree values second row and last three values
700  last row from left to right each.
701 
702  * @return world_xyz_covariance value
703  */
704 float *
706 {
707  return data->world_xyz_covariance;
708 }
709 
710 /** Get world_xyz_covariance value at given index.
711  *
712  Covariance of WorldX/WorldY/WorldZ values. This is a 3x3 matrix ordered line by line,
713  first three values represent row, next tree values second row and last three values
714  last row from left to right each.
715 
716  * @param index index of value
717  * @return world_xyz_covariance value
718  * @exception Exception thrown if index is out of bounds
719  */
720 float
722 {
723  if (index > 9) {
724  throw Exception("Index value %u out of bounds (0..9)", index);
725  }
726  return data->world_xyz_covariance[index];
727 }
728 
729 /** Get maximum length of world_xyz_covariance value.
730  * @return length of world_xyz_covariance value, can be length of the array or number of
731  * maximum number of characters for a string
732  */
733 size_t
735 {
736  return 9;
737 }
738 
739 /** Set world_xyz_covariance value.
740  *
741  Covariance of WorldX/WorldY/WorldZ values. This is a 3x3 matrix ordered line by line,
742  first three values represent row, next tree values second row and last three values
743  last row from left to right each.
744 
745  * @param new_world_xyz_covariance new world_xyz_covariance value
746  */
747 void
748 ObjectPositionInterface::set_world_xyz_covariance(const float * new_world_xyz_covariance)
749 {
750  memcpy(data->world_xyz_covariance, new_world_xyz_covariance, sizeof(float) * 9);
751  data_changed = true;
752 }
753 
754 /** Set world_xyz_covariance value at given index.
755  *
756  Covariance of WorldX/WorldY/WorldZ values. This is a 3x3 matrix ordered line by line,
757  first three values represent row, next tree values second row and last three values
758  last row from left to right each.
759 
760  * @param new_world_xyz_covariance new world_xyz_covariance value
761  * @param index index for of the value
762  */
763 void
764 ObjectPositionInterface::set_world_xyz_covariance(unsigned int index, const float new_world_xyz_covariance)
765 {
766  if (index > 9) {
767  throw Exception("Index value %u out of bounds (0..9)", index);
768  }
769  data->world_xyz_covariance[index] = new_world_xyz_covariance;
770  data_changed = true;
771 }
772 /** Get relative_x value.
773  *
774  This is the X coordinate in the cartesian right-handed robot coordinate system.
775 
776  * @return relative_x value
777  */
778 float
780 {
781  return data->relative_x;
782 }
783 
784 /** Get maximum length of relative_x value.
785  * @return length of relative_x value, can be length of the array or number of
786  * maximum number of characters for a string
787  */
788 size_t
790 {
791  return 1;
792 }
793 
794 /** Set relative_x value.
795  *
796  This is the X coordinate in the cartesian right-handed robot coordinate system.
797 
798  * @param new_relative_x new relative_x value
799  */
800 void
801 ObjectPositionInterface::set_relative_x(const float new_relative_x)
802 {
803  data->relative_x = new_relative_x;
804  data_changed = true;
805 }
806 
807 /** Get relative_y value.
808  *
809  This is the Y coordinate in the cartesian right-handed robot coordinate system.
810 
811  * @return relative_y value
812  */
813 float
815 {
816  return data->relative_y;
817 }
818 
819 /** Get maximum length of relative_y value.
820  * @return length of relative_y value, can be length of the array or number of
821  * maximum number of characters for a string
822  */
823 size_t
825 {
826  return 1;
827 }
828 
829 /** Set relative_y value.
830  *
831  This is the Y coordinate in the cartesian right-handed robot coordinate system.
832 
833  * @param new_relative_y new relative_y value
834  */
835 void
836 ObjectPositionInterface::set_relative_y(const float new_relative_y)
837 {
838  data->relative_y = new_relative_y;
839  data_changed = true;
840 }
841 
842 /** Get relative_z value.
843  *
844  This is the Z coordinate in the cartesian right-handed robot coordinate system.
845 
846  * @return relative_z value
847  */
848 float
850 {
851  return data->relative_z;
852 }
853 
854 /** Get maximum length of relative_z value.
855  * @return length of relative_z value, can be length of the array or number of
856  * maximum number of characters for a string
857  */
858 size_t
860 {
861  return 1;
862 }
863 
864 /** Set relative_z value.
865  *
866  This is the Z coordinate in the cartesian right-handed robot coordinate system.
867 
868  * @param new_relative_z new relative_z value
869  */
870 void
871 ObjectPositionInterface::set_relative_z(const float new_relative_z)
872 {
873  data->relative_z = new_relative_z;
874  data_changed = true;
875 }
876 
877 /** Get relative_xyz_covariance value.
878  *
879  Covariance of relative x/y/z values. This is a 3x3 matrix ordered line by line,
880  first three values represent row, next tree values second row and last three values
881  last row from left to right each.
882 
883  * @return relative_xyz_covariance value
884  */
885 float *
887 {
888  return data->relative_xyz_covariance;
889 }
890 
891 /** Get relative_xyz_covariance value at given index.
892  *
893  Covariance of relative x/y/z values. This is a 3x3 matrix ordered line by line,
894  first three values represent row, next tree values second row and last three values
895  last row from left to right each.
896 
897  * @param index index of value
898  * @return relative_xyz_covariance value
899  * @exception Exception thrown if index is out of bounds
900  */
901 float
903 {
904  if (index > 9) {
905  throw Exception("Index value %u out of bounds (0..9)", index);
906  }
907  return data->relative_xyz_covariance[index];
908 }
909 
910 /** Get maximum length of relative_xyz_covariance value.
911  * @return length of relative_xyz_covariance value, can be length of the array or number of
912  * maximum number of characters for a string
913  */
914 size_t
916 {
917  return 9;
918 }
919 
920 /** Set relative_xyz_covariance value.
921  *
922  Covariance of relative x/y/z values. This is a 3x3 matrix ordered line by line,
923  first three values represent row, next tree values second row and last three values
924  last row from left to right each.
925 
926  * @param new_relative_xyz_covariance new relative_xyz_covariance value
927  */
928 void
929 ObjectPositionInterface::set_relative_xyz_covariance(const float * new_relative_xyz_covariance)
930 {
931  memcpy(data->relative_xyz_covariance, new_relative_xyz_covariance, sizeof(float) * 9);
932  data_changed = true;
933 }
934 
935 /** Set relative_xyz_covariance value at given index.
936  *
937  Covariance of relative x/y/z values. This is a 3x3 matrix ordered line by line,
938  first three values represent row, next tree values second row and last three values
939  last row from left to right each.
940 
941  * @param new_relative_xyz_covariance new relative_xyz_covariance value
942  * @param index index for of the value
943  */
944 void
945 ObjectPositionInterface::set_relative_xyz_covariance(unsigned int index, const float new_relative_xyz_covariance)
946 {
947  if (index > 9) {
948  throw Exception("Index value %u out of bounds (0..9)", index);
949  }
950  data->relative_xyz_covariance[index] = new_relative_xyz_covariance;
951  data_changed = true;
952 }
953 /** Get extent_x value.
954  *
955  Extent of the seen object given in the relative x cartesian coordinate in m.
956 
957  * @return extent_x value
958  */
959 float
961 {
962  return data->extent_x;
963 }
964 
965 /** Get maximum length of extent_x value.
966  * @return length of extent_x value, can be length of the array or number of
967  * maximum number of characters for a string
968  */
969 size_t
971 {
972  return 1;
973 }
974 
975 /** Set extent_x value.
976  *
977  Extent of the seen object given in the relative x cartesian coordinate in m.
978 
979  * @param new_extent_x new extent_x value
980  */
981 void
982 ObjectPositionInterface::set_extent_x(const float new_extent_x)
983 {
984  data->extent_x = new_extent_x;
985  data_changed = true;
986 }
987 
988 /** Get extent_y value.
989  *
990  Extent of the seen object given in the relative y cartesian coordinate in m.
991 
992  * @return extent_y value
993  */
994 float
996 {
997  return data->extent_y;
998 }
999 
1000 /** Get maximum length of extent_y value.
1001  * @return length of extent_y value, can be length of the array or number of
1002  * maximum number of characters for a string
1003  */
1004 size_t
1006 {
1007  return 1;
1008 }
1009 
1010 /** Set extent_y value.
1011  *
1012  Extent of the seen object given in the relative y cartesian coordinate in m.
1013 
1014  * @param new_extent_y new extent_y value
1015  */
1016 void
1017 ObjectPositionInterface::set_extent_y(const float new_extent_y)
1018 {
1019  data->extent_y = new_extent_y;
1020  data_changed = true;
1021 }
1022 
1023 /** Get extent_z value.
1024  *
1025  Extent of the seen object given in the relative z cartesian coordinate in m.
1026 
1027  * @return extent_z value
1028  */
1029 float
1031 {
1032  return data->extent_z;
1033 }
1034 
1035 /** Get maximum length of extent_z value.
1036  * @return length of extent_z value, can be length of the array or number of
1037  * maximum number of characters for a string
1038  */
1039 size_t
1041 {
1042  return 1;
1043 }
1044 
1045 /** Set extent_z value.
1046  *
1047  Extent of the seen object given in the relative z cartesian coordinate in m.
1048 
1049  * @param new_extent_z new extent_z value
1050  */
1051 void
1052 ObjectPositionInterface::set_extent_z(const float new_extent_z)
1053 {
1054  data->extent_z = new_extent_z;
1055  data_changed = true;
1056 }
1057 
1058 /** Get world_x_velocity value.
1059  *
1060  Velocity of object in the world coordinate system in X-direction in meter per second.
1061 
1062  * @return world_x_velocity value
1063  */
1064 float
1066 {
1067  return data->world_x_velocity;
1068 }
1069 
1070 /** Get maximum length of world_x_velocity value.
1071  * @return length of world_x_velocity value, can be length of the array or number of
1072  * maximum number of characters for a string
1073  */
1074 size_t
1076 {
1077  return 1;
1078 }
1079 
1080 /** Set world_x_velocity value.
1081  *
1082  Velocity of object in the world coordinate system in X-direction in meter per second.
1083 
1084  * @param new_world_x_velocity new world_x_velocity value
1085  */
1086 void
1087 ObjectPositionInterface::set_world_x_velocity(const float new_world_x_velocity)
1088 {
1089  data->world_x_velocity = new_world_x_velocity;
1090  data_changed = true;
1091 }
1092 
1093 /** Get world_y_velocity value.
1094  *
1095  Velocity of object in the world coordinate system in Y-direction in meter per second.
1096 
1097  * @return world_y_velocity value
1098  */
1099 float
1101 {
1102  return data->world_y_velocity;
1103 }
1104 
1105 /** Get maximum length of world_y_velocity value.
1106  * @return length of world_y_velocity value, can be length of the array or number of
1107  * maximum number of characters for a string
1108  */
1109 size_t
1111 {
1112  return 1;
1113 }
1114 
1115 /** Set world_y_velocity value.
1116  *
1117  Velocity of object in the world coordinate system in Y-direction in meter per second.
1118 
1119  * @param new_world_y_velocity new world_y_velocity value
1120  */
1121 void
1122 ObjectPositionInterface::set_world_y_velocity(const float new_world_y_velocity)
1123 {
1124  data->world_y_velocity = new_world_y_velocity;
1125  data_changed = true;
1126 }
1127 
1128 /** Get world_z_velocity value.
1129  *
1130  Velocity of object in the world coordinate system in Z-direction in meter per second.
1131 
1132  * @return world_z_velocity value
1133  */
1134 float
1136 {
1137  return data->world_z_velocity;
1138 }
1139 
1140 /** Get maximum length of world_z_velocity value.
1141  * @return length of world_z_velocity value, can be length of the array or number of
1142  * maximum number of characters for a string
1143  */
1144 size_t
1146 {
1147  return 1;
1148 }
1149 
1150 /** Set world_z_velocity value.
1151  *
1152  Velocity of object in the world coordinate system in Z-direction in meter per second.
1153 
1154  * @param new_world_z_velocity new world_z_velocity value
1155  */
1156 void
1157 ObjectPositionInterface::set_world_z_velocity(const float new_world_z_velocity)
1158 {
1159  data->world_z_velocity = new_world_z_velocity;
1160  data_changed = true;
1161 }
1162 
1163 /** Get world_xyz_velocity_covariance value.
1164  *
1165  Covariance of WorldX/WorldY/WorldZ velocity values. This is a 3x3 matrix ordered line
1166  by line, first three values represent row, next tree values second row and last three
1167  values last row from left to right each.
1168 
1169  * @return world_xyz_velocity_covariance value
1170  */
1171 float *
1173 {
1174  return data->world_xyz_velocity_covariance;
1175 }
1176 
1177 /** Get world_xyz_velocity_covariance value at given index.
1178  *
1179  Covariance of WorldX/WorldY/WorldZ velocity values. This is a 3x3 matrix ordered line
1180  by line, first three values represent row, next tree values second row and last three
1181  values last row from left to right each.
1182 
1183  * @param index index of value
1184  * @return world_xyz_velocity_covariance value
1185  * @exception Exception thrown if index is out of bounds
1186  */
1187 float
1189 {
1190  if (index > 9) {
1191  throw Exception("Index value %u out of bounds (0..9)", index);
1192  }
1193  return data->world_xyz_velocity_covariance[index];
1194 }
1195 
1196 /** Get maximum length of world_xyz_velocity_covariance value.
1197  * @return length of world_xyz_velocity_covariance value, can be length of the array or number of
1198  * maximum number of characters for a string
1199  */
1200 size_t
1202 {
1203  return 9;
1204 }
1205 
1206 /** Set world_xyz_velocity_covariance value.
1207  *
1208  Covariance of WorldX/WorldY/WorldZ velocity values. This is a 3x3 matrix ordered line
1209  by line, first three values represent row, next tree values second row and last three
1210  values last row from left to right each.
1211 
1212  * @param new_world_xyz_velocity_covariance new world_xyz_velocity_covariance value
1213  */
1214 void
1215 ObjectPositionInterface::set_world_xyz_velocity_covariance(const float * new_world_xyz_velocity_covariance)
1216 {
1217  memcpy(data->world_xyz_velocity_covariance, new_world_xyz_velocity_covariance, sizeof(float) * 9);
1218  data_changed = true;
1219 }
1220 
1221 /** Set world_xyz_velocity_covariance value at given index.
1222  *
1223  Covariance of WorldX/WorldY/WorldZ velocity values. This is a 3x3 matrix ordered line
1224  by line, first three values represent row, next tree values second row and last three
1225  values last row from left to right each.
1226 
1227  * @param new_world_xyz_velocity_covariance new world_xyz_velocity_covariance value
1228  * @param index index for of the value
1229  */
1230 void
1231 ObjectPositionInterface::set_world_xyz_velocity_covariance(unsigned int index, const float new_world_xyz_velocity_covariance)
1232 {
1233  if (index > 9) {
1234  throw Exception("Index value %u out of bounds (0..9)", index);
1235  }
1236  data->world_xyz_velocity_covariance[index] = new_world_xyz_velocity_covariance;
1237  data_changed = true;
1238 }
1239 /** Get relative_x_velocity value.
1240  *
1241  Velocity of object in the world coordinate system in X-direction in meter per second.
1242 
1243  * @return relative_x_velocity value
1244  */
1245 float
1247 {
1248  return data->relative_x_velocity;
1249 }
1250 
1251 /** Get maximum length of relative_x_velocity value.
1252  * @return length of relative_x_velocity value, can be length of the array or number of
1253  * maximum number of characters for a string
1254  */
1255 size_t
1257 {
1258  return 1;
1259 }
1260 
1261 /** Set relative_x_velocity value.
1262  *
1263  Velocity of object in the world coordinate system in X-direction in meter per second.
1264 
1265  * @param new_relative_x_velocity new relative_x_velocity value
1266  */
1267 void
1268 ObjectPositionInterface::set_relative_x_velocity(const float new_relative_x_velocity)
1269 {
1270  data->relative_x_velocity = new_relative_x_velocity;
1271  data_changed = true;
1272 }
1273 
1274 /** Get relative_y_velocity value.
1275  *
1276  Velocity of object in the world coordinate system in Y-direction in meter per second.
1277 
1278  * @return relative_y_velocity value
1279  */
1280 float
1282 {
1283  return data->relative_y_velocity;
1284 }
1285 
1286 /** Get maximum length of relative_y_velocity value.
1287  * @return length of relative_y_velocity value, can be length of the array or number of
1288  * maximum number of characters for a string
1289  */
1290 size_t
1292 {
1293  return 1;
1294 }
1295 
1296 /** Set relative_y_velocity value.
1297  *
1298  Velocity of object in the world coordinate system in Y-direction in meter per second.
1299 
1300  * @param new_relative_y_velocity new relative_y_velocity value
1301  */
1302 void
1303 ObjectPositionInterface::set_relative_y_velocity(const float new_relative_y_velocity)
1304 {
1305  data->relative_y_velocity = new_relative_y_velocity;
1306  data_changed = true;
1307 }
1308 
1309 /** Get relative_z_velocity value.
1310  *
1311  Velocity of object in the world coordinate system in Z-direction in meter per second.
1312 
1313  * @return relative_z_velocity value
1314  */
1315 float
1317 {
1318  return data->relative_z_velocity;
1319 }
1320 
1321 /** Get maximum length of relative_z_velocity value.
1322  * @return length of relative_z_velocity value, can be length of the array or number of
1323  * maximum number of characters for a string
1324  */
1325 size_t
1327 {
1328  return 1;
1329 }
1330 
1331 /** Set relative_z_velocity value.
1332  *
1333  Velocity of object in the world coordinate system in Z-direction in meter per second.
1334 
1335  * @param new_relative_z_velocity new relative_z_velocity value
1336  */
1337 void
1338 ObjectPositionInterface::set_relative_z_velocity(const float new_relative_z_velocity)
1339 {
1340  data->relative_z_velocity = new_relative_z_velocity;
1341  data_changed = true;
1342 }
1343 
1344 /** Get relative_xyz_velocity_covariance value.
1345  *
1346  Covariance of relative x/y/z velocity values. This is a 3x3 matrix ordered line
1347  by line, first three values represent row, next tree values second row and last three
1348  values last row from left to right each.
1349 
1350  * @return relative_xyz_velocity_covariance value
1351  */
1352 float *
1354 {
1355  return data->relative_xyz_velocity_covariance;
1356 }
1357 
1358 /** Get relative_xyz_velocity_covariance value at given index.
1359  *
1360  Covariance of relative x/y/z velocity values. This is a 3x3 matrix ordered line
1361  by line, first three values represent row, next tree values second row and last three
1362  values last row from left to right each.
1363 
1364  * @param index index of value
1365  * @return relative_xyz_velocity_covariance value
1366  * @exception Exception thrown if index is out of bounds
1367  */
1368 float
1370 {
1371  if (index > 9) {
1372  throw Exception("Index value %u out of bounds (0..9)", index);
1373  }
1374  return data->relative_xyz_velocity_covariance[index];
1375 }
1376 
1377 /** Get maximum length of relative_xyz_velocity_covariance value.
1378  * @return length of relative_xyz_velocity_covariance value, can be length of the array or number of
1379  * maximum number of characters for a string
1380  */
1381 size_t
1383 {
1384  return 9;
1385 }
1386 
1387 /** Set relative_xyz_velocity_covariance value.
1388  *
1389  Covariance of relative x/y/z velocity values. This is a 3x3 matrix ordered line
1390  by line, first three values represent row, next tree values second row and last three
1391  values last row from left to right each.
1392 
1393  * @param new_relative_xyz_velocity_covariance new relative_xyz_velocity_covariance value
1394  */
1395 void
1396 ObjectPositionInterface::set_relative_xyz_velocity_covariance(const float * new_relative_xyz_velocity_covariance)
1397 {
1398  memcpy(data->relative_xyz_velocity_covariance, new_relative_xyz_velocity_covariance, sizeof(float) * 9);
1399  data_changed = true;
1400 }
1401 
1402 /** Set relative_xyz_velocity_covariance value at given index.
1403  *
1404  Covariance of relative x/y/z velocity values. This is a 3x3 matrix ordered line
1405  by line, first three values represent row, next tree values second row and last three
1406  values last row from left to right each.
1407 
1408  * @param new_relative_xyz_velocity_covariance new relative_xyz_velocity_covariance value
1409  * @param index index for of the value
1410  */
1411 void
1412 ObjectPositionInterface::set_relative_xyz_velocity_covariance(unsigned int index, const float new_relative_xyz_velocity_covariance)
1413 {
1414  if (index > 9) {
1415  throw Exception("Index value %u out of bounds (0..9)", index);
1416  }
1417  data->relative_xyz_velocity_covariance[index] = new_relative_xyz_velocity_covariance;
1418  data_changed = true;
1419 }
1420 /* =========== message create =========== */
1421 Message *
1423 {
1424  throw UnknownTypeException("The given type '%s' does not match any known "
1425  "message type for this interface type.", type);
1426 }
1427 
1428 
1429 /** Copy values from other interface.
1430  * @param other other interface to copy values from
1431  */
1432 void
1434 {
1435  const ObjectPositionInterface *oi = dynamic_cast<const ObjectPositionInterface *>(other);
1436  if (oi == NULL) {
1437  throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)",
1438  type(), other->type());
1439  }
1440  memcpy(data, oi->data, sizeof(ObjectPositionInterface_data_t));
1441 }
1442 
1443 const char *
1444 ObjectPositionInterface::enum_tostring(const char *enumtype, int val) const
1445 {
1446  throw UnknownTypeException("Unknown enum type %s", enumtype);
1447 }
1448 
1449 /* =========== messages =========== */
1450 /** Check if message is valid and can be enqueued.
1451  * @param message Message to check
1452  * @return true if the message is valid, false otherwise.
1453  */
1454 bool
1456 {
1457  return false;
1458 }
1459 
1460 /// @cond INTERNALS
1461 EXPORT_INTERFACE(ObjectPositionInterface)
1462 /// @endcond
1463 
1464 
1465 } // 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:41
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.
float extent_x() const
Get extent_x 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:316
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:225
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:78
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:336
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:226
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:640
void * data_ptr
Pointer to local memory storage.
Definition: interface.h:224
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:35
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:46
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:42
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.
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:228
static const uint32_t TYPE_GOAL_YELLOW
TYPE_GOAL_YELLOW constant.
boolean field
Definition: types.h:37
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:43
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.