Fawkes API Fawkes Development Version
NaoJointPositionInterface.cpp
1
2/***************************************************************************
3 * NaoJointPositionInterface.cpp - Fawkes BlackBoard Interface - NaoJointPositionInterface
4 *
5 * Templated created: Thu Oct 12 10:49:19 2006
6 * Copyright 2008-2011 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/NaoJointPositionInterface.h>
25
26#include <core/exceptions/software.h>
27
28#include <map>
29#include <string>
30#include <cstring>
31#include <cstdlib>
32
33namespace fawkes {
34
35/** @class NaoJointPositionInterface <interfaces/NaoJointPositionInterface.h>
36 * NaoJointPositionInterface Fawkes BlackBoard Interface.
37 *
38 This interface provides access to Nao joint positions and movements.
39
40 * @ingroup FawkesInterfaces
41 */
42
43
44/** SERVO_head_yaw constant */
46/** SERVO_head_pitch constant */
48/** SERVO_l_shoulder_pitch constant */
50/** SERVO_l_shoulder_roll constant */
52/** SERVO_l_elbow_yaw constant */
54/** SERVO_l_elbow_roll constant */
56/** SERVO_l_wrist_yaw constant */
58/** SERVO_l_hand constant */
59const uint32_t NaoJointPositionInterface::SERVO_l_hand = 128u;
60/** SERVO_l_hip_yaw_pitch constant */
62/** SERVO_l_hip_roll constant */
64/** SERVO_l_hip_pitch constant */
66/** SERVO_l_knee_pitch constant */
68/** SERVO_l_ankle_pitch constant */
70/** SERVO_l_ankle_roll constant */
72/** SERVO_r_shoulder_pitch constant */
74/** SERVO_r_shoulder_roll constant */
76/** SERVO_r_elbow_yaw constant */
78/** SERVO_r_elbow_roll constant */
80/** SERVO_r_wrist_yaw constant */
82/** SERVO_r_hand constant */
83const uint32_t NaoJointPositionInterface::SERVO_r_hand = 524288u;
84/** SERVO_r_hip_yaw_pitch constant */
86/** SERVO_r_hip_roll constant */
87const uint32_t NaoJointPositionInterface::SERVO_r_hip_roll = 2097152u;
88/** SERVO_r_hip_pitch constant */
89const uint32_t NaoJointPositionInterface::SERVO_r_hip_pitch = 4194304u;
90/** SERVO_r_knee_pitch constant */
91const uint32_t NaoJointPositionInterface::SERVO_r_knee_pitch = 8388608u;
92/** SERVO_r_ankle_pitch constant */
93const uint32_t NaoJointPositionInterface::SERVO_r_ankle_pitch = 16777216u;
94/** SERVO_r_ankle_roll constant */
95const uint32_t NaoJointPositionInterface::SERVO_r_ankle_roll = 33554432u;
96/** SERVO_min constant */
97const uint32_t NaoJointPositionInterface::SERVO_min = 1u;
98/** SERVO_max constant */
99const uint32_t NaoJointPositionInterface::SERVO_max = 33554432u;
100
101/** Constructor */
102NaoJointPositionInterface::NaoJointPositionInterface() : Interface()
103{
104 data_size = sizeof(NaoJointPositionInterface_data_t);
105 data_ptr = malloc(data_size);
106 data = (NaoJointPositionInterface_data_t *)data_ptr;
107 data_ts = (interface_data_ts_t *)data_ptr;
108 memset(data_ptr, 0, data_size);
109 enum_map_RobotType[(int)ROBOTYPE_ACADEMIC] = "ROBOTYPE_ACADEMIC";
110 enum_map_RobotType[(int)ROBOTYPE_ROBOCUP] = "ROBOTYPE_ROBOCUP";
111 add_fieldinfo(IFT_ENUM, "robot_type", 1, &data->robot_type, "RobotType", &enum_map_RobotType);
112 add_fieldinfo(IFT_UINT8, "robot_version", 4, &data->robot_version);
113 add_fieldinfo(IFT_FLOAT, "head_yaw", 1, &data->head_yaw);
114 add_fieldinfo(IFT_FLOAT, "head_pitch", 1, &data->head_pitch);
115 add_fieldinfo(IFT_FLOAT, "l_shoulder_pitch", 1, &data->l_shoulder_pitch);
116 add_fieldinfo(IFT_FLOAT, "l_shoulder_roll", 1, &data->l_shoulder_roll);
117 add_fieldinfo(IFT_FLOAT, "l_elbow_yaw", 1, &data->l_elbow_yaw);
118 add_fieldinfo(IFT_FLOAT, "l_elbow_roll", 1, &data->l_elbow_roll);
119 add_fieldinfo(IFT_FLOAT, "l_wrist_yaw", 1, &data->l_wrist_yaw);
120 add_fieldinfo(IFT_FLOAT, "l_hand", 1, &data->l_hand);
121 add_fieldinfo(IFT_FLOAT, "l_hip_yaw_pitch", 1, &data->l_hip_yaw_pitch);
122 add_fieldinfo(IFT_FLOAT, "l_hip_roll", 1, &data->l_hip_roll);
123 add_fieldinfo(IFT_FLOAT, "l_hip_pitch", 1, &data->l_hip_pitch);
124 add_fieldinfo(IFT_FLOAT, "l_knee_pitch", 1, &data->l_knee_pitch);
125 add_fieldinfo(IFT_FLOAT, "l_ankle_pitch", 1, &data->l_ankle_pitch);
126 add_fieldinfo(IFT_FLOAT, "l_ankle_roll", 1, &data->l_ankle_roll);
127 add_fieldinfo(IFT_FLOAT, "r_shoulder_pitch", 1, &data->r_shoulder_pitch);
128 add_fieldinfo(IFT_FLOAT, "r_shoulder_roll", 1, &data->r_shoulder_roll);
129 add_fieldinfo(IFT_FLOAT, "r_elbow_yaw", 1, &data->r_elbow_yaw);
130 add_fieldinfo(IFT_FLOAT, "r_elbow_roll", 1, &data->r_elbow_roll);
131 add_fieldinfo(IFT_FLOAT, "r_wrist_yaw", 1, &data->r_wrist_yaw);
132 add_fieldinfo(IFT_FLOAT, "r_hand", 1, &data->r_hand);
133 add_fieldinfo(IFT_FLOAT, "r_hip_yaw_pitch", 1, &data->r_hip_yaw_pitch);
134 add_fieldinfo(IFT_FLOAT, "r_hip_roll", 1, &data->r_hip_roll);
135 add_fieldinfo(IFT_FLOAT, "r_hip_pitch", 1, &data->r_hip_pitch);
136 add_fieldinfo(IFT_FLOAT, "r_knee_pitch", 1, &data->r_knee_pitch);
137 add_fieldinfo(IFT_FLOAT, "r_ankle_pitch", 1, &data->r_ankle_pitch);
138 add_fieldinfo(IFT_FLOAT, "r_ankle_roll", 1, &data->r_ankle_roll);
139 add_fieldinfo(IFT_INT32, "time", 1, &data->time);
140 add_messageinfo("SetServoMessage");
141 add_messageinfo("SetServosMessage");
142 add_messageinfo("MoveServoMessage");
143 add_messageinfo("MoveServosMessage");
144 unsigned char tmp_hash[] = {0x87, 0x3b, 0x41, 0x5d, 0x94, 0x57, 0x82, 0x55, 0x3, 0xbb, 0x3e, 0xf, 0x89, 0x50, 0x6b, 0x46};
145 set_hash(tmp_hash);
146}
147
148/** Destructor */
149NaoJointPositionInterface::~NaoJointPositionInterface()
150{
151 free(data_ptr);
152}
153/** Convert RobotType constant to string.
154 * @param value value to convert to string
155 * @return constant value as string.
156 */
157const char *
158NaoJointPositionInterface::tostring_RobotType(RobotType value) const
159{
160 switch (value) {
161 case ROBOTYPE_ACADEMIC: return "ROBOTYPE_ACADEMIC";
162 case ROBOTYPE_ROBOCUP: return "ROBOTYPE_ROBOCUP";
163 default: return "UNKNOWN";
164 }
165}
166/* Methods */
167/** Get robot_type value.
168 * Robot type.
169 * @return robot_type value
170 */
172NaoJointPositionInterface::robot_type() const
173{
174 return (NaoJointPositionInterface::RobotType)data->robot_type;
175}
176
177/** Get maximum length of robot_type value.
178 * @return length of robot_type value, can be length of the array or number of
179 * maximum number of characters for a string
180 */
181size_t
182NaoJointPositionInterface::maxlenof_robot_type() const
183{
184 return 1;
185}
186
187/** Set robot_type value.
188 * Robot type.
189 * @param new_robot_type new robot_type value
190 */
191void
192NaoJointPositionInterface::set_robot_type(const RobotType new_robot_type)
193{
194 set_field(data->robot_type, new_robot_type);
195}
196
197/** Get robot_version value.
198 *
199 Robot version. Fields are in ascending array index major, minor, micro and
200 patch level. Currently only the first two are used by Aldebaran, but due to
201 struct alignment we add two extra bytes.
202
203 * @return robot_version value
204 */
205uint8_t *
206NaoJointPositionInterface::robot_version() const
207{
208 return data->robot_version;
209}
210
211/** Get robot_version value at given index.
212 *
213 Robot version. Fields are in ascending array index major, minor, micro and
214 patch level. Currently only the first two are used by Aldebaran, but due to
215 struct alignment we add two extra bytes.
216
217 * @param index index of value
218 * @return robot_version value
219 * @exception Exception thrown if index is out of bounds
220 */
221uint8_t
222NaoJointPositionInterface::robot_version(unsigned int index) const
223{
224 if (index > 3) {
225 throw Exception("Index value %u out of bounds (0..3)", index);
226 }
227 return data->robot_version[index];
228}
229
230/** Get maximum length of robot_version value.
231 * @return length of robot_version value, can be length of the array or number of
232 * maximum number of characters for a string
233 */
234size_t
235NaoJointPositionInterface::maxlenof_robot_version() const
236{
237 return 4;
238}
239
240/** Set robot_version value.
241 *
242 Robot version. Fields are in ascending array index major, minor, micro and
243 patch level. Currently only the first two are used by Aldebaran, but due to
244 struct alignment we add two extra bytes.
245
246 * @param new_robot_version new robot_version value
247 */
248void
249NaoJointPositionInterface::set_robot_version(const uint8_t * new_robot_version)
250{
251 set_field(data->robot_version, new_robot_version);
252}
253
254/** Set robot_version value at given index.
255 *
256 Robot version. Fields are in ascending array index major, minor, micro and
257 patch level. Currently only the first two are used by Aldebaran, but due to
258 struct alignment we add two extra bytes.
259
260 * @param new_robot_version new robot_version value
261 * @param index index for of the value
262 */
263void
264NaoJointPositionInterface::set_robot_version(unsigned int index, const uint8_t new_robot_version)
265{
266 set_field(data->robot_version, index, new_robot_version);
267}
268/** Get head_yaw value.
269 * Head yaw
270 * @return head_yaw value
271 */
272float
273NaoJointPositionInterface::head_yaw() const
274{
275 return data->head_yaw;
276}
277
278/** Get maximum length of head_yaw value.
279 * @return length of head_yaw value, can be length of the array or number of
280 * maximum number of characters for a string
281 */
282size_t
283NaoJointPositionInterface::maxlenof_head_yaw() const
284{
285 return 1;
286}
287
288/** Set head_yaw value.
289 * Head yaw
290 * @param new_head_yaw new head_yaw value
291 */
292void
293NaoJointPositionInterface::set_head_yaw(const float new_head_yaw)
294{
295 set_field(data->head_yaw, new_head_yaw);
296}
297
298/** Get head_pitch value.
299 * Head pitch
300 * @return head_pitch value
301 */
302float
303NaoJointPositionInterface::head_pitch() const
304{
305 return data->head_pitch;
306}
307
308/** Get maximum length of head_pitch value.
309 * @return length of head_pitch value, can be length of the array or number of
310 * maximum number of characters for a string
311 */
312size_t
313NaoJointPositionInterface::maxlenof_head_pitch() const
314{
315 return 1;
316}
317
318/** Set head_pitch value.
319 * Head pitch
320 * @param new_head_pitch new head_pitch value
321 */
322void
323NaoJointPositionInterface::set_head_pitch(const float new_head_pitch)
324{
325 set_field(data->head_pitch, new_head_pitch);
326}
327
328/** Get l_shoulder_pitch value.
329 * Left shoulder pitch
330 * @return l_shoulder_pitch value
331 */
332float
333NaoJointPositionInterface::l_shoulder_pitch() const
334{
335 return data->l_shoulder_pitch;
336}
337
338/** Get maximum length of l_shoulder_pitch value.
339 * @return length of l_shoulder_pitch value, can be length of the array or number of
340 * maximum number of characters for a string
341 */
342size_t
343NaoJointPositionInterface::maxlenof_l_shoulder_pitch() const
344{
345 return 1;
346}
347
348/** Set l_shoulder_pitch value.
349 * Left shoulder pitch
350 * @param new_l_shoulder_pitch new l_shoulder_pitch value
351 */
352void
353NaoJointPositionInterface::set_l_shoulder_pitch(const float new_l_shoulder_pitch)
354{
355 set_field(data->l_shoulder_pitch, new_l_shoulder_pitch);
356}
357
358/** Get l_shoulder_roll value.
359 * Left shoulder roll
360 * @return l_shoulder_roll value
361 */
362float
363NaoJointPositionInterface::l_shoulder_roll() const
364{
365 return data->l_shoulder_roll;
366}
367
368/** Get maximum length of l_shoulder_roll value.
369 * @return length of l_shoulder_roll value, can be length of the array or number of
370 * maximum number of characters for a string
371 */
372size_t
373NaoJointPositionInterface::maxlenof_l_shoulder_roll() const
374{
375 return 1;
376}
377
378/** Set l_shoulder_roll value.
379 * Left shoulder roll
380 * @param new_l_shoulder_roll new l_shoulder_roll value
381 */
382void
383NaoJointPositionInterface::set_l_shoulder_roll(const float new_l_shoulder_roll)
384{
385 set_field(data->l_shoulder_roll, new_l_shoulder_roll);
386}
387
388/** Get l_elbow_yaw value.
389 * Left elbow yaw
390 * @return l_elbow_yaw value
391 */
392float
393NaoJointPositionInterface::l_elbow_yaw() const
394{
395 return data->l_elbow_yaw;
396}
397
398/** Get maximum length of l_elbow_yaw value.
399 * @return length of l_elbow_yaw value, can be length of the array or number of
400 * maximum number of characters for a string
401 */
402size_t
403NaoJointPositionInterface::maxlenof_l_elbow_yaw() const
404{
405 return 1;
406}
407
408/** Set l_elbow_yaw value.
409 * Left elbow yaw
410 * @param new_l_elbow_yaw new l_elbow_yaw value
411 */
412void
413NaoJointPositionInterface::set_l_elbow_yaw(const float new_l_elbow_yaw)
414{
415 set_field(data->l_elbow_yaw, new_l_elbow_yaw);
416}
417
418/** Get l_elbow_roll value.
419 * Left elbow roll
420 * @return l_elbow_roll value
421 */
422float
423NaoJointPositionInterface::l_elbow_roll() const
424{
425 return data->l_elbow_roll;
426}
427
428/** Get maximum length of l_elbow_roll value.
429 * @return length of l_elbow_roll value, can be length of the array or number of
430 * maximum number of characters for a string
431 */
432size_t
433NaoJointPositionInterface::maxlenof_l_elbow_roll() const
434{
435 return 1;
436}
437
438/** Set l_elbow_roll value.
439 * Left elbow roll
440 * @param new_l_elbow_roll new l_elbow_roll value
441 */
442void
443NaoJointPositionInterface::set_l_elbow_roll(const float new_l_elbow_roll)
444{
445 set_field(data->l_elbow_roll, new_l_elbow_roll);
446}
447
448/** Get l_wrist_yaw value.
449 * Left wrist yaw
450 * @return l_wrist_yaw value
451 */
452float
453NaoJointPositionInterface::l_wrist_yaw() const
454{
455 return data->l_wrist_yaw;
456}
457
458/** Get maximum length of l_wrist_yaw value.
459 * @return length of l_wrist_yaw value, can be length of the array or number of
460 * maximum number of characters for a string
461 */
462size_t
463NaoJointPositionInterface::maxlenof_l_wrist_yaw() const
464{
465 return 1;
466}
467
468/** Set l_wrist_yaw value.
469 * Left wrist yaw
470 * @param new_l_wrist_yaw new l_wrist_yaw value
471 */
472void
473NaoJointPositionInterface::set_l_wrist_yaw(const float new_l_wrist_yaw)
474{
475 set_field(data->l_wrist_yaw, new_l_wrist_yaw);
476}
477
478/** Get l_hand value.
479 * Left hand
480 * @return l_hand value
481 */
482float
483NaoJointPositionInterface::l_hand() const
484{
485 return data->l_hand;
486}
487
488/** Get maximum length of l_hand value.
489 * @return length of l_hand value, can be length of the array or number of
490 * maximum number of characters for a string
491 */
492size_t
493NaoJointPositionInterface::maxlenof_l_hand() const
494{
495 return 1;
496}
497
498/** Set l_hand value.
499 * Left hand
500 * @param new_l_hand new l_hand value
501 */
502void
503NaoJointPositionInterface::set_l_hand(const float new_l_hand)
504{
505 set_field(data->l_hand, new_l_hand);
506}
507
508/** Get l_hip_yaw_pitch value.
509 * Left hip yaw pitch
510 * @return l_hip_yaw_pitch value
511 */
512float
513NaoJointPositionInterface::l_hip_yaw_pitch() const
514{
515 return data->l_hip_yaw_pitch;
516}
517
518/** Get maximum length of l_hip_yaw_pitch value.
519 * @return length of l_hip_yaw_pitch value, can be length of the array or number of
520 * maximum number of characters for a string
521 */
522size_t
523NaoJointPositionInterface::maxlenof_l_hip_yaw_pitch() const
524{
525 return 1;
526}
527
528/** Set l_hip_yaw_pitch value.
529 * Left hip yaw pitch
530 * @param new_l_hip_yaw_pitch new l_hip_yaw_pitch value
531 */
532void
533NaoJointPositionInterface::set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch)
534{
535 set_field(data->l_hip_yaw_pitch, new_l_hip_yaw_pitch);
536}
537
538/** Get l_hip_roll value.
539 * Left hip roll
540 * @return l_hip_roll value
541 */
542float
543NaoJointPositionInterface::l_hip_roll() const
544{
545 return data->l_hip_roll;
546}
547
548/** Get maximum length of l_hip_roll value.
549 * @return length of l_hip_roll value, can be length of the array or number of
550 * maximum number of characters for a string
551 */
552size_t
553NaoJointPositionInterface::maxlenof_l_hip_roll() const
554{
555 return 1;
556}
557
558/** Set l_hip_roll value.
559 * Left hip roll
560 * @param new_l_hip_roll new l_hip_roll value
561 */
562void
563NaoJointPositionInterface::set_l_hip_roll(const float new_l_hip_roll)
564{
565 set_field(data->l_hip_roll, new_l_hip_roll);
566}
567
568/** Get l_hip_pitch value.
569 * Left hip pitch
570 * @return l_hip_pitch value
571 */
572float
573NaoJointPositionInterface::l_hip_pitch() const
574{
575 return data->l_hip_pitch;
576}
577
578/** Get maximum length of l_hip_pitch value.
579 * @return length of l_hip_pitch value, can be length of the array or number of
580 * maximum number of characters for a string
581 */
582size_t
583NaoJointPositionInterface::maxlenof_l_hip_pitch() const
584{
585 return 1;
586}
587
588/** Set l_hip_pitch value.
589 * Left hip pitch
590 * @param new_l_hip_pitch new l_hip_pitch value
591 */
592void
593NaoJointPositionInterface::set_l_hip_pitch(const float new_l_hip_pitch)
594{
595 set_field(data->l_hip_pitch, new_l_hip_pitch);
596}
597
598/** Get l_knee_pitch value.
599 * Left knee pitch
600 * @return l_knee_pitch value
601 */
602float
603NaoJointPositionInterface::l_knee_pitch() const
604{
605 return data->l_knee_pitch;
606}
607
608/** Get maximum length of l_knee_pitch value.
609 * @return length of l_knee_pitch value, can be length of the array or number of
610 * maximum number of characters for a string
611 */
612size_t
613NaoJointPositionInterface::maxlenof_l_knee_pitch() const
614{
615 return 1;
616}
617
618/** Set l_knee_pitch value.
619 * Left knee pitch
620 * @param new_l_knee_pitch new l_knee_pitch value
621 */
622void
623NaoJointPositionInterface::set_l_knee_pitch(const float new_l_knee_pitch)
624{
625 set_field(data->l_knee_pitch, new_l_knee_pitch);
626}
627
628/** Get l_ankle_pitch value.
629 * Left ankle pitch
630 * @return l_ankle_pitch value
631 */
632float
633NaoJointPositionInterface::l_ankle_pitch() const
634{
635 return data->l_ankle_pitch;
636}
637
638/** Get maximum length of l_ankle_pitch value.
639 * @return length of l_ankle_pitch value, can be length of the array or number of
640 * maximum number of characters for a string
641 */
642size_t
643NaoJointPositionInterface::maxlenof_l_ankle_pitch() const
644{
645 return 1;
646}
647
648/** Set l_ankle_pitch value.
649 * Left ankle pitch
650 * @param new_l_ankle_pitch new l_ankle_pitch value
651 */
652void
653NaoJointPositionInterface::set_l_ankle_pitch(const float new_l_ankle_pitch)
654{
655 set_field(data->l_ankle_pitch, new_l_ankle_pitch);
656}
657
658/** Get l_ankle_roll value.
659 * Left ankle roll
660 * @return l_ankle_roll value
661 */
662float
663NaoJointPositionInterface::l_ankle_roll() const
664{
665 return data->l_ankle_roll;
666}
667
668/** Get maximum length of l_ankle_roll value.
669 * @return length of l_ankle_roll value, can be length of the array or number of
670 * maximum number of characters for a string
671 */
672size_t
673NaoJointPositionInterface::maxlenof_l_ankle_roll() const
674{
675 return 1;
676}
677
678/** Set l_ankle_roll value.
679 * Left ankle roll
680 * @param new_l_ankle_roll new l_ankle_roll value
681 */
682void
683NaoJointPositionInterface::set_l_ankle_roll(const float new_l_ankle_roll)
684{
685 set_field(data->l_ankle_roll, new_l_ankle_roll);
686}
687
688/** Get r_shoulder_pitch value.
689 * Right shoulder pitch
690 * @return r_shoulder_pitch value
691 */
692float
693NaoJointPositionInterface::r_shoulder_pitch() const
694{
695 return data->r_shoulder_pitch;
696}
697
698/** Get maximum length of r_shoulder_pitch value.
699 * @return length of r_shoulder_pitch value, can be length of the array or number of
700 * maximum number of characters for a string
701 */
702size_t
703NaoJointPositionInterface::maxlenof_r_shoulder_pitch() const
704{
705 return 1;
706}
707
708/** Set r_shoulder_pitch value.
709 * Right shoulder pitch
710 * @param new_r_shoulder_pitch new r_shoulder_pitch value
711 */
712void
713NaoJointPositionInterface::set_r_shoulder_pitch(const float new_r_shoulder_pitch)
714{
715 set_field(data->r_shoulder_pitch, new_r_shoulder_pitch);
716}
717
718/** Get r_shoulder_roll value.
719 * Right shoulder roll
720 * @return r_shoulder_roll value
721 */
722float
723NaoJointPositionInterface::r_shoulder_roll() const
724{
725 return data->r_shoulder_roll;
726}
727
728/** Get maximum length of r_shoulder_roll value.
729 * @return length of r_shoulder_roll value, can be length of the array or number of
730 * maximum number of characters for a string
731 */
732size_t
733NaoJointPositionInterface::maxlenof_r_shoulder_roll() const
734{
735 return 1;
736}
737
738/** Set r_shoulder_roll value.
739 * Right shoulder roll
740 * @param new_r_shoulder_roll new r_shoulder_roll value
741 */
742void
743NaoJointPositionInterface::set_r_shoulder_roll(const float new_r_shoulder_roll)
744{
745 set_field(data->r_shoulder_roll, new_r_shoulder_roll);
746}
747
748/** Get r_elbow_yaw value.
749 * Right elbow yaw
750 * @return r_elbow_yaw value
751 */
752float
753NaoJointPositionInterface::r_elbow_yaw() const
754{
755 return data->r_elbow_yaw;
756}
757
758/** Get maximum length of r_elbow_yaw value.
759 * @return length of r_elbow_yaw value, can be length of the array or number of
760 * maximum number of characters for a string
761 */
762size_t
763NaoJointPositionInterface::maxlenof_r_elbow_yaw() const
764{
765 return 1;
766}
767
768/** Set r_elbow_yaw value.
769 * Right elbow yaw
770 * @param new_r_elbow_yaw new r_elbow_yaw value
771 */
772void
773NaoJointPositionInterface::set_r_elbow_yaw(const float new_r_elbow_yaw)
774{
775 set_field(data->r_elbow_yaw, new_r_elbow_yaw);
776}
777
778/** Get r_elbow_roll value.
779 * Right elbow roll
780 * @return r_elbow_roll value
781 */
782float
783NaoJointPositionInterface::r_elbow_roll() const
784{
785 return data->r_elbow_roll;
786}
787
788/** Get maximum length of r_elbow_roll value.
789 * @return length of r_elbow_roll value, can be length of the array or number of
790 * maximum number of characters for a string
791 */
792size_t
793NaoJointPositionInterface::maxlenof_r_elbow_roll() const
794{
795 return 1;
796}
797
798/** Set r_elbow_roll value.
799 * Right elbow roll
800 * @param new_r_elbow_roll new r_elbow_roll value
801 */
802void
803NaoJointPositionInterface::set_r_elbow_roll(const float new_r_elbow_roll)
804{
805 set_field(data->r_elbow_roll, new_r_elbow_roll);
806}
807
808/** Get r_wrist_yaw value.
809 * Right wrist yaw
810 * @return r_wrist_yaw value
811 */
812float
813NaoJointPositionInterface::r_wrist_yaw() const
814{
815 return data->r_wrist_yaw;
816}
817
818/** Get maximum length of r_wrist_yaw value.
819 * @return length of r_wrist_yaw value, can be length of the array or number of
820 * maximum number of characters for a string
821 */
822size_t
823NaoJointPositionInterface::maxlenof_r_wrist_yaw() const
824{
825 return 1;
826}
827
828/** Set r_wrist_yaw value.
829 * Right wrist yaw
830 * @param new_r_wrist_yaw new r_wrist_yaw value
831 */
832void
833NaoJointPositionInterface::set_r_wrist_yaw(const float new_r_wrist_yaw)
834{
835 set_field(data->r_wrist_yaw, new_r_wrist_yaw);
836}
837
838/** Get r_hand value.
839 * Right hand
840 * @return r_hand value
841 */
842float
843NaoJointPositionInterface::r_hand() const
844{
845 return data->r_hand;
846}
847
848/** Get maximum length of r_hand value.
849 * @return length of r_hand value, can be length of the array or number of
850 * maximum number of characters for a string
851 */
852size_t
853NaoJointPositionInterface::maxlenof_r_hand() const
854{
855 return 1;
856}
857
858/** Set r_hand value.
859 * Right hand
860 * @param new_r_hand new r_hand value
861 */
862void
863NaoJointPositionInterface::set_r_hand(const float new_r_hand)
864{
865 set_field(data->r_hand, new_r_hand);
866}
867
868/** Get r_hip_yaw_pitch value.
869 * Right hip yaw pitch
870 * @return r_hip_yaw_pitch value
871 */
872float
873NaoJointPositionInterface::r_hip_yaw_pitch() const
874{
875 return data->r_hip_yaw_pitch;
876}
877
878/** Get maximum length of r_hip_yaw_pitch value.
879 * @return length of r_hip_yaw_pitch value, can be length of the array or number of
880 * maximum number of characters for a string
881 */
882size_t
883NaoJointPositionInterface::maxlenof_r_hip_yaw_pitch() const
884{
885 return 1;
886}
887
888/** Set r_hip_yaw_pitch value.
889 * Right hip yaw pitch
890 * @param new_r_hip_yaw_pitch new r_hip_yaw_pitch value
891 */
892void
893NaoJointPositionInterface::set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch)
894{
895 set_field(data->r_hip_yaw_pitch, new_r_hip_yaw_pitch);
896}
897
898/** Get r_hip_roll value.
899 * Right hip roll
900 * @return r_hip_roll value
901 */
902float
903NaoJointPositionInterface::r_hip_roll() const
904{
905 return data->r_hip_roll;
906}
907
908/** Get maximum length of r_hip_roll value.
909 * @return length of r_hip_roll value, can be length of the array or number of
910 * maximum number of characters for a string
911 */
912size_t
913NaoJointPositionInterface::maxlenof_r_hip_roll() const
914{
915 return 1;
916}
917
918/** Set r_hip_roll value.
919 * Right hip roll
920 * @param new_r_hip_roll new r_hip_roll value
921 */
922void
923NaoJointPositionInterface::set_r_hip_roll(const float new_r_hip_roll)
924{
925 set_field(data->r_hip_roll, new_r_hip_roll);
926}
927
928/** Get r_hip_pitch value.
929 * Right hip pitch
930 * @return r_hip_pitch value
931 */
932float
933NaoJointPositionInterface::r_hip_pitch() const
934{
935 return data->r_hip_pitch;
936}
937
938/** Get maximum length of r_hip_pitch value.
939 * @return length of r_hip_pitch value, can be length of the array or number of
940 * maximum number of characters for a string
941 */
942size_t
943NaoJointPositionInterface::maxlenof_r_hip_pitch() const
944{
945 return 1;
946}
947
948/** Set r_hip_pitch value.
949 * Right hip pitch
950 * @param new_r_hip_pitch new r_hip_pitch value
951 */
952void
953NaoJointPositionInterface::set_r_hip_pitch(const float new_r_hip_pitch)
954{
955 set_field(data->r_hip_pitch, new_r_hip_pitch);
956}
957
958/** Get r_knee_pitch value.
959 * Right knee pitch
960 * @return r_knee_pitch value
961 */
962float
963NaoJointPositionInterface::r_knee_pitch() const
964{
965 return data->r_knee_pitch;
966}
967
968/** Get maximum length of r_knee_pitch value.
969 * @return length of r_knee_pitch value, can be length of the array or number of
970 * maximum number of characters for a string
971 */
972size_t
973NaoJointPositionInterface::maxlenof_r_knee_pitch() const
974{
975 return 1;
976}
977
978/** Set r_knee_pitch value.
979 * Right knee pitch
980 * @param new_r_knee_pitch new r_knee_pitch value
981 */
982void
983NaoJointPositionInterface::set_r_knee_pitch(const float new_r_knee_pitch)
984{
985 set_field(data->r_knee_pitch, new_r_knee_pitch);
986}
987
988/** Get r_ankle_pitch value.
989 * Right ankle pitch
990 * @return r_ankle_pitch value
991 */
992float
993NaoJointPositionInterface::r_ankle_pitch() const
994{
995 return data->r_ankle_pitch;
996}
997
998/** Get maximum length of r_ankle_pitch value.
999 * @return length of r_ankle_pitch value, can be length of the array or number of
1000 * maximum number of characters for a string
1001 */
1002size_t
1003NaoJointPositionInterface::maxlenof_r_ankle_pitch() const
1004{
1005 return 1;
1006}
1007
1008/** Set r_ankle_pitch value.
1009 * Right ankle pitch
1010 * @param new_r_ankle_pitch new r_ankle_pitch value
1011 */
1012void
1013NaoJointPositionInterface::set_r_ankle_pitch(const float new_r_ankle_pitch)
1014{
1015 set_field(data->r_ankle_pitch, new_r_ankle_pitch);
1016}
1017
1018/** Get r_ankle_roll value.
1019 * Right ankle roll
1020 * @return r_ankle_roll value
1021 */
1022float
1023NaoJointPositionInterface::r_ankle_roll() const
1024{
1025 return data->r_ankle_roll;
1026}
1027
1028/** Get maximum length of r_ankle_roll value.
1029 * @return length of r_ankle_roll value, can be length of the array or number of
1030 * maximum number of characters for a string
1031 */
1032size_t
1033NaoJointPositionInterface::maxlenof_r_ankle_roll() const
1034{
1035 return 1;
1036}
1037
1038/** Set r_ankle_roll value.
1039 * Right ankle roll
1040 * @param new_r_ankle_roll new r_ankle_roll value
1041 */
1042void
1043NaoJointPositionInterface::set_r_ankle_roll(const float new_r_ankle_roll)
1044{
1045 set_field(data->r_ankle_roll, new_r_ankle_roll);
1046}
1047
1048/** Get time value.
1049 *
1050 Current reference time in ms. For real hardware this is the DCM time.
1051 Times in messages are always offsets to the current time and the current
1052 time is added before executing the command.
1053
1054 * @return time value
1055 */
1056int32_t
1057NaoJointPositionInterface::time() const
1058{
1059 return data->time;
1060}
1061
1062/** Get maximum length of time value.
1063 * @return length of time value, can be length of the array or number of
1064 * maximum number of characters for a string
1065 */
1066size_t
1067NaoJointPositionInterface::maxlenof_time() const
1068{
1069 return 1;
1070}
1071
1072/** Set time value.
1073 *
1074 Current reference time in ms. For real hardware this is the DCM time.
1075 Times in messages are always offsets to the current time and the current
1076 time is added before executing the command.
1077
1078 * @param new_time new time value
1079 */
1080void
1081NaoJointPositionInterface::set_time(const int32_t new_time)
1082{
1083 set_field(data->time, new_time);
1084}
1085
1086/* =========== message create =========== */
1087Message *
1088NaoJointPositionInterface::create_message(const char *type) const
1089{
1090 if ( strncmp("SetServoMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
1091 return new SetServoMessage();
1092 } else if ( strncmp("SetServosMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
1093 return new SetServosMessage();
1094 } else if ( strncmp("MoveServoMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
1095 return new MoveServoMessage();
1096 } else if ( strncmp("MoveServosMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
1097 return new MoveServosMessage();
1098 } else {
1099 throw UnknownTypeException("The given type '%s' does not match any known "
1100 "message type for this interface type.", type);
1101 }
1102}
1103
1104
1105/** Copy values from other interface.
1106 * @param other other interface to copy values from
1107 */
1108void
1109NaoJointPositionInterface::copy_values(const Interface *other)
1110{
1111 const NaoJointPositionInterface *oi = dynamic_cast<const NaoJointPositionInterface *>(other);
1112 if (oi == NULL) {
1113 throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)",
1114 type(), other->type());
1115 }
1116 memcpy(data, oi->data, sizeof(NaoJointPositionInterface_data_t));
1117}
1118
1119const char *
1120NaoJointPositionInterface::enum_tostring(const char *enumtype, int val) const
1121{
1122 if (strcmp(enumtype, "RobotType") == 0) {
1123 return tostring_RobotType((RobotType)val);
1124 }
1125 throw UnknownTypeException("Unknown enum type %s", enumtype);
1126}
1127
1128/* =========== messages =========== */
1129/** @class NaoJointPositionInterface::SetServoMessage <interfaces/NaoJointPositionInterface.h>
1130 * SetServoMessage Fawkes BlackBoard Interface Message.
1131 *
1132
1133 */
1134
1135
1136/** Constructor with initial values.
1137 * @param ini_servo initial value for servo
1138 * @param ini_value initial value for value
1139 * @param ini_time initial value for time
1140 */
1141NaoJointPositionInterface::SetServoMessage::SetServoMessage(const uint32_t ini_servo, const float ini_value, const int32_t ini_time) : Message("SetServoMessage")
1142{
1143 data_size = sizeof(SetServoMessage_data_t);
1144 data_ptr = malloc(data_size);
1145 memset(data_ptr, 0, data_size);
1146 data = (SetServoMessage_data_t *)data_ptr;
1148 data->servo = ini_servo;
1149 data->value = ini_value;
1150 data->time = ini_time;
1151 enum_map_RobotType[(int)ROBOTYPE_ACADEMIC] = "ROBOTYPE_ACADEMIC";
1152 enum_map_RobotType[(int)ROBOTYPE_ROBOCUP] = "ROBOTYPE_ROBOCUP";
1153 add_fieldinfo(IFT_UINT32, "servo", 1, &data->servo);
1154 add_fieldinfo(IFT_FLOAT, "value", 1, &data->value);
1155 add_fieldinfo(IFT_INT32, "time", 1, &data->time);
1156}
1157/** Constructor */
1159{
1160 data_size = sizeof(SetServoMessage_data_t);
1161 data_ptr = malloc(data_size);
1162 memset(data_ptr, 0, data_size);
1163 data = (SetServoMessage_data_t *)data_ptr;
1165 enum_map_RobotType[(int)ROBOTYPE_ACADEMIC] = "ROBOTYPE_ACADEMIC";
1166 enum_map_RobotType[(int)ROBOTYPE_ROBOCUP] = "ROBOTYPE_ROBOCUP";
1167 add_fieldinfo(IFT_UINT32, "servo", 1, &data->servo);
1168 add_fieldinfo(IFT_FLOAT, "value", 1, &data->value);
1169 add_fieldinfo(IFT_INT32, "time", 1, &data->time);
1170}
1171
1172/** Destructor */
1174{
1175 free(data_ptr);
1176}
1177
1178/** Copy constructor.
1179 * @param m message to copy from
1180 */
1182{
1183 data_size = m->data_size;
1184 data_ptr = malloc(data_size);
1185 memcpy(data_ptr, m->data_ptr, data_size);
1186 data = (SetServoMessage_data_t *)data_ptr;
1188}
1189
1190/* Methods */
1191/** Get servo value.
1192 * A concatenated list of SERVO_* constants to
1193 define the servos that should execute the movement. The list shall consist of
1194 binary or'ed SERVO_* constants.
1195 * @return servo value
1196 */
1197uint32_t
1199{
1200 return data->servo;
1201}
1202
1203/** Get maximum length of servo value.
1204 * @return length of servo value, can be length of the array or number of
1205 * maximum number of characters for a string
1206 */
1207size_t
1209{
1210 return 1;
1211}
1212
1213/** Set servo value.
1214 * A concatenated list of SERVO_* constants to
1215 define the servos that should execute the movement. The list shall consist of
1216 binary or'ed SERVO_* constants.
1217 * @param new_servo new servo value
1218 */
1219void
1221{
1222 set_field(data->servo, new_servo);
1223}
1224
1225/** Get value value.
1226 * Servo value to set for servos.
1227 * @return value value
1228 */
1229float
1231{
1232 return data->value;
1233}
1234
1235/** Get maximum length of value value.
1236 * @return length of value value, can be length of the array or number of
1237 * maximum number of characters for a string
1238 */
1239size_t
1241{
1242 return 1;
1243}
1244
1245/** Set value value.
1246 * Servo value to set for servos.
1247 * @param new_value new value value
1248 */
1249void
1251{
1252 set_field(data->value, new_value);
1253}
1254
1255/** Get time value.
1256 *
1257 Current reference time in ms. For real hardware this is the DCM time.
1258 Times in messages are always offsets to the current time and the current
1259 time is added before executing the command.
1260
1261 * @return time value
1262 */
1263int32_t
1265{
1266 return data->time;
1267}
1268
1269/** Get maximum length of time value.
1270 * @return length of time value, can be length of the array or number of
1271 * maximum number of characters for a string
1272 */
1273size_t
1275{
1276 return 1;
1277}
1278
1279/** Set time value.
1280 *
1281 Current reference time in ms. For real hardware this is the DCM time.
1282 Times in messages are always offsets to the current time and the current
1283 time is added before executing the command.
1284
1285 * @param new_time new time value
1286 */
1287void
1289{
1290 set_field(data->time, new_time);
1291}
1292
1293/** Clone this message.
1294 * Produces a message of the same type as this message and copies the
1295 * data to the new message.
1296 * @return clone of this message
1297 */
1298Message *
1300{
1302}
1303/** @class NaoJointPositionInterface::SetServosMessage <interfaces/NaoJointPositionInterface.h>
1304 * SetServosMessage Fawkes BlackBoard Interface Message.
1305 *
1306
1307 */
1308
1309
1310/** Constructor with initial values.
1311 * @param ini_head_yaw initial value for head_yaw
1312 * @param ini_head_pitch initial value for head_pitch
1313 * @param ini_l_shoulder_pitch initial value for l_shoulder_pitch
1314 * @param ini_l_shoulder_roll initial value for l_shoulder_roll
1315 * @param ini_l_elbow_yaw initial value for l_elbow_yaw
1316 * @param ini_l_elbow_roll initial value for l_elbow_roll
1317 * @param ini_l_hip_yaw_pitch initial value for l_hip_yaw_pitch
1318 * @param ini_l_hip_roll initial value for l_hip_roll
1319 * @param ini_l_hip_pitch initial value for l_hip_pitch
1320 * @param ini_l_knee_pitch initial value for l_knee_pitch
1321 * @param ini_l_ankle_pitch initial value for l_ankle_pitch
1322 * @param ini_l_ankle_roll initial value for l_ankle_roll
1323 * @param ini_l_wrist_yaw initial value for l_wrist_yaw
1324 * @param ini_l_hand initial value for l_hand
1325 * @param ini_r_shoulder_pitch initial value for r_shoulder_pitch
1326 * @param ini_r_shoulder_roll initial value for r_shoulder_roll
1327 * @param ini_r_elbow_yaw initial value for r_elbow_yaw
1328 * @param ini_r_elbow_roll initial value for r_elbow_roll
1329 * @param ini_r_wrist_yaw initial value for r_wrist_yaw
1330 * @param ini_r_hand initial value for r_hand
1331 * @param ini_r_hip_yaw_pitch initial value for r_hip_yaw_pitch
1332 * @param ini_r_hip_roll initial value for r_hip_roll
1333 * @param ini_r_hip_pitch initial value for r_hip_pitch
1334 * @param ini_r_knee_pitch initial value for r_knee_pitch
1335 * @param ini_r_ankle_pitch initial value for r_ankle_pitch
1336 * @param ini_r_ankle_roll initial value for r_ankle_roll
1337 * @param ini_time initial value for time
1338 */
1339NaoJointPositionInterface::SetServosMessage::SetServosMessage(const float ini_head_yaw, const float ini_head_pitch, const float ini_l_shoulder_pitch, const float ini_l_shoulder_roll, const float ini_l_elbow_yaw, const float ini_l_elbow_roll, const float ini_l_hip_yaw_pitch, const float ini_l_hip_roll, const float ini_l_hip_pitch, const float ini_l_knee_pitch, const float ini_l_ankle_pitch, const float ini_l_ankle_roll, const float ini_l_wrist_yaw, const float ini_l_hand, const float ini_r_shoulder_pitch, const float ini_r_shoulder_roll, const float ini_r_elbow_yaw, const float ini_r_elbow_roll, const float ini_r_wrist_yaw, const float ini_r_hand, const float ini_r_hip_yaw_pitch, const float ini_r_hip_roll, const float ini_r_hip_pitch, const float ini_r_knee_pitch, const float ini_r_ankle_pitch, const float ini_r_ankle_roll, const int32_t ini_time) : Message("SetServosMessage")
1340{
1341 data_size = sizeof(SetServosMessage_data_t);
1342 data_ptr = malloc(data_size);
1343 memset(data_ptr, 0, data_size);
1344 data = (SetServosMessage_data_t *)data_ptr;
1346 data->head_yaw = ini_head_yaw;
1347 data->head_pitch = ini_head_pitch;
1348 data->l_shoulder_pitch = ini_l_shoulder_pitch;
1349 data->l_shoulder_roll = ini_l_shoulder_roll;
1350 data->l_elbow_yaw = ini_l_elbow_yaw;
1351 data->l_elbow_roll = ini_l_elbow_roll;
1352 data->l_hip_yaw_pitch = ini_l_hip_yaw_pitch;
1353 data->l_hip_roll = ini_l_hip_roll;
1354 data->l_hip_pitch = ini_l_hip_pitch;
1355 data->l_knee_pitch = ini_l_knee_pitch;
1356 data->l_ankle_pitch = ini_l_ankle_pitch;
1357 data->l_ankle_roll = ini_l_ankle_roll;
1358 data->l_wrist_yaw = ini_l_wrist_yaw;
1359 data->l_hand = ini_l_hand;
1360 data->r_shoulder_pitch = ini_r_shoulder_pitch;
1361 data->r_shoulder_roll = ini_r_shoulder_roll;
1362 data->r_elbow_yaw = ini_r_elbow_yaw;
1363 data->r_elbow_roll = ini_r_elbow_roll;
1364 data->r_wrist_yaw = ini_r_wrist_yaw;
1365 data->r_hand = ini_r_hand;
1366 data->r_hip_yaw_pitch = ini_r_hip_yaw_pitch;
1367 data->r_hip_roll = ini_r_hip_roll;
1368 data->r_hip_pitch = ini_r_hip_pitch;
1369 data->r_knee_pitch = ini_r_knee_pitch;
1370 data->r_ankle_pitch = ini_r_ankle_pitch;
1371 data->r_ankle_roll = ini_r_ankle_roll;
1372 data->time = ini_time;
1373 enum_map_RobotType[(int)ROBOTYPE_ACADEMIC] = "ROBOTYPE_ACADEMIC";
1374 enum_map_RobotType[(int)ROBOTYPE_ROBOCUP] = "ROBOTYPE_ROBOCUP";
1375 add_fieldinfo(IFT_FLOAT, "head_yaw", 1, &data->head_yaw);
1376 add_fieldinfo(IFT_FLOAT, "head_pitch", 1, &data->head_pitch);
1377 add_fieldinfo(IFT_FLOAT, "l_shoulder_pitch", 1, &data->l_shoulder_pitch);
1378 add_fieldinfo(IFT_FLOAT, "l_shoulder_roll", 1, &data->l_shoulder_roll);
1379 add_fieldinfo(IFT_FLOAT, "l_elbow_yaw", 1, &data->l_elbow_yaw);
1380 add_fieldinfo(IFT_FLOAT, "l_elbow_roll", 1, &data->l_elbow_roll);
1381 add_fieldinfo(IFT_FLOAT, "l_hip_yaw_pitch", 1, &data->l_hip_yaw_pitch);
1382 add_fieldinfo(IFT_FLOAT, "l_hip_roll", 1, &data->l_hip_roll);
1383 add_fieldinfo(IFT_FLOAT, "l_hip_pitch", 1, &data->l_hip_pitch);
1384 add_fieldinfo(IFT_FLOAT, "l_knee_pitch", 1, &data->l_knee_pitch);
1385 add_fieldinfo(IFT_FLOAT, "l_ankle_pitch", 1, &data->l_ankle_pitch);
1386 add_fieldinfo(IFT_FLOAT, "l_ankle_roll", 1, &data->l_ankle_roll);
1387 add_fieldinfo(IFT_FLOAT, "l_wrist_yaw", 1, &data->l_wrist_yaw);
1388 add_fieldinfo(IFT_FLOAT, "l_hand", 1, &data->l_hand);
1389 add_fieldinfo(IFT_FLOAT, "r_shoulder_pitch", 1, &data->r_shoulder_pitch);
1390 add_fieldinfo(IFT_FLOAT, "r_shoulder_roll", 1, &data->r_shoulder_roll);
1391 add_fieldinfo(IFT_FLOAT, "r_elbow_yaw", 1, &data->r_elbow_yaw);
1392 add_fieldinfo(IFT_FLOAT, "r_elbow_roll", 1, &data->r_elbow_roll);
1393 add_fieldinfo(IFT_FLOAT, "r_wrist_yaw", 1, &data->r_wrist_yaw);
1394 add_fieldinfo(IFT_FLOAT, "r_hand", 1, &data->r_hand);
1395 add_fieldinfo(IFT_FLOAT, "r_hip_yaw_pitch", 1, &data->r_hip_yaw_pitch);
1396 add_fieldinfo(IFT_FLOAT, "r_hip_roll", 1, &data->r_hip_roll);
1397 add_fieldinfo(IFT_FLOAT, "r_hip_pitch", 1, &data->r_hip_pitch);
1398 add_fieldinfo(IFT_FLOAT, "r_knee_pitch", 1, &data->r_knee_pitch);
1399 add_fieldinfo(IFT_FLOAT, "r_ankle_pitch", 1, &data->r_ankle_pitch);
1400 add_fieldinfo(IFT_FLOAT, "r_ankle_roll", 1, &data->r_ankle_roll);
1401 add_fieldinfo(IFT_INT32, "time", 1, &data->time);
1402}
1403/** Constructor */
1405{
1406 data_size = sizeof(SetServosMessage_data_t);
1407 data_ptr = malloc(data_size);
1408 memset(data_ptr, 0, data_size);
1409 data = (SetServosMessage_data_t *)data_ptr;
1411 enum_map_RobotType[(int)ROBOTYPE_ACADEMIC] = "ROBOTYPE_ACADEMIC";
1412 enum_map_RobotType[(int)ROBOTYPE_ROBOCUP] = "ROBOTYPE_ROBOCUP";
1413 add_fieldinfo(IFT_FLOAT, "head_yaw", 1, &data->head_yaw);
1414 add_fieldinfo(IFT_FLOAT, "head_pitch", 1, &data->head_pitch);
1415 add_fieldinfo(IFT_FLOAT, "l_shoulder_pitch", 1, &data->l_shoulder_pitch);
1416 add_fieldinfo(IFT_FLOAT, "l_shoulder_roll", 1, &data->l_shoulder_roll);
1417 add_fieldinfo(IFT_FLOAT, "l_elbow_yaw", 1, &data->l_elbow_yaw);
1418 add_fieldinfo(IFT_FLOAT, "l_elbow_roll", 1, &data->l_elbow_roll);
1419 add_fieldinfo(IFT_FLOAT, "l_hip_yaw_pitch", 1, &data->l_hip_yaw_pitch);
1420 add_fieldinfo(IFT_FLOAT, "l_hip_roll", 1, &data->l_hip_roll);
1421 add_fieldinfo(IFT_FLOAT, "l_hip_pitch", 1, &data->l_hip_pitch);
1422 add_fieldinfo(IFT_FLOAT, "l_knee_pitch", 1, &data->l_knee_pitch);
1423 add_fieldinfo(IFT_FLOAT, "l_ankle_pitch", 1, &data->l_ankle_pitch);
1424 add_fieldinfo(IFT_FLOAT, "l_ankle_roll", 1, &data->l_ankle_roll);
1425 add_fieldinfo(IFT_FLOAT, "l_wrist_yaw", 1, &data->l_wrist_yaw);
1426 add_fieldinfo(IFT_FLOAT, "l_hand", 1, &data->l_hand);
1427 add_fieldinfo(IFT_FLOAT, "r_shoulder_pitch", 1, &data->r_shoulder_pitch);
1428 add_fieldinfo(IFT_FLOAT, "r_shoulder_roll", 1, &data->r_shoulder_roll);
1429 add_fieldinfo(IFT_FLOAT, "r_elbow_yaw", 1, &data->r_elbow_yaw);
1430 add_fieldinfo(IFT_FLOAT, "r_elbow_roll", 1, &data->r_elbow_roll);
1431 add_fieldinfo(IFT_FLOAT, "r_wrist_yaw", 1, &data->r_wrist_yaw);
1432 add_fieldinfo(IFT_FLOAT, "r_hand", 1, &data->r_hand);
1433 add_fieldinfo(IFT_FLOAT, "r_hip_yaw_pitch", 1, &data->r_hip_yaw_pitch);
1434 add_fieldinfo(IFT_FLOAT, "r_hip_roll", 1, &data->r_hip_roll);
1435 add_fieldinfo(IFT_FLOAT, "r_hip_pitch", 1, &data->r_hip_pitch);
1436 add_fieldinfo(IFT_FLOAT, "r_knee_pitch", 1, &data->r_knee_pitch);
1437 add_fieldinfo(IFT_FLOAT, "r_ankle_pitch", 1, &data->r_ankle_pitch);
1438 add_fieldinfo(IFT_FLOAT, "r_ankle_roll", 1, &data->r_ankle_roll);
1439 add_fieldinfo(IFT_INT32, "time", 1, &data->time);
1440}
1441
1442/** Destructor */
1444{
1445 free(data_ptr);
1446}
1447
1448/** Copy constructor.
1449 * @param m message to copy from
1450 */
1452{
1453 data_size = m->data_size;
1454 data_ptr = malloc(data_size);
1455 memcpy(data_ptr, m->data_ptr, data_size);
1456 data = (SetServosMessage_data_t *)data_ptr;
1458}
1459
1460/* Methods */
1461/** Get head_yaw value.
1462 * Head yaw
1463 * @return head_yaw value
1464 */
1465float
1467{
1468 return data->head_yaw;
1469}
1470
1471/** Get maximum length of head_yaw value.
1472 * @return length of head_yaw value, can be length of the array or number of
1473 * maximum number of characters for a string
1474 */
1475size_t
1477{
1478 return 1;
1479}
1480
1481/** Set head_yaw value.
1482 * Head yaw
1483 * @param new_head_yaw new head_yaw value
1484 */
1485void
1487{
1488 set_field(data->head_yaw, new_head_yaw);
1489}
1490
1491/** Get head_pitch value.
1492 * Head pitch
1493 * @return head_pitch value
1494 */
1495float
1497{
1498 return data->head_pitch;
1499}
1500
1501/** Get maximum length of head_pitch value.
1502 * @return length of head_pitch value, can be length of the array or number of
1503 * maximum number of characters for a string
1504 */
1505size_t
1507{
1508 return 1;
1509}
1510
1511/** Set head_pitch value.
1512 * Head pitch
1513 * @param new_head_pitch new head_pitch value
1514 */
1515void
1517{
1518 set_field(data->head_pitch, new_head_pitch);
1519}
1520
1521/** Get l_shoulder_pitch value.
1522 * Left shoulder pitch
1523 * @return l_shoulder_pitch value
1524 */
1525float
1527{
1528 return data->l_shoulder_pitch;
1529}
1530
1531/** Get maximum length of l_shoulder_pitch value.
1532 * @return length of l_shoulder_pitch value, can be length of the array or number of
1533 * maximum number of characters for a string
1534 */
1535size_t
1537{
1538 return 1;
1539}
1540
1541/** Set l_shoulder_pitch value.
1542 * Left shoulder pitch
1543 * @param new_l_shoulder_pitch new l_shoulder_pitch value
1544 */
1545void
1547{
1548 set_field(data->l_shoulder_pitch, new_l_shoulder_pitch);
1549}
1550
1551/** Get l_shoulder_roll value.
1552 * Left shoulder roll
1553 * @return l_shoulder_roll value
1554 */
1555float
1557{
1558 return data->l_shoulder_roll;
1559}
1560
1561/** Get maximum length of l_shoulder_roll value.
1562 * @return length of l_shoulder_roll value, can be length of the array or number of
1563 * maximum number of characters for a string
1564 */
1565size_t
1567{
1568 return 1;
1569}
1570
1571/** Set l_shoulder_roll value.
1572 * Left shoulder roll
1573 * @param new_l_shoulder_roll new l_shoulder_roll value
1574 */
1575void
1577{
1578 set_field(data->l_shoulder_roll, new_l_shoulder_roll);
1579}
1580
1581/** Get l_elbow_yaw value.
1582 * Left elbow yaw
1583 * @return l_elbow_yaw value
1584 */
1585float
1587{
1588 return data->l_elbow_yaw;
1589}
1590
1591/** Get maximum length of l_elbow_yaw value.
1592 * @return length of l_elbow_yaw value, can be length of the array or number of
1593 * maximum number of characters for a string
1594 */
1595size_t
1597{
1598 return 1;
1599}
1600
1601/** Set l_elbow_yaw value.
1602 * Left elbow yaw
1603 * @param new_l_elbow_yaw new l_elbow_yaw value
1604 */
1605void
1607{
1608 set_field(data->l_elbow_yaw, new_l_elbow_yaw);
1609}
1610
1611/** Get l_elbow_roll value.
1612 * Left elbow roll
1613 * @return l_elbow_roll value
1614 */
1615float
1617{
1618 return data->l_elbow_roll;
1619}
1620
1621/** Get maximum length of l_elbow_roll value.
1622 * @return length of l_elbow_roll value, can be length of the array or number of
1623 * maximum number of characters for a string
1624 */
1625size_t
1627{
1628 return 1;
1629}
1630
1631/** Set l_elbow_roll value.
1632 * Left elbow roll
1633 * @param new_l_elbow_roll new l_elbow_roll value
1634 */
1635void
1637{
1638 set_field(data->l_elbow_roll, new_l_elbow_roll);
1639}
1640
1641/** Get l_hip_yaw_pitch value.
1642 * Left hip yaw pitch
1643 * @return l_hip_yaw_pitch value
1644 */
1645float
1647{
1648 return data->l_hip_yaw_pitch;
1649}
1650
1651/** Get maximum length of l_hip_yaw_pitch value.
1652 * @return length of l_hip_yaw_pitch value, can be length of the array or number of
1653 * maximum number of characters for a string
1654 */
1655size_t
1657{
1658 return 1;
1659}
1660
1661/** Set l_hip_yaw_pitch value.
1662 * Left hip yaw pitch
1663 * @param new_l_hip_yaw_pitch new l_hip_yaw_pitch value
1664 */
1665void
1667{
1668 set_field(data->l_hip_yaw_pitch, new_l_hip_yaw_pitch);
1669}
1670
1671/** Get l_hip_roll value.
1672 * Left hip roll
1673 * @return l_hip_roll value
1674 */
1675float
1677{
1678 return data->l_hip_roll;
1679}
1680
1681/** Get maximum length of l_hip_roll value.
1682 * @return length of l_hip_roll value, can be length of the array or number of
1683 * maximum number of characters for a string
1684 */
1685size_t
1687{
1688 return 1;
1689}
1690
1691/** Set l_hip_roll value.
1692 * Left hip roll
1693 * @param new_l_hip_roll new l_hip_roll value
1694 */
1695void
1697{
1698 set_field(data->l_hip_roll, new_l_hip_roll);
1699}
1700
1701/** Get l_hip_pitch value.
1702 * Left hip pitch
1703 * @return l_hip_pitch value
1704 */
1705float
1707{
1708 return data->l_hip_pitch;
1709}
1710
1711/** Get maximum length of l_hip_pitch value.
1712 * @return length of l_hip_pitch value, can be length of the array or number of
1713 * maximum number of characters for a string
1714 */
1715size_t
1717{
1718 return 1;
1719}
1720
1721/** Set l_hip_pitch value.
1722 * Left hip pitch
1723 * @param new_l_hip_pitch new l_hip_pitch value
1724 */
1725void
1727{
1728 set_field(data->l_hip_pitch, new_l_hip_pitch);
1729}
1730
1731/** Get l_knee_pitch value.
1732 * Left knee pitch
1733 * @return l_knee_pitch value
1734 */
1735float
1737{
1738 return data->l_knee_pitch;
1739}
1740
1741/** Get maximum length of l_knee_pitch value.
1742 * @return length of l_knee_pitch value, can be length of the array or number of
1743 * maximum number of characters for a string
1744 */
1745size_t
1747{
1748 return 1;
1749}
1750
1751/** Set l_knee_pitch value.
1752 * Left knee pitch
1753 * @param new_l_knee_pitch new l_knee_pitch value
1754 */
1755void
1757{
1758 set_field(data->l_knee_pitch, new_l_knee_pitch);
1759}
1760
1761/** Get l_ankle_pitch value.
1762 * Left ankle pitch
1763 * @return l_ankle_pitch value
1764 */
1765float
1767{
1768 return data->l_ankle_pitch;
1769}
1770
1771/** Get maximum length of l_ankle_pitch value.
1772 * @return length of l_ankle_pitch value, can be length of the array or number of
1773 * maximum number of characters for a string
1774 */
1775size_t
1777{
1778 return 1;
1779}
1780
1781/** Set l_ankle_pitch value.
1782 * Left ankle pitch
1783 * @param new_l_ankle_pitch new l_ankle_pitch value
1784 */
1785void
1787{
1788 set_field(data->l_ankle_pitch, new_l_ankle_pitch);
1789}
1790
1791/** Get l_ankle_roll value.
1792 * Left ankle roll
1793 * @return l_ankle_roll value
1794 */
1795float
1797{
1798 return data->l_ankle_roll;
1799}
1800
1801/** Get maximum length of l_ankle_roll value.
1802 * @return length of l_ankle_roll value, can be length of the array or number of
1803 * maximum number of characters for a string
1804 */
1805size_t
1807{
1808 return 1;
1809}
1810
1811/** Set l_ankle_roll value.
1812 * Left ankle roll
1813 * @param new_l_ankle_roll new l_ankle_roll value
1814 */
1815void
1817{
1818 set_field(data->l_ankle_roll, new_l_ankle_roll);
1819}
1820
1821/** Get l_wrist_yaw value.
1822 * Left wrist yaw
1823 * @return l_wrist_yaw value
1824 */
1825float
1827{
1828 return data->l_wrist_yaw;
1829}
1830
1831/** Get maximum length of l_wrist_yaw value.
1832 * @return length of l_wrist_yaw value, can be length of the array or number of
1833 * maximum number of characters for a string
1834 */
1835size_t
1837{
1838 return 1;
1839}
1840
1841/** Set l_wrist_yaw value.
1842 * Left wrist yaw
1843 * @param new_l_wrist_yaw new l_wrist_yaw value
1844 */
1845void
1847{
1848 set_field(data->l_wrist_yaw, new_l_wrist_yaw);
1849}
1850
1851/** Get l_hand value.
1852 * Left hand
1853 * @return l_hand value
1854 */
1855float
1857{
1858 return data->l_hand;
1859}
1860
1861/** Get maximum length of l_hand value.
1862 * @return length of l_hand value, can be length of the array or number of
1863 * maximum number of characters for a string
1864 */
1865size_t
1867{
1868 return 1;
1869}
1870
1871/** Set l_hand value.
1872 * Left hand
1873 * @param new_l_hand new l_hand value
1874 */
1875void
1877{
1878 set_field(data->l_hand, new_l_hand);
1879}
1880
1881/** Get r_shoulder_pitch value.
1882 * Right shoulder pitch
1883 * @return r_shoulder_pitch value
1884 */
1885float
1887{
1888 return data->r_shoulder_pitch;
1889}
1890
1891/** Get maximum length of r_shoulder_pitch value.
1892 * @return length of r_shoulder_pitch value, can be length of the array or number of
1893 * maximum number of characters for a string
1894 */
1895size_t
1897{
1898 return 1;
1899}
1900
1901/** Set r_shoulder_pitch value.
1902 * Right shoulder pitch
1903 * @param new_r_shoulder_pitch new r_shoulder_pitch value
1904 */
1905void
1907{
1908 set_field(data->r_shoulder_pitch, new_r_shoulder_pitch);
1909}
1910
1911/** Get r_shoulder_roll value.
1912 * Right shoulder roll
1913 * @return r_shoulder_roll value
1914 */
1915float
1917{
1918 return data->r_shoulder_roll;
1919}
1920
1921/** Get maximum length of r_shoulder_roll value.
1922 * @return length of r_shoulder_roll value, can be length of the array or number of
1923 * maximum number of characters for a string
1924 */
1925size_t
1927{
1928 return 1;
1929}
1930
1931/** Set r_shoulder_roll value.
1932 * Right shoulder roll
1933 * @param new_r_shoulder_roll new r_shoulder_roll value
1934 */
1935void
1937{
1938 set_field(data->r_shoulder_roll, new_r_shoulder_roll);
1939}
1940
1941/** Get r_elbow_yaw value.
1942 * Right elbow yaw
1943 * @return r_elbow_yaw value
1944 */
1945float
1947{
1948 return data->r_elbow_yaw;
1949}
1950
1951/** Get maximum length of r_elbow_yaw value.
1952 * @return length of r_elbow_yaw value, can be length of the array or number of
1953 * maximum number of characters for a string
1954 */
1955size_t
1957{
1958 return 1;
1959}
1960
1961/** Set r_elbow_yaw value.
1962 * Right elbow yaw
1963 * @param new_r_elbow_yaw new r_elbow_yaw value
1964 */
1965void
1967{
1968 set_field(data->r_elbow_yaw, new_r_elbow_yaw);
1969}
1970
1971/** Get r_elbow_roll value.
1972 * Right elbow roll
1973 * @return r_elbow_roll value
1974 */
1975float
1977{
1978 return data->r_elbow_roll;
1979}
1980
1981/** Get maximum length of r_elbow_roll value.
1982 * @return length of r_elbow_roll value, can be length of the array or number of
1983 * maximum number of characters for a string
1984 */
1985size_t
1987{
1988 return 1;
1989}
1990
1991/** Set r_elbow_roll value.
1992 * Right elbow roll
1993 * @param new_r_elbow_roll new r_elbow_roll value
1994 */
1995void
1997{
1998 set_field(data->r_elbow_roll, new_r_elbow_roll);
1999}
2000
2001/** Get r_wrist_yaw value.
2002 * Right wrist yaw
2003 * @return r_wrist_yaw value
2004 */
2005float
2007{
2008 return data->r_wrist_yaw;
2009}
2010
2011/** Get maximum length of r_wrist_yaw value.
2012 * @return length of r_wrist_yaw value, can be length of the array or number of
2013 * maximum number of characters for a string
2014 */
2015size_t
2017{
2018 return 1;
2019}
2020
2021/** Set r_wrist_yaw value.
2022 * Right wrist yaw
2023 * @param new_r_wrist_yaw new r_wrist_yaw value
2024 */
2025void
2027{
2028 set_field(data->r_wrist_yaw, new_r_wrist_yaw);
2029}
2030
2031/** Get r_hand value.
2032 * Right hand
2033 * @return r_hand value
2034 */
2035float
2037{
2038 return data->r_hand;
2039}
2040
2041/** Get maximum length of r_hand value.
2042 * @return length of r_hand value, can be length of the array or number of
2043 * maximum number of characters for a string
2044 */
2045size_t
2047{
2048 return 1;
2049}
2050
2051/** Set r_hand value.
2052 * Right hand
2053 * @param new_r_hand new r_hand value
2054 */
2055void
2057{
2058 set_field(data->r_hand, new_r_hand);
2059}
2060
2061/** Get r_hip_yaw_pitch value.
2062 * Right hip yaw pitch
2063 * @return r_hip_yaw_pitch value
2064 */
2065float
2067{
2068 return data->r_hip_yaw_pitch;
2069}
2070
2071/** Get maximum length of r_hip_yaw_pitch value.
2072 * @return length of r_hip_yaw_pitch value, can be length of the array or number of
2073 * maximum number of characters for a string
2074 */
2075size_t
2077{
2078 return 1;
2079}
2080
2081/** Set r_hip_yaw_pitch value.
2082 * Right hip yaw pitch
2083 * @param new_r_hip_yaw_pitch new r_hip_yaw_pitch value
2084 */
2085void
2087{
2088 set_field(data->r_hip_yaw_pitch, new_r_hip_yaw_pitch);
2089}
2090
2091/** Get r_hip_roll value.
2092 * Right hip roll
2093 * @return r_hip_roll value
2094 */
2095float
2097{
2098 return data->r_hip_roll;
2099}
2100
2101/** Get maximum length of r_hip_roll value.
2102 * @return length of r_hip_roll value, can be length of the array or number of
2103 * maximum number of characters for a string
2104 */
2105size_t
2107{
2108 return 1;
2109}
2110
2111/** Set r_hip_roll value.
2112 * Right hip roll
2113 * @param new_r_hip_roll new r_hip_roll value
2114 */
2115void
2117{
2118 set_field(data->r_hip_roll, new_r_hip_roll);
2119}
2120
2121/** Get r_hip_pitch value.
2122 * Right hip pitch
2123 * @return r_hip_pitch value
2124 */
2125float
2127{
2128 return data->r_hip_pitch;
2129}
2130
2131/** Get maximum length of r_hip_pitch value.
2132 * @return length of r_hip_pitch value, can be length of the array or number of
2133 * maximum number of characters for a string
2134 */
2135size_t
2137{
2138 return 1;
2139}
2140
2141/** Set r_hip_pitch value.
2142 * Right hip pitch
2143 * @param new_r_hip_pitch new r_hip_pitch value
2144 */
2145void
2147{
2148 set_field(data->r_hip_pitch, new_r_hip_pitch);
2149}
2150
2151/** Get r_knee_pitch value.
2152 * Right knee pitch
2153 * @return r_knee_pitch value
2154 */
2155float
2157{
2158 return data->r_knee_pitch;
2159}
2160
2161/** Get maximum length of r_knee_pitch value.
2162 * @return length of r_knee_pitch value, can be length of the array or number of
2163 * maximum number of characters for a string
2164 */
2165size_t
2167{
2168 return 1;
2169}
2170
2171/** Set r_knee_pitch value.
2172 * Right knee pitch
2173 * @param new_r_knee_pitch new r_knee_pitch value
2174 */
2175void
2177{
2178 set_field(data->r_knee_pitch, new_r_knee_pitch);
2179}
2180
2181/** Get r_ankle_pitch value.
2182 * Right ankle pitch
2183 * @return r_ankle_pitch value
2184 */
2185float
2187{
2188 return data->r_ankle_pitch;
2189}
2190
2191/** Get maximum length of r_ankle_pitch value.
2192 * @return length of r_ankle_pitch value, can be length of the array or number of
2193 * maximum number of characters for a string
2194 */
2195size_t
2197{
2198 return 1;
2199}
2200
2201/** Set r_ankle_pitch value.
2202 * Right ankle pitch
2203 * @param new_r_ankle_pitch new r_ankle_pitch value
2204 */
2205void
2207{
2208 set_field(data->r_ankle_pitch, new_r_ankle_pitch);
2209}
2210
2211/** Get r_ankle_roll value.
2212 * Right ankle roll
2213 * @return r_ankle_roll value
2214 */
2215float
2217{
2218 return data->r_ankle_roll;
2219}
2220
2221/** Get maximum length of r_ankle_roll value.
2222 * @return length of r_ankle_roll value, can be length of the array or number of
2223 * maximum number of characters for a string
2224 */
2225size_t
2227{
2228 return 1;
2229}
2230
2231/** Set r_ankle_roll value.
2232 * Right ankle roll
2233 * @param new_r_ankle_roll new r_ankle_roll value
2234 */
2235void
2237{
2238 set_field(data->r_ankle_roll, new_r_ankle_roll);
2239}
2240
2241/** Get time value.
2242 *
2243 Current reference time in ms. For real hardware this is the DCM time.
2244 Times in messages are always offsets to the current time and the current
2245 time is added before executing the command.
2246
2247 * @return time value
2248 */
2249int32_t
2251{
2252 return data->time;
2253}
2254
2255/** Get maximum length of time value.
2256 * @return length of time value, can be length of the array or number of
2257 * maximum number of characters for a string
2258 */
2259size_t
2261{
2262 return 1;
2263}
2264
2265/** Set time value.
2266 *
2267 Current reference time in ms. For real hardware this is the DCM time.
2268 Times in messages are always offsets to the current time and the current
2269 time is added before executing the command.
2270
2271 * @param new_time new time value
2272 */
2273void
2275{
2276 set_field(data->time, new_time);
2277}
2278
2279/** Clone this message.
2280 * Produces a message of the same type as this message and copies the
2281 * data to the new message.
2282 * @return clone of this message
2283 */
2284Message *
2286{
2288}
2289/** @class NaoJointPositionInterface::MoveServoMessage <interfaces/NaoJointPositionInterface.h>
2290 * MoveServoMessage Fawkes BlackBoard Interface Message.
2291 *
2292
2293 */
2294
2295
2296/** Constructor with initial values.
2297 * @param ini_servo initial value for servo
2298 * @param ini_value initial value for value
2299 * @param ini_speed initial value for speed
2300 */
2301NaoJointPositionInterface::MoveServoMessage::MoveServoMessage(const uint32_t ini_servo, const float ini_value, const float ini_speed) : Message("MoveServoMessage")
2302{
2303 data_size = sizeof(MoveServoMessage_data_t);
2304 data_ptr = malloc(data_size);
2305 memset(data_ptr, 0, data_size);
2306 data = (MoveServoMessage_data_t *)data_ptr;
2308 data->servo = ini_servo;
2309 data->value = ini_value;
2310 data->speed = ini_speed;
2311 enum_map_RobotType[(int)ROBOTYPE_ACADEMIC] = "ROBOTYPE_ACADEMIC";
2312 enum_map_RobotType[(int)ROBOTYPE_ROBOCUP] = "ROBOTYPE_ROBOCUP";
2313 add_fieldinfo(IFT_UINT32, "servo", 1, &data->servo);
2314 add_fieldinfo(IFT_FLOAT, "value", 1, &data->value);
2315 add_fieldinfo(IFT_FLOAT, "speed", 1, &data->speed);
2316}
2317/** Constructor */
2319{
2320 data_size = sizeof(MoveServoMessage_data_t);
2321 data_ptr = malloc(data_size);
2322 memset(data_ptr, 0, data_size);
2323 data = (MoveServoMessage_data_t *)data_ptr;
2325 enum_map_RobotType[(int)ROBOTYPE_ACADEMIC] = "ROBOTYPE_ACADEMIC";
2326 enum_map_RobotType[(int)ROBOTYPE_ROBOCUP] = "ROBOTYPE_ROBOCUP";
2327 add_fieldinfo(IFT_UINT32, "servo", 1, &data->servo);
2328 add_fieldinfo(IFT_FLOAT, "value", 1, &data->value);
2329 add_fieldinfo(IFT_FLOAT, "speed", 1, &data->speed);
2330}
2331
2332/** Destructor */
2334{
2335 free(data_ptr);
2336}
2337
2338/** Copy constructor.
2339 * @param m message to copy from
2340 */
2342{
2343 data_size = m->data_size;
2344 data_ptr = malloc(data_size);
2345 memcpy(data_ptr, m->data_ptr, data_size);
2346 data = (MoveServoMessage_data_t *)data_ptr;
2348}
2349
2350/* Methods */
2351/** Get servo value.
2352 *
2353 A concatenated list of SERVO_* constants to define the servos
2354 that should execute the movement. The list shall consist of
2355 binary or'ed SERVO_* constants.
2356
2357 * @return servo value
2358 */
2359uint32_t
2361{
2362 return data->servo;
2363}
2364
2365/** Get maximum length of servo value.
2366 * @return length of servo value, can be length of the array or number of
2367 * maximum number of characters for a string
2368 */
2369size_t
2371{
2372 return 1;
2373}
2374
2375/** Set servo value.
2376 *
2377 A concatenated list of SERVO_* constants to define the servos
2378 that should execute the movement. The list shall consist of
2379 binary or'ed SERVO_* constants.
2380
2381 * @param new_servo new servo value
2382 */
2383void
2385{
2386 set_field(data->servo, new_servo);
2387}
2388
2389/** Get value value.
2390 * Servo value to set for servos.
2391 * @return value value
2392 */
2393float
2395{
2396 return data->value;
2397}
2398
2399/** Get maximum length of value value.
2400 * @return length of value value, can be length of the array or number of
2401 * maximum number of characters for a string
2402 */
2403size_t
2405{
2406 return 1;
2407}
2408
2409/** Set value value.
2410 * Servo value to set for servos.
2411 * @param new_value new value value
2412 */
2413void
2415{
2416 set_field(data->value, new_value);
2417}
2418
2419/** Get speed value.
2420 *
2421 Fraction of max speed in range [0.0..1.0].
2422
2423 * @return speed value
2424 */
2425float
2427{
2428 return data->speed;
2429}
2430
2431/** Get maximum length of speed value.
2432 * @return length of speed value, can be length of the array or number of
2433 * maximum number of characters for a string
2434 */
2435size_t
2437{
2438 return 1;
2439}
2440
2441/** Set speed value.
2442 *
2443 Fraction of max speed in range [0.0..1.0].
2444
2445 * @param new_speed new speed value
2446 */
2447void
2449{
2450 set_field(data->speed, new_speed);
2451}
2452
2453/** Clone this message.
2454 * Produces a message of the same type as this message and copies the
2455 * data to the new message.
2456 * @return clone of this message
2457 */
2458Message *
2460{
2462}
2463/** @class NaoJointPositionInterface::MoveServosMessage <interfaces/NaoJointPositionInterface.h>
2464 * MoveServosMessage Fawkes BlackBoard Interface Message.
2465 *
2466
2467 */
2468
2469
2470/** Constructor with initial values.
2471 * @param ini_speed initial value for speed
2472 * @param ini_head_yaw initial value for head_yaw
2473 * @param ini_head_pitch initial value for head_pitch
2474 * @param ini_l_shoulder_pitch initial value for l_shoulder_pitch
2475 * @param ini_l_shoulder_roll initial value for l_shoulder_roll
2476 * @param ini_l_elbow_yaw initial value for l_elbow_yaw
2477 * @param ini_l_elbow_roll initial value for l_elbow_roll
2478 * @param ini_l_wrist_yaw initial value for l_wrist_yaw
2479 * @param ini_l_hand initial value for l_hand
2480 * @param ini_l_hip_yaw_pitch initial value for l_hip_yaw_pitch
2481 * @param ini_l_hip_roll initial value for l_hip_roll
2482 * @param ini_l_hip_pitch initial value for l_hip_pitch
2483 * @param ini_l_knee_pitch initial value for l_knee_pitch
2484 * @param ini_l_ankle_pitch initial value for l_ankle_pitch
2485 * @param ini_l_ankle_roll initial value for l_ankle_roll
2486 * @param ini_r_shoulder_pitch initial value for r_shoulder_pitch
2487 * @param ini_r_shoulder_roll initial value for r_shoulder_roll
2488 * @param ini_r_elbow_yaw initial value for r_elbow_yaw
2489 * @param ini_r_elbow_roll initial value for r_elbow_roll
2490 * @param ini_r_wrist_yaw initial value for r_wrist_yaw
2491 * @param ini_r_hand initial value for r_hand
2492 * @param ini_r_hip_yaw_pitch initial value for r_hip_yaw_pitch
2493 * @param ini_r_hip_roll initial value for r_hip_roll
2494 * @param ini_r_hip_pitch initial value for r_hip_pitch
2495 * @param ini_r_knee_pitch initial value for r_knee_pitch
2496 * @param ini_r_ankle_pitch initial value for r_ankle_pitch
2497 * @param ini_r_ankle_roll initial value for r_ankle_roll
2498 */
2499NaoJointPositionInterface::MoveServosMessage::MoveServosMessage(const float ini_speed, const float ini_head_yaw, const float ini_head_pitch, const float ini_l_shoulder_pitch, const float ini_l_shoulder_roll, const float ini_l_elbow_yaw, const float ini_l_elbow_roll, const float ini_l_wrist_yaw, const float ini_l_hand, const float ini_l_hip_yaw_pitch, const float ini_l_hip_roll, const float ini_l_hip_pitch, const float ini_l_knee_pitch, const float ini_l_ankle_pitch, const float ini_l_ankle_roll, const float ini_r_shoulder_pitch, const float ini_r_shoulder_roll, const float ini_r_elbow_yaw, const float ini_r_elbow_roll, const float ini_r_wrist_yaw, const float ini_r_hand, const float ini_r_hip_yaw_pitch, const float ini_r_hip_roll, const float ini_r_hip_pitch, const float ini_r_knee_pitch, const float ini_r_ankle_pitch, const float ini_r_ankle_roll) : Message("MoveServosMessage")
2500{
2501 data_size = sizeof(MoveServosMessage_data_t);
2502 data_ptr = malloc(data_size);
2503 memset(data_ptr, 0, data_size);
2504 data = (MoveServosMessage_data_t *)data_ptr;
2506 data->speed = ini_speed;
2507 data->head_yaw = ini_head_yaw;
2508 data->head_pitch = ini_head_pitch;
2509 data->l_shoulder_pitch = ini_l_shoulder_pitch;
2510 data->l_shoulder_roll = ini_l_shoulder_roll;
2511 data->l_elbow_yaw = ini_l_elbow_yaw;
2512 data->l_elbow_roll = ini_l_elbow_roll;
2513 data->l_wrist_yaw = ini_l_wrist_yaw;
2514 data->l_hand = ini_l_hand;
2515 data->l_hip_yaw_pitch = ini_l_hip_yaw_pitch;
2516 data->l_hip_roll = ini_l_hip_roll;
2517 data->l_hip_pitch = ini_l_hip_pitch;
2518 data->l_knee_pitch = ini_l_knee_pitch;
2519 data->l_ankle_pitch = ini_l_ankle_pitch;
2520 data->l_ankle_roll = ini_l_ankle_roll;
2521 data->r_shoulder_pitch = ini_r_shoulder_pitch;
2522 data->r_shoulder_roll = ini_r_shoulder_roll;
2523 data->r_elbow_yaw = ini_r_elbow_yaw;
2524 data->r_elbow_roll = ini_r_elbow_roll;
2525 data->r_wrist_yaw = ini_r_wrist_yaw;
2526 data->r_hand = ini_r_hand;
2527 data->r_hip_yaw_pitch = ini_r_hip_yaw_pitch;
2528 data->r_hip_roll = ini_r_hip_roll;
2529 data->r_hip_pitch = ini_r_hip_pitch;
2530 data->r_knee_pitch = ini_r_knee_pitch;
2531 data->r_ankle_pitch = ini_r_ankle_pitch;
2532 data->r_ankle_roll = ini_r_ankle_roll;
2533 enum_map_RobotType[(int)ROBOTYPE_ACADEMIC] = "ROBOTYPE_ACADEMIC";
2534 enum_map_RobotType[(int)ROBOTYPE_ROBOCUP] = "ROBOTYPE_ROBOCUP";
2535 add_fieldinfo(IFT_FLOAT, "speed", 1, &data->speed);
2536 add_fieldinfo(IFT_FLOAT, "head_yaw", 1, &data->head_yaw);
2537 add_fieldinfo(IFT_FLOAT, "head_pitch", 1, &data->head_pitch);
2538 add_fieldinfo(IFT_FLOAT, "l_shoulder_pitch", 1, &data->l_shoulder_pitch);
2539 add_fieldinfo(IFT_FLOAT, "l_shoulder_roll", 1, &data->l_shoulder_roll);
2540 add_fieldinfo(IFT_FLOAT, "l_elbow_yaw", 1, &data->l_elbow_yaw);
2541 add_fieldinfo(IFT_FLOAT, "l_elbow_roll", 1, &data->l_elbow_roll);
2542 add_fieldinfo(IFT_FLOAT, "l_wrist_yaw", 1, &data->l_wrist_yaw);
2543 add_fieldinfo(IFT_FLOAT, "l_hand", 1, &data->l_hand);
2544 add_fieldinfo(IFT_FLOAT, "l_hip_yaw_pitch", 1, &data->l_hip_yaw_pitch);
2545 add_fieldinfo(IFT_FLOAT, "l_hip_roll", 1, &data->l_hip_roll);
2546 add_fieldinfo(IFT_FLOAT, "l_hip_pitch", 1, &data->l_hip_pitch);
2547 add_fieldinfo(IFT_FLOAT, "l_knee_pitch", 1, &data->l_knee_pitch);
2548 add_fieldinfo(IFT_FLOAT, "l_ankle_pitch", 1, &data->l_ankle_pitch);
2549 add_fieldinfo(IFT_FLOAT, "l_ankle_roll", 1, &data->l_ankle_roll);
2550 add_fieldinfo(IFT_FLOAT, "r_shoulder_pitch", 1, &data->r_shoulder_pitch);
2551 add_fieldinfo(IFT_FLOAT, "r_shoulder_roll", 1, &data->r_shoulder_roll);
2552 add_fieldinfo(IFT_FLOAT, "r_elbow_yaw", 1, &data->r_elbow_yaw);
2553 add_fieldinfo(IFT_FLOAT, "r_elbow_roll", 1, &data->r_elbow_roll);
2554 add_fieldinfo(IFT_FLOAT, "r_wrist_yaw", 1, &data->r_wrist_yaw);
2555 add_fieldinfo(IFT_FLOAT, "r_hand", 1, &data->r_hand);
2556 add_fieldinfo(IFT_FLOAT, "r_hip_yaw_pitch", 1, &data->r_hip_yaw_pitch);
2557 add_fieldinfo(IFT_FLOAT, "r_hip_roll", 1, &data->r_hip_roll);
2558 add_fieldinfo(IFT_FLOAT, "r_hip_pitch", 1, &data->r_hip_pitch);
2559 add_fieldinfo(IFT_FLOAT, "r_knee_pitch", 1, &data->r_knee_pitch);
2560 add_fieldinfo(IFT_FLOAT, "r_ankle_pitch", 1, &data->r_ankle_pitch);
2561 add_fieldinfo(IFT_FLOAT, "r_ankle_roll", 1, &data->r_ankle_roll);
2562}
2563/** Constructor */
2565{
2566 data_size = sizeof(MoveServosMessage_data_t);
2567 data_ptr = malloc(data_size);
2568 memset(data_ptr, 0, data_size);
2569 data = (MoveServosMessage_data_t *)data_ptr;
2571 enum_map_RobotType[(int)ROBOTYPE_ACADEMIC] = "ROBOTYPE_ACADEMIC";
2572 enum_map_RobotType[(int)ROBOTYPE_ROBOCUP] = "ROBOTYPE_ROBOCUP";
2573 add_fieldinfo(IFT_FLOAT, "speed", 1, &data->speed);
2574 add_fieldinfo(IFT_FLOAT, "head_yaw", 1, &data->head_yaw);
2575 add_fieldinfo(IFT_FLOAT, "head_pitch", 1, &data->head_pitch);
2576 add_fieldinfo(IFT_FLOAT, "l_shoulder_pitch", 1, &data->l_shoulder_pitch);
2577 add_fieldinfo(IFT_FLOAT, "l_shoulder_roll", 1, &data->l_shoulder_roll);
2578 add_fieldinfo(IFT_FLOAT, "l_elbow_yaw", 1, &data->l_elbow_yaw);
2579 add_fieldinfo(IFT_FLOAT, "l_elbow_roll", 1, &data->l_elbow_roll);
2580 add_fieldinfo(IFT_FLOAT, "l_wrist_yaw", 1, &data->l_wrist_yaw);
2581 add_fieldinfo(IFT_FLOAT, "l_hand", 1, &data->l_hand);
2582 add_fieldinfo(IFT_FLOAT, "l_hip_yaw_pitch", 1, &data->l_hip_yaw_pitch);
2583 add_fieldinfo(IFT_FLOAT, "l_hip_roll", 1, &data->l_hip_roll);
2584 add_fieldinfo(IFT_FLOAT, "l_hip_pitch", 1, &data->l_hip_pitch);
2585 add_fieldinfo(IFT_FLOAT, "l_knee_pitch", 1, &data->l_knee_pitch);
2586 add_fieldinfo(IFT_FLOAT, "l_ankle_pitch", 1, &data->l_ankle_pitch);
2587 add_fieldinfo(IFT_FLOAT, "l_ankle_roll", 1, &data->l_ankle_roll);
2588 add_fieldinfo(IFT_FLOAT, "r_shoulder_pitch", 1, &data->r_shoulder_pitch);
2589 add_fieldinfo(IFT_FLOAT, "r_shoulder_roll", 1, &data->r_shoulder_roll);
2590 add_fieldinfo(IFT_FLOAT, "r_elbow_yaw", 1, &data->r_elbow_yaw);
2591 add_fieldinfo(IFT_FLOAT, "r_elbow_roll", 1, &data->r_elbow_roll);
2592 add_fieldinfo(IFT_FLOAT, "r_wrist_yaw", 1, &data->r_wrist_yaw);
2593 add_fieldinfo(IFT_FLOAT, "r_hand", 1, &data->r_hand);
2594 add_fieldinfo(IFT_FLOAT, "r_hip_yaw_pitch", 1, &data->r_hip_yaw_pitch);
2595 add_fieldinfo(IFT_FLOAT, "r_hip_roll", 1, &data->r_hip_roll);
2596 add_fieldinfo(IFT_FLOAT, "r_hip_pitch", 1, &data->r_hip_pitch);
2597 add_fieldinfo(IFT_FLOAT, "r_knee_pitch", 1, &data->r_knee_pitch);
2598 add_fieldinfo(IFT_FLOAT, "r_ankle_pitch", 1, &data->r_ankle_pitch);
2599 add_fieldinfo(IFT_FLOAT, "r_ankle_roll", 1, &data->r_ankle_roll);
2600}
2601
2602/** Destructor */
2604{
2605 free(data_ptr);
2606}
2607
2608/** Copy constructor.
2609 * @param m message to copy from
2610 */
2612{
2613 data_size = m->data_size;
2614 data_ptr = malloc(data_size);
2615 memcpy(data_ptr, m->data_ptr, data_size);
2616 data = (MoveServosMessage_data_t *)data_ptr;
2618}
2619
2620/* Methods */
2621/** Get speed value.
2622 *
2623 Fraction of max speed in range [0.0..1.0].
2624
2625 * @return speed value
2626 */
2627float
2629{
2630 return data->speed;
2631}
2632
2633/** Get maximum length of speed value.
2634 * @return length of speed value, can be length of the array or number of
2635 * maximum number of characters for a string
2636 */
2637size_t
2639{
2640 return 1;
2641}
2642
2643/** Set speed value.
2644 *
2645 Fraction of max speed in range [0.0..1.0].
2646
2647 * @param new_speed new speed value
2648 */
2649void
2651{
2652 set_field(data->speed, new_speed);
2653}
2654
2655/** Get head_yaw value.
2656 * Head yaw
2657 * @return head_yaw value
2658 */
2659float
2661{
2662 return data->head_yaw;
2663}
2664
2665/** Get maximum length of head_yaw value.
2666 * @return length of head_yaw value, can be length of the array or number of
2667 * maximum number of characters for a string
2668 */
2669size_t
2671{
2672 return 1;
2673}
2674
2675/** Set head_yaw value.
2676 * Head yaw
2677 * @param new_head_yaw new head_yaw value
2678 */
2679void
2681{
2682 set_field(data->head_yaw, new_head_yaw);
2683}
2684
2685/** Get head_pitch value.
2686 * Head pitch
2687 * @return head_pitch value
2688 */
2689float
2691{
2692 return data->head_pitch;
2693}
2694
2695/** Get maximum length of head_pitch value.
2696 * @return length of head_pitch value, can be length of the array or number of
2697 * maximum number of characters for a string
2698 */
2699size_t
2701{
2702 return 1;
2703}
2704
2705/** Set head_pitch value.
2706 * Head pitch
2707 * @param new_head_pitch new head_pitch value
2708 */
2709void
2711{
2712 set_field(data->head_pitch, new_head_pitch);
2713}
2714
2715/** Get l_shoulder_pitch value.
2716 * Left shoulder pitch
2717 * @return l_shoulder_pitch value
2718 */
2719float
2721{
2722 return data->l_shoulder_pitch;
2723}
2724
2725/** Get maximum length of l_shoulder_pitch value.
2726 * @return length of l_shoulder_pitch value, can be length of the array or number of
2727 * maximum number of characters for a string
2728 */
2729size_t
2731{
2732 return 1;
2733}
2734
2735/** Set l_shoulder_pitch value.
2736 * Left shoulder pitch
2737 * @param new_l_shoulder_pitch new l_shoulder_pitch value
2738 */
2739void
2741{
2742 set_field(data->l_shoulder_pitch, new_l_shoulder_pitch);
2743}
2744
2745/** Get l_shoulder_roll value.
2746 * Left shoulder roll
2747 * @return l_shoulder_roll value
2748 */
2749float
2751{
2752 return data->l_shoulder_roll;
2753}
2754
2755/** Get maximum length of l_shoulder_roll value.
2756 * @return length of l_shoulder_roll value, can be length of the array or number of
2757 * maximum number of characters for a string
2758 */
2759size_t
2761{
2762 return 1;
2763}
2764
2765/** Set l_shoulder_roll value.
2766 * Left shoulder roll
2767 * @param new_l_shoulder_roll new l_shoulder_roll value
2768 */
2769void
2771{
2772 set_field(data->l_shoulder_roll, new_l_shoulder_roll);
2773}
2774
2775/** Get l_elbow_yaw value.
2776 * Left elbow yaw
2777 * @return l_elbow_yaw value
2778 */
2779float
2781{
2782 return data->l_elbow_yaw;
2783}
2784
2785/** Get maximum length of l_elbow_yaw value.
2786 * @return length of l_elbow_yaw value, can be length of the array or number of
2787 * maximum number of characters for a string
2788 */
2789size_t
2791{
2792 return 1;
2793}
2794
2795/** Set l_elbow_yaw value.
2796 * Left elbow yaw
2797 * @param new_l_elbow_yaw new l_elbow_yaw value
2798 */
2799void
2801{
2802 set_field(data->l_elbow_yaw, new_l_elbow_yaw);
2803}
2804
2805/** Get l_elbow_roll value.
2806 * Left elbow roll
2807 * @return l_elbow_roll value
2808 */
2809float
2811{
2812 return data->l_elbow_roll;
2813}
2814
2815/** Get maximum length of l_elbow_roll value.
2816 * @return length of l_elbow_roll value, can be length of the array or number of
2817 * maximum number of characters for a string
2818 */
2819size_t
2821{
2822 return 1;
2823}
2824
2825/** Set l_elbow_roll value.
2826 * Left elbow roll
2827 * @param new_l_elbow_roll new l_elbow_roll value
2828 */
2829void
2831{
2832 set_field(data->l_elbow_roll, new_l_elbow_roll);
2833}
2834
2835/** Get l_wrist_yaw value.
2836 * Left wrist yaw
2837 * @return l_wrist_yaw value
2838 */
2839float
2841{
2842 return data->l_wrist_yaw;
2843}
2844
2845/** Get maximum length of l_wrist_yaw value.
2846 * @return length of l_wrist_yaw value, can be length of the array or number of
2847 * maximum number of characters for a string
2848 */
2849size_t
2851{
2852 return 1;
2853}
2854
2855/** Set l_wrist_yaw value.
2856 * Left wrist yaw
2857 * @param new_l_wrist_yaw new l_wrist_yaw value
2858 */
2859void
2861{
2862 set_field(data->l_wrist_yaw, new_l_wrist_yaw);
2863}
2864
2865/** Get l_hand value.
2866 * Left hand
2867 * @return l_hand value
2868 */
2869float
2871{
2872 return data->l_hand;
2873}
2874
2875/** Get maximum length of l_hand value.
2876 * @return length of l_hand value, can be length of the array or number of
2877 * maximum number of characters for a string
2878 */
2879size_t
2881{
2882 return 1;
2883}
2884
2885/** Set l_hand value.
2886 * Left hand
2887 * @param new_l_hand new l_hand value
2888 */
2889void
2891{
2892 set_field(data->l_hand, new_l_hand);
2893}
2894
2895/** Get l_hip_yaw_pitch value.
2896 * Left hip yaw pitch
2897 * @return l_hip_yaw_pitch value
2898 */
2899float
2901{
2902 return data->l_hip_yaw_pitch;
2903}
2904
2905/** Get maximum length of l_hip_yaw_pitch value.
2906 * @return length of l_hip_yaw_pitch value, can be length of the array or number of
2907 * maximum number of characters for a string
2908 */
2909size_t
2911{
2912 return 1;
2913}
2914
2915/** Set l_hip_yaw_pitch value.
2916 * Left hip yaw pitch
2917 * @param new_l_hip_yaw_pitch new l_hip_yaw_pitch value
2918 */
2919void
2921{
2922 set_field(data->l_hip_yaw_pitch, new_l_hip_yaw_pitch);
2923}
2924
2925/** Get l_hip_roll value.
2926 * Left hip roll
2927 * @return l_hip_roll value
2928 */
2929float
2931{
2932 return data->l_hip_roll;
2933}
2934
2935/** Get maximum length of l_hip_roll value.
2936 * @return length of l_hip_roll value, can be length of the array or number of
2937 * maximum number of characters for a string
2938 */
2939size_t
2941{
2942 return 1;
2943}
2944
2945/** Set l_hip_roll value.
2946 * Left hip roll
2947 * @param new_l_hip_roll new l_hip_roll value
2948 */
2949void
2951{
2952 set_field(data->l_hip_roll, new_l_hip_roll);
2953}
2954
2955/** Get l_hip_pitch value.
2956 * Left hip pitch
2957 * @return l_hip_pitch value
2958 */
2959float
2961{
2962 return data->l_hip_pitch;
2963}
2964
2965/** Get maximum length of l_hip_pitch value.
2966 * @return length of l_hip_pitch value, can be length of the array or number of
2967 * maximum number of characters for a string
2968 */
2969size_t
2971{
2972 return 1;
2973}
2974
2975/** Set l_hip_pitch value.
2976 * Left hip pitch
2977 * @param new_l_hip_pitch new l_hip_pitch value
2978 */
2979void
2981{
2982 set_field(data->l_hip_pitch, new_l_hip_pitch);
2983}
2984
2985/** Get l_knee_pitch value.
2986 * Left knee pitch
2987 * @return l_knee_pitch value
2988 */
2989float
2991{
2992 return data->l_knee_pitch;
2993}
2994
2995/** Get maximum length of l_knee_pitch value.
2996 * @return length of l_knee_pitch value, can be length of the array or number of
2997 * maximum number of characters for a string
2998 */
2999size_t
3001{
3002 return 1;
3003}
3004
3005/** Set l_knee_pitch value.
3006 * Left knee pitch
3007 * @param new_l_knee_pitch new l_knee_pitch value
3008 */
3009void
3011{
3012 set_field(data->l_knee_pitch, new_l_knee_pitch);
3013}
3014
3015/** Get l_ankle_pitch value.
3016 * Left ankle pitch
3017 * @return l_ankle_pitch value
3018 */
3019float
3021{
3022 return data->l_ankle_pitch;
3023}
3024
3025/** Get maximum length of l_ankle_pitch value.
3026 * @return length of l_ankle_pitch value, can be length of the array or number of
3027 * maximum number of characters for a string
3028 */
3029size_t
3031{
3032 return 1;
3033}
3034
3035/** Set l_ankle_pitch value.
3036 * Left ankle pitch
3037 * @param new_l_ankle_pitch new l_ankle_pitch value
3038 */
3039void
3041{
3042 set_field(data->l_ankle_pitch, new_l_ankle_pitch);
3043}
3044
3045/** Get l_ankle_roll value.
3046 * Left ankle roll
3047 * @return l_ankle_roll value
3048 */
3049float
3051{
3052 return data->l_ankle_roll;
3053}
3054
3055/** Get maximum length of l_ankle_roll value.
3056 * @return length of l_ankle_roll value, can be length of the array or number of
3057 * maximum number of characters for a string
3058 */
3059size_t
3061{
3062 return 1;
3063}
3064
3065/** Set l_ankle_roll value.
3066 * Left ankle roll
3067 * @param new_l_ankle_roll new l_ankle_roll value
3068 */
3069void
3071{
3072 set_field(data->l_ankle_roll, new_l_ankle_roll);
3073}
3074
3075/** Get r_shoulder_pitch value.
3076 * Right shoulder pitch
3077 * @return r_shoulder_pitch value
3078 */
3079float
3081{
3082 return data->r_shoulder_pitch;
3083}
3084
3085/** Get maximum length of r_shoulder_pitch value.
3086 * @return length of r_shoulder_pitch value, can be length of the array or number of
3087 * maximum number of characters for a string
3088 */
3089size_t
3091{
3092 return 1;
3093}
3094
3095/** Set r_shoulder_pitch value.
3096 * Right shoulder pitch
3097 * @param new_r_shoulder_pitch new r_shoulder_pitch value
3098 */
3099void
3101{
3102 set_field(data->r_shoulder_pitch, new_r_shoulder_pitch);
3103}
3104
3105/** Get r_shoulder_roll value.
3106 * Right shoulder roll
3107 * @return r_shoulder_roll value
3108 */
3109float
3111{
3112 return data->r_shoulder_roll;
3113}
3114
3115/** Get maximum length of r_shoulder_roll value.
3116 * @return length of r_shoulder_roll value, can be length of the array or number of
3117 * maximum number of characters for a string
3118 */
3119size_t
3121{
3122 return 1;
3123}
3124
3125/** Set r_shoulder_roll value.
3126 * Right shoulder roll
3127 * @param new_r_shoulder_roll new r_shoulder_roll value
3128 */
3129void
3131{
3132 set_field(data->r_shoulder_roll, new_r_shoulder_roll);
3133}
3134
3135/** Get r_elbow_yaw value.
3136 * Right elbow yaw
3137 * @return r_elbow_yaw value
3138 */
3139float
3141{
3142 return data->r_elbow_yaw;
3143}
3144
3145/** Get maximum length of r_elbow_yaw value.
3146 * @return length of r_elbow_yaw value, can be length of the array or number of
3147 * maximum number of characters for a string
3148 */
3149size_t
3151{
3152 return 1;
3153}
3154
3155/** Set r_elbow_yaw value.
3156 * Right elbow yaw
3157 * @param new_r_elbow_yaw new r_elbow_yaw value
3158 */
3159void
3161{
3162 set_field(data->r_elbow_yaw, new_r_elbow_yaw);
3163}
3164
3165/** Get r_elbow_roll value.
3166 * Right elbow roll
3167 * @return r_elbow_roll value
3168 */
3169float
3171{
3172 return data->r_elbow_roll;
3173}
3174
3175/** Get maximum length of r_elbow_roll value.
3176 * @return length of r_elbow_roll value, can be length of the array or number of
3177 * maximum number of characters for a string
3178 */
3179size_t
3181{
3182 return 1;
3183}
3184
3185/** Set r_elbow_roll value.
3186 * Right elbow roll
3187 * @param new_r_elbow_roll new r_elbow_roll value
3188 */
3189void
3191{
3192 set_field(data->r_elbow_roll, new_r_elbow_roll);
3193}
3194
3195/** Get r_wrist_yaw value.
3196 * Right wrist yaw
3197 * @return r_wrist_yaw value
3198 */
3199float
3201{
3202 return data->r_wrist_yaw;
3203}
3204
3205/** Get maximum length of r_wrist_yaw value.
3206 * @return length of r_wrist_yaw value, can be length of the array or number of
3207 * maximum number of characters for a string
3208 */
3209size_t
3211{
3212 return 1;
3213}
3214
3215/** Set r_wrist_yaw value.
3216 * Right wrist yaw
3217 * @param new_r_wrist_yaw new r_wrist_yaw value
3218 */
3219void
3221{
3222 set_field(data->r_wrist_yaw, new_r_wrist_yaw);
3223}
3224
3225/** Get r_hand value.
3226 * Right hand
3227 * @return r_hand value
3228 */
3229float
3231{
3232 return data->r_hand;
3233}
3234
3235/** Get maximum length of r_hand value.
3236 * @return length of r_hand value, can be length of the array or number of
3237 * maximum number of characters for a string
3238 */
3239size_t
3241{
3242 return 1;
3243}
3244
3245/** Set r_hand value.
3246 * Right hand
3247 * @param new_r_hand new r_hand value
3248 */
3249void
3251{
3252 set_field(data->r_hand, new_r_hand);
3253}
3254
3255/** Get r_hip_yaw_pitch value.
3256 * Right hip yaw pitch
3257 * @return r_hip_yaw_pitch value
3258 */
3259float
3261{
3262 return data->r_hip_yaw_pitch;
3263}
3264
3265/** Get maximum length of r_hip_yaw_pitch value.
3266 * @return length of r_hip_yaw_pitch value, can be length of the array or number of
3267 * maximum number of characters for a string
3268 */
3269size_t
3271{
3272 return 1;
3273}
3274
3275/** Set r_hip_yaw_pitch value.
3276 * Right hip yaw pitch
3277 * @param new_r_hip_yaw_pitch new r_hip_yaw_pitch value
3278 */
3279void
3281{
3282 set_field(data->r_hip_yaw_pitch, new_r_hip_yaw_pitch);
3283}
3284
3285/** Get r_hip_roll value.
3286 * Right hip roll
3287 * @return r_hip_roll value
3288 */
3289float
3291{
3292 return data->r_hip_roll;
3293}
3294
3295/** Get maximum length of r_hip_roll value.
3296 * @return length of r_hip_roll value, can be length of the array or number of
3297 * maximum number of characters for a string
3298 */
3299size_t
3301{
3302 return 1;
3303}
3304
3305/** Set r_hip_roll value.
3306 * Right hip roll
3307 * @param new_r_hip_roll new r_hip_roll value
3308 */
3309void
3311{
3312 set_field(data->r_hip_roll, new_r_hip_roll);
3313}
3314
3315/** Get r_hip_pitch value.
3316 * Right hip pitch
3317 * @return r_hip_pitch value
3318 */
3319float
3321{
3322 return data->r_hip_pitch;
3323}
3324
3325/** Get maximum length of r_hip_pitch value.
3326 * @return length of r_hip_pitch value, can be length of the array or number of
3327 * maximum number of characters for a string
3328 */
3329size_t
3331{
3332 return 1;
3333}
3334
3335/** Set r_hip_pitch value.
3336 * Right hip pitch
3337 * @param new_r_hip_pitch new r_hip_pitch value
3338 */
3339void
3341{
3342 set_field(data->r_hip_pitch, new_r_hip_pitch);
3343}
3344
3345/** Get r_knee_pitch value.
3346 * Right knee pitch
3347 * @return r_knee_pitch value
3348 */
3349float
3351{
3352 return data->r_knee_pitch;
3353}
3354
3355/** Get maximum length of r_knee_pitch value.
3356 * @return length of r_knee_pitch value, can be length of the array or number of
3357 * maximum number of characters for a string
3358 */
3359size_t
3361{
3362 return 1;
3363}
3364
3365/** Set r_knee_pitch value.
3366 * Right knee pitch
3367 * @param new_r_knee_pitch new r_knee_pitch value
3368 */
3369void
3371{
3372 set_field(data->r_knee_pitch, new_r_knee_pitch);
3373}
3374
3375/** Get r_ankle_pitch value.
3376 * Right ankle pitch
3377 * @return r_ankle_pitch value
3378 */
3379float
3381{
3382 return data->r_ankle_pitch;
3383}
3384
3385/** Get maximum length of r_ankle_pitch value.
3386 * @return length of r_ankle_pitch value, can be length of the array or number of
3387 * maximum number of characters for a string
3388 */
3389size_t
3391{
3392 return 1;
3393}
3394
3395/** Set r_ankle_pitch value.
3396 * Right ankle pitch
3397 * @param new_r_ankle_pitch new r_ankle_pitch value
3398 */
3399void
3401{
3402 set_field(data->r_ankle_pitch, new_r_ankle_pitch);
3403}
3404
3405/** Get r_ankle_roll value.
3406 * Right ankle roll
3407 * @return r_ankle_roll value
3408 */
3409float
3411{
3412 return data->r_ankle_roll;
3413}
3414
3415/** Get maximum length of r_ankle_roll value.
3416 * @return length of r_ankle_roll value, can be length of the array or number of
3417 * maximum number of characters for a string
3418 */
3419size_t
3421{
3422 return 1;
3423}
3424
3425/** Set r_ankle_roll value.
3426 * Right ankle roll
3427 * @param new_r_ankle_roll new r_ankle_roll value
3428 */
3429void
3431{
3432 set_field(data->r_ankle_roll, new_r_ankle_roll);
3433}
3434
3435/** Clone this message.
3436 * Produces a message of the same type as this message and copies the
3437 * data to the new message.
3438 * @return clone of this message
3439 */
3440Message *
3442{
3444}
3445/** Check if message is valid and can be enqueued.
3446 * @param message Message to check
3447 * @return true if the message is valid, false otherwise.
3448 */
3449bool
3451{
3452 const SetServoMessage *m0 = dynamic_cast<const SetServoMessage *>(message);
3453 if ( m0 != NULL ) {
3454 return true;
3455 }
3456 const SetServosMessage *m1 = dynamic_cast<const SetServosMessage *>(message);
3457 if ( m1 != NULL ) {
3458 return true;
3459 }
3460 const MoveServoMessage *m2 = dynamic_cast<const MoveServoMessage *>(message);
3461 if ( m2 != NULL ) {
3462 return true;
3463 }
3464 const MoveServosMessage *m3 = dynamic_cast<const MoveServosMessage *>(message);
3465 if ( m3 != NULL ) {
3466 return true;
3467 }
3468 return false;
3469}
3470
3471/// @cond INTERNALS
3472EXPORT_INTERFACE(NaoJointPositionInterface)
3473/// @endcond
3474
3475
3476} // end namespace fawkes
Base class for exceptions in Fawkes.
Definition: exception.h:36
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:80
const char * type() const
Get type of interface.
Definition: interface.cpp:652
void * data_ptr
Pointer to local memory storage.
Definition: interface.h:244
void set_field(FieldT &field, DataT &data)
Set a field, set data_changed to true and update data_changed accordingly.
Definition: interface.h:304
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:44
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 info list.
Definition: message.cpp:435
void * data_ptr
Pointer to memory that contains local data.
Definition: message.h:146
message_data_ts_t * data_ts
data timestamp aliasing pointer
Definition: message.h:156
unsigned int data_size
Size of memory needed to hold all data.
Definition: message.h:147
MoveServoMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_speed() const
Get maximum length of speed value.
void set_speed(const float new_speed)
Set speed value.
size_t maxlenof_servo() const
Get maximum length of servo value.
size_t maxlenof_value() const
Get maximum length of value value.
void set_value(const float new_value)
Set value value.
virtual Message * clone() const
Clone this message.
void set_servo(const uint32_t new_servo)
Set servo value.
MoveServosMessage Fawkes BlackBoard Interface Message.
void set_r_wrist_yaw(const float new_r_wrist_yaw)
Set r_wrist_yaw value.
size_t maxlenof_l_knee_pitch() const
Get maximum length of l_knee_pitch value.
size_t maxlenof_l_hip_pitch() const
Get maximum length of l_hip_pitch value.
size_t maxlenof_l_hip_roll() const
Get maximum length of l_hip_roll value.
size_t maxlenof_r_hand() const
Get maximum length of r_hand value.
void set_l_shoulder_pitch(const float new_l_shoulder_pitch)
Set l_shoulder_pitch value.
size_t maxlenof_l_wrist_yaw() const
Get maximum length of l_wrist_yaw value.
size_t maxlenof_l_ankle_pitch() const
Get maximum length of l_ankle_pitch value.
size_t maxlenof_r_elbow_yaw() const
Get maximum length of r_elbow_yaw value.
void set_r_shoulder_roll(const float new_r_shoulder_roll)
Set r_shoulder_roll value.
size_t maxlenof_l_shoulder_roll() const
Get maximum length of l_shoulder_roll value.
void set_r_hand(const float new_r_hand)
Set r_hand value.
size_t maxlenof_r_ankle_pitch() const
Get maximum length of r_ankle_pitch value.
size_t maxlenof_l_elbow_yaw() const
Get maximum length of l_elbow_yaw value.
void set_l_ankle_roll(const float new_l_ankle_roll)
Set l_ankle_roll value.
void set_l_shoulder_roll(const float new_l_shoulder_roll)
Set l_shoulder_roll value.
void set_l_elbow_yaw(const float new_l_elbow_yaw)
Set l_elbow_yaw value.
size_t maxlenof_r_shoulder_roll() const
Get maximum length of r_shoulder_roll value.
void set_l_elbow_roll(const float new_l_elbow_roll)
Set l_elbow_roll value.
size_t maxlenof_l_shoulder_pitch() const
Get maximum length of l_shoulder_pitch value.
void set_r_hip_roll(const float new_r_hip_roll)
Set r_hip_roll value.
void set_head_pitch(const float new_head_pitch)
Set head_pitch value.
void set_r_elbow_yaw(const float new_r_elbow_yaw)
Set r_elbow_yaw value.
void set_l_ankle_pitch(const float new_l_ankle_pitch)
Set l_ankle_pitch value.
void set_l_wrist_yaw(const float new_l_wrist_yaw)
Set l_wrist_yaw value.
void set_r_hip_pitch(const float new_r_hip_pitch)
Set r_hip_pitch value.
size_t maxlenof_l_hip_yaw_pitch() const
Get maximum length of l_hip_yaw_pitch value.
size_t maxlenof_l_hand() const
Get maximum length of l_hand value.
size_t maxlenof_r_elbow_roll() const
Get maximum length of r_elbow_roll value.
void set_l_hip_pitch(const float new_l_hip_pitch)
Set l_hip_pitch value.
void set_r_ankle_roll(const float new_r_ankle_roll)
Set r_ankle_roll value.
size_t maxlenof_r_hip_yaw_pitch() const
Get maximum length of r_hip_yaw_pitch value.
size_t maxlenof_r_wrist_yaw() const
Get maximum length of r_wrist_yaw value.
void set_r_knee_pitch(const float new_r_knee_pitch)
Set r_knee_pitch value.
size_t maxlenof_head_yaw() const
Get maximum length of head_yaw value.
size_t maxlenof_head_pitch() const
Get maximum length of head_pitch value.
void set_r_shoulder_pitch(const float new_r_shoulder_pitch)
Set r_shoulder_pitch value.
size_t maxlenof_speed() const
Get maximum length of speed value.
void set_l_knee_pitch(const float new_l_knee_pitch)
Set l_knee_pitch value.
void set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch)
Set r_hip_yaw_pitch value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_r_knee_pitch() const
Get maximum length of r_knee_pitch value.
void set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch)
Set l_hip_yaw_pitch value.
size_t maxlenof_l_elbow_roll() const
Get maximum length of l_elbow_roll value.
size_t maxlenof_r_shoulder_pitch() const
Get maximum length of r_shoulder_pitch value.
size_t maxlenof_r_ankle_roll() const
Get maximum length of r_ankle_roll value.
void set_head_yaw(const float new_head_yaw)
Set head_yaw value.
size_t maxlenof_r_hip_roll() const
Get maximum length of r_hip_roll value.
size_t maxlenof_r_hip_pitch() const
Get maximum length of r_hip_pitch value.
size_t maxlenof_l_ankle_roll() const
Get maximum length of l_ankle_roll value.
void set_r_elbow_roll(const float new_r_elbow_roll)
Set r_elbow_roll value.
void set_speed(const float new_speed)
Set speed value.
void set_r_ankle_pitch(const float new_r_ankle_pitch)
Set r_ankle_pitch value.
void set_l_hip_roll(const float new_l_hip_roll)
Set l_hip_roll value.
void set_l_hand(const float new_l_hand)
Set l_hand value.
SetServoMessage Fawkes BlackBoard Interface Message.
void set_time(const int32_t new_time)
Set time value.
size_t maxlenof_time() const
Get maximum length of time value.
void set_servo(const uint32_t new_servo)
Set servo value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_value() const
Get maximum length of value value.
size_t maxlenof_servo() const
Get maximum length of servo value.
void set_value(const float new_value)
Set value value.
SetServosMessage Fawkes BlackBoard Interface Message.
void set_time(const int32_t new_time)
Set time value.
size_t maxlenof_l_hand() const
Get maximum length of l_hand value.
size_t maxlenof_r_shoulder_pitch() const
Get maximum length of r_shoulder_pitch value.
void set_l_ankle_pitch(const float new_l_ankle_pitch)
Set l_ankle_pitch value.
void set_r_ankle_pitch(const float new_r_ankle_pitch)
Set r_ankle_pitch value.
float l_shoulder_pitch() const
Get l_shoulder_pitch value.
size_t maxlenof_l_elbow_yaw() const
Get maximum length of l_elbow_yaw value.
size_t maxlenof_r_hip_roll() const
Get maximum length of r_hip_roll value.
size_t maxlenof_l_hip_yaw_pitch() const
Get maximum length of l_hip_yaw_pitch value.
void set_head_pitch(const float new_head_pitch)
Set head_pitch value.
size_t maxlenof_head_pitch() const
Get maximum length of head_pitch value.
size_t maxlenof_head_yaw() const
Get maximum length of head_yaw value.
size_t maxlenof_r_wrist_yaw() const
Get maximum length of r_wrist_yaw value.
float r_shoulder_pitch() const
Get r_shoulder_pitch value.
size_t maxlenof_l_ankle_pitch() const
Get maximum length of l_ankle_pitch value.
size_t maxlenof_r_ankle_pitch() const
Get maximum length of r_ankle_pitch value.
void set_l_knee_pitch(const float new_l_knee_pitch)
Set l_knee_pitch value.
void set_r_ankle_roll(const float new_r_ankle_roll)
Set r_ankle_roll value.
size_t maxlenof_r_elbow_roll() const
Get maximum length of r_elbow_roll value.
void set_r_hip_roll(const float new_r_hip_roll)
Set r_hip_roll value.
size_t maxlenof_l_wrist_yaw() const
Get maximum length of l_wrist_yaw value.
size_t maxlenof_r_hand() const
Get maximum length of r_hand value.
void set_r_hand(const float new_r_hand)
Set r_hand value.
void set_r_shoulder_roll(const float new_r_shoulder_roll)
Set r_shoulder_roll value.
void set_l_hip_pitch(const float new_l_hip_pitch)
Set l_hip_pitch value.
void set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch)
Set l_hip_yaw_pitch value.
void set_r_shoulder_pitch(const float new_r_shoulder_pitch)
Set r_shoulder_pitch value.
size_t maxlenof_r_elbow_yaw() const
Get maximum length of r_elbow_yaw value.
void set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch)
Set r_hip_yaw_pitch value.
size_t maxlenof_l_elbow_roll() const
Get maximum length of l_elbow_roll value.
size_t maxlenof_l_hip_roll() const
Get maximum length of l_hip_roll value.
void set_l_ankle_roll(const float new_l_ankle_roll)
Set l_ankle_roll value.
size_t maxlenof_l_shoulder_pitch() const
Get maximum length of l_shoulder_pitch value.
void set_r_elbow_yaw(const float new_r_elbow_yaw)
Set r_elbow_yaw value.
size_t maxlenof_l_ankle_roll() const
Get maximum length of l_ankle_roll value.
size_t maxlenof_r_hip_pitch() const
Get maximum length of r_hip_pitch value.
void set_r_elbow_roll(const float new_r_elbow_roll)
Set r_elbow_roll value.
size_t maxlenof_r_shoulder_roll() const
Get maximum length of r_shoulder_roll value.
void set_l_hand(const float new_l_hand)
Set l_hand value.
size_t maxlenof_l_shoulder_roll() const
Get maximum length of l_shoulder_roll value.
void set_r_knee_pitch(const float new_r_knee_pitch)
Set r_knee_pitch value.
void set_l_shoulder_pitch(const float new_l_shoulder_pitch)
Set l_shoulder_pitch value.
void set_r_hip_pitch(const float new_r_hip_pitch)
Set r_hip_pitch value.
void set_head_yaw(const float new_head_yaw)
Set head_yaw value.
size_t maxlenof_r_hip_yaw_pitch() const
Get maximum length of r_hip_yaw_pitch value.
size_t maxlenof_l_hip_pitch() const
Get maximum length of l_hip_pitch value.
void set_l_hip_roll(const float new_l_hip_roll)
Set l_hip_roll value.
size_t maxlenof_r_knee_pitch() const
Get maximum length of r_knee_pitch value.
size_t maxlenof_l_knee_pitch() const
Get maximum length of l_knee_pitch value.
size_t maxlenof_r_ankle_roll() const
Get maximum length of r_ankle_roll value.
void set_l_wrist_yaw(const float new_l_wrist_yaw)
Set l_wrist_yaw value.
virtual Message * clone() const
Clone this message.
void set_l_shoulder_roll(const float new_l_shoulder_roll)
Set l_shoulder_roll value.
void set_l_elbow_yaw(const float new_l_elbow_yaw)
Set l_elbow_yaw value.
size_t maxlenof_time() const
Get maximum length of time value.
void set_l_elbow_roll(const float new_l_elbow_roll)
Set l_elbow_roll value.
void set_r_wrist_yaw(const float new_r_wrist_yaw)
Set r_wrist_yaw value.
NaoJointPositionInterface Fawkes BlackBoard Interface.
static const uint32_t SERVO_l_elbow_roll
SERVO_l_elbow_roll constant.
static const uint32_t SERVO_r_elbow_yaw
SERVO_r_elbow_yaw constant.
static const uint32_t SERVO_head_pitch
SERVO_head_pitch constant.
static const uint32_t SERVO_l_hip_pitch
SERVO_l_hip_pitch constant.
static const uint32_t SERVO_r_knee_pitch
SERVO_r_knee_pitch constant.
static const uint32_t SERVO_r_elbow_roll
SERVO_r_elbow_roll constant.
static const uint32_t SERVO_l_shoulder_roll
SERVO_l_shoulder_roll constant.
static const uint32_t SERVO_l_knee_pitch
SERVO_l_knee_pitch constant.
static const uint32_t SERVO_r_hip_roll
SERVO_r_hip_roll constant.
static const uint32_t SERVO_l_hip_roll
SERVO_l_hip_roll constant.
static const uint32_t SERVO_l_elbow_yaw
SERVO_l_elbow_yaw constant.
static const uint32_t SERVO_r_ankle_roll
SERVO_r_ankle_roll constant.
static const uint32_t SERVO_r_shoulder_roll
SERVO_r_shoulder_roll constant.
static const uint32_t SERVO_r_hip_pitch
SERVO_r_hip_pitch constant.
static const uint32_t SERVO_r_wrist_yaw
SERVO_r_wrist_yaw constant.
static const uint32_t SERVO_max
SERVO_max constant.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
static const uint32_t SERVO_r_ankle_pitch
SERVO_r_ankle_pitch constant.
static const uint32_t SERVO_l_wrist_yaw
SERVO_l_wrist_yaw constant.
static const uint32_t SERVO_r_hip_yaw_pitch
SERVO_r_hip_yaw_pitch constant.
static const uint32_t SERVO_l_hand
SERVO_l_hand constant.
static const uint32_t SERVO_r_shoulder_pitch
SERVO_r_shoulder_pitch constant.
static const uint32_t SERVO_min
SERVO_min constant.
static const uint32_t SERVO_l_ankle_roll
SERVO_l_ankle_roll constant.
static const uint32_t SERVO_r_hand
SERVO_r_hand constant.
static const uint32_t SERVO_l_shoulder_pitch
SERVO_l_shoulder_pitch constant.
static const uint32_t SERVO_head_yaw
SERVO_head_yaw constant.
static const uint32_t SERVO_l_hip_yaw_pitch
SERVO_l_hip_yaw_pitch constant.
static const uint32_t SERVO_l_ankle_pitch
SERVO_l_ankle_pitch constant.
RobotType
Enumeration describing the actual version of the robot that's being used.
@ ROBOTYPE_ACADEMIC
Academic version with 25 DoF and touch sensors.
@ ROBOTYPE_ROBOCUP
RoboCup version with 21 DoF.
Fawkes library namespace.
@ IFT_UINT32
32 bit unsigned integer field
Definition: types.h:43
@ IFT_FLOAT
float field
Definition: types.h:46
@ IFT_INT32
32 bit integer field
Definition: types.h:42
Timestamp data, must be present and first entries for each interface data structs!...
Definition: message.h:152