Fawkes API  Fawkes Development Version
NaoJointPositionInterface.h
1 
2 /***************************************************************************
3  * NaoJointPositionInterface.h - 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 #ifndef __INTERFACES_NAOJOINTPOSITIONINTERFACE_H_
25 #define __INTERFACES_NAOJOINTPOSITIONINTERFACE_H_
26 
27 #include <interface/interface.h>
28 #include <interface/message.h>
29 #include <interface/field_iterator.h>
30 
31 namespace fawkes {
32 
34 {
35  /// @cond INTERNALS
36  INTERFACE_MGMT_FRIENDS(NaoJointPositionInterface)
37  /// @endcond
38  public:
39  /* constants */
40  static const uint32_t SERVO_head_yaw;
41  static const uint32_t SERVO_head_pitch;
42  static const uint32_t SERVO_l_shoulder_pitch;
43  static const uint32_t SERVO_l_shoulder_roll;
44  static const uint32_t SERVO_l_elbow_yaw;
45  static const uint32_t SERVO_l_elbow_roll;
46  static const uint32_t SERVO_l_wrist_yaw;
47  static const uint32_t SERVO_l_hand;
48  static const uint32_t SERVO_l_hip_yaw_pitch;
49  static const uint32_t SERVO_l_hip_roll;
50  static const uint32_t SERVO_l_hip_pitch;
51  static const uint32_t SERVO_l_knee_pitch;
52  static const uint32_t SERVO_l_ankle_pitch;
53  static const uint32_t SERVO_l_ankle_roll;
54  static const uint32_t SERVO_r_shoulder_pitch;
55  static const uint32_t SERVO_r_shoulder_roll;
56  static const uint32_t SERVO_r_elbow_yaw;
57  static const uint32_t SERVO_r_elbow_roll;
58  static const uint32_t SERVO_r_wrist_yaw;
59  static const uint32_t SERVO_r_hand;
60  static const uint32_t SERVO_r_hip_yaw_pitch;
61  static const uint32_t SERVO_r_hip_roll;
62  static const uint32_t SERVO_r_hip_pitch;
63  static const uint32_t SERVO_r_knee_pitch;
64  static const uint32_t SERVO_r_ankle_pitch;
65  static const uint32_t SERVO_r_ankle_roll;
66  static const uint32_t SERVO_min;
67  static const uint32_t SERVO_max;
68 
69  /**
70  Enumeration describing the actual version of the robot that's being
71  used.
72  */
73  typedef enum {
75  Academic version with 25 DoF and touch sensors.
76  */,
78  RoboCup version with 21 DoF.
79  */
80  } RobotType;
81  const char * tostring_RobotType(RobotType value) const;
82 
83  private:
84  /** Internal data storage, do NOT modify! */
85  typedef struct __attribute__((packed)) {
86  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
87  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
88  int32_t robot_type; /**< Robot type. */
89  uint8_t robot_version[4]; /**<
90  Robot version. Fields are in ascending array index major, minor, micro and
91  patch level. Currently only the first two are used by Aldebaran, but due to
92  struct alignment we add two extra bytes.
93  */
94  float head_yaw; /**< Head yaw */
95  float head_pitch; /**< Head pitch */
96  float l_shoulder_pitch; /**< Left shoulder pitch */
97  float l_shoulder_roll; /**< Left shoulder roll */
98  float l_elbow_yaw; /**< Left elbow yaw */
99  float l_elbow_roll; /**< Left elbow roll */
100  float l_wrist_yaw; /**< Left wrist yaw */
101  float l_hand; /**< Left hand */
102  float l_hip_yaw_pitch; /**< Left hip yaw pitch */
103  float l_hip_roll; /**< Left hip roll */
104  float l_hip_pitch; /**< Left hip pitch */
105  float l_knee_pitch; /**< Left knee pitch */
106  float l_ankle_pitch; /**< Left ankle pitch */
107  float l_ankle_roll; /**< Left ankle roll */
108  float r_shoulder_pitch; /**< Right shoulder pitch */
109  float r_shoulder_roll; /**< Right shoulder roll */
110  float r_elbow_yaw; /**< Right elbow yaw */
111  float r_elbow_roll; /**< Right elbow roll */
112  float r_wrist_yaw; /**< Right wrist yaw */
113  float r_hand; /**< Right hand */
114  float r_hip_yaw_pitch; /**< Right hip yaw pitch */
115  float r_hip_roll; /**< Right hip roll */
116  float r_hip_pitch; /**< Right hip pitch */
117  float r_knee_pitch; /**< Right knee pitch */
118  float r_ankle_pitch; /**< Right ankle pitch */
119  float r_ankle_roll; /**< Right ankle roll */
120  int32_t time; /**<
121  Current reference time in ms. For real hardware this is the DCM time.
122  Times in messages are always offsets to the current time and the current
123  time is added before executing the command.
124  */
125  } NaoJointPositionInterface_data_t;
126 
127  NaoJointPositionInterface_data_t *data;
128 
129  interface_enum_map_t enum_map_RobotType;
130  public:
131  /* messages */
132  class SetServoMessage : public Message
133  {
134  private:
135  /** Internal data storage, do NOT modify! */
136  typedef struct __attribute__((packed)) {
137  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
138  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
139  uint32_t servo; /**< A concatenated list of SERVO_* constants to
140  define the servos that should execute the movement. The list shall consist of
141  binary or'ed SERVO_* constants. */
142  float value; /**< Servo value to set for servos. */
143  int32_t time; /**<
144  Current reference time in ms. For real hardware this is the DCM time.
145  Times in messages are always offsets to the current time and the current
146  time is added before executing the command.
147  */
148  } SetServoMessage_data_t;
149 
150  SetServoMessage_data_t *data;
151 
152  interface_enum_map_t enum_map_RobotType;
153  public:
154  SetServoMessage(const uint32_t ini_servo, const float ini_value, const int32_t ini_time);
155  SetServoMessage();
156  ~SetServoMessage();
157 
159  /* Methods */
160  uint32_t servo() const;
161  void set_servo(const uint32_t new_servo);
162  size_t maxlenof_servo() const;
163  float value() const;
164  void set_value(const float new_value);
165  size_t maxlenof_value() const;
166  int32_t time() const;
167  void set_time(const int32_t new_time);
168  size_t maxlenof_time() const;
169  virtual Message * clone() const;
170  };
171 
172  class SetServosMessage : public Message
173  {
174  private:
175  /** Internal data storage, do NOT modify! */
176  typedef struct __attribute__((packed)) {
177  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
178  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
179  float head_yaw; /**< Head yaw */
180  float head_pitch; /**< Head pitch */
181  float l_shoulder_pitch; /**< Left shoulder pitch */
182  float l_shoulder_roll; /**< Left shoulder roll */
183  float l_elbow_yaw; /**< Left elbow yaw */
184  float l_elbow_roll; /**< Left elbow roll */
185  float l_hip_yaw_pitch; /**< Left hip yaw pitch */
186  float l_hip_roll; /**< Left hip roll */
187  float l_hip_pitch; /**< Left hip pitch */
188  float l_knee_pitch; /**< Left knee pitch */
189  float l_ankle_pitch; /**< Left ankle pitch */
190  float l_ankle_roll; /**< Left ankle roll */
191  float l_wrist_yaw; /**< Left wrist yaw */
192  float l_hand; /**< Left hand */
193  float r_shoulder_pitch; /**< Right shoulder pitch */
194  float r_shoulder_roll; /**< Right shoulder roll */
195  float r_elbow_yaw; /**< Right elbow yaw */
196  float r_elbow_roll; /**< Right elbow roll */
197  float r_wrist_yaw; /**< Right wrist yaw */
198  float r_hand; /**< Right hand */
199  float r_hip_yaw_pitch; /**< Right hip yaw pitch */
200  float r_hip_roll; /**< Right hip roll */
201  float r_hip_pitch; /**< Right hip pitch */
202  float r_knee_pitch; /**< Right knee pitch */
203  float r_ankle_pitch; /**< Right ankle pitch */
204  float r_ankle_roll; /**< Right ankle roll */
205  int32_t time; /**<
206  Current reference time in ms. For real hardware this is the DCM time.
207  Times in messages are always offsets to the current time and the current
208  time is added before executing the command.
209  */
210  } SetServosMessage_data_t;
211 
212  SetServosMessage_data_t *data;
213 
214  interface_enum_map_t enum_map_RobotType;
215  public:
216  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);
218  ~SetServosMessage();
219 
221  /* Methods */
222  float head_yaw() const;
223  void set_head_yaw(const float new_head_yaw);
224  size_t maxlenof_head_yaw() const;
225  float head_pitch() const;
226  void set_head_pitch(const float new_head_pitch);
227  size_t maxlenof_head_pitch() const;
228  float l_shoulder_pitch() const;
229  void set_l_shoulder_pitch(const float new_l_shoulder_pitch);
230  size_t maxlenof_l_shoulder_pitch() const;
231  float l_shoulder_roll() const;
232  void set_l_shoulder_roll(const float new_l_shoulder_roll);
233  size_t maxlenof_l_shoulder_roll() const;
234  float l_elbow_yaw() const;
235  void set_l_elbow_yaw(const float new_l_elbow_yaw);
236  size_t maxlenof_l_elbow_yaw() const;
237  float l_elbow_roll() const;
238  void set_l_elbow_roll(const float new_l_elbow_roll);
239  size_t maxlenof_l_elbow_roll() const;
240  float l_hip_yaw_pitch() const;
241  void set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch);
242  size_t maxlenof_l_hip_yaw_pitch() const;
243  float l_hip_roll() const;
244  void set_l_hip_roll(const float new_l_hip_roll);
245  size_t maxlenof_l_hip_roll() const;
246  float l_hip_pitch() const;
247  void set_l_hip_pitch(const float new_l_hip_pitch);
248  size_t maxlenof_l_hip_pitch() const;
249  float l_knee_pitch() const;
250  void set_l_knee_pitch(const float new_l_knee_pitch);
251  size_t maxlenof_l_knee_pitch() const;
252  float l_ankle_pitch() const;
253  void set_l_ankle_pitch(const float new_l_ankle_pitch);
254  size_t maxlenof_l_ankle_pitch() const;
255  float l_ankle_roll() const;
256  void set_l_ankle_roll(const float new_l_ankle_roll);
257  size_t maxlenof_l_ankle_roll() const;
258  float l_wrist_yaw() const;
259  void set_l_wrist_yaw(const float new_l_wrist_yaw);
260  size_t maxlenof_l_wrist_yaw() const;
261  float l_hand() const;
262  void set_l_hand(const float new_l_hand);
263  size_t maxlenof_l_hand() const;
264  float r_shoulder_pitch() const;
265  void set_r_shoulder_pitch(const float new_r_shoulder_pitch);
266  size_t maxlenof_r_shoulder_pitch() const;
267  float r_shoulder_roll() const;
268  void set_r_shoulder_roll(const float new_r_shoulder_roll);
269  size_t maxlenof_r_shoulder_roll() const;
270  float r_elbow_yaw() const;
271  void set_r_elbow_yaw(const float new_r_elbow_yaw);
272  size_t maxlenof_r_elbow_yaw() const;
273  float r_elbow_roll() const;
274  void set_r_elbow_roll(const float new_r_elbow_roll);
275  size_t maxlenof_r_elbow_roll() const;
276  float r_wrist_yaw() const;
277  void set_r_wrist_yaw(const float new_r_wrist_yaw);
278  size_t maxlenof_r_wrist_yaw() const;
279  float r_hand() const;
280  void set_r_hand(const float new_r_hand);
281  size_t maxlenof_r_hand() const;
282  float r_hip_yaw_pitch() const;
283  void set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch);
284  size_t maxlenof_r_hip_yaw_pitch() const;
285  float r_hip_roll() const;
286  void set_r_hip_roll(const float new_r_hip_roll);
287  size_t maxlenof_r_hip_roll() const;
288  float r_hip_pitch() const;
289  void set_r_hip_pitch(const float new_r_hip_pitch);
290  size_t maxlenof_r_hip_pitch() const;
291  float r_knee_pitch() const;
292  void set_r_knee_pitch(const float new_r_knee_pitch);
293  size_t maxlenof_r_knee_pitch() const;
294  float r_ankle_pitch() const;
295  void set_r_ankle_pitch(const float new_r_ankle_pitch);
296  size_t maxlenof_r_ankle_pitch() const;
297  float r_ankle_roll() const;
298  void set_r_ankle_roll(const float new_r_ankle_roll);
299  size_t maxlenof_r_ankle_roll() const;
300  int32_t time() const;
301  void set_time(const int32_t new_time);
302  size_t maxlenof_time() const;
303  virtual Message * clone() const;
304  };
305 
306  class MoveServoMessage : public Message
307  {
308  private:
309  /** Internal data storage, do NOT modify! */
310  typedef struct __attribute__((packed)) {
311  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
312  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
313  uint32_t servo; /**<
314  A concatenated list of SERVO_* constants to define the servos
315  that should execute the movement. The list shall consist of
316  binary or'ed SERVO_* constants.
317  */
318  float value; /**< Servo value to set for servos. */
319  float speed; /**<
320  Fraction of max speed in range [0.0..1.0].
321  */
322  } MoveServoMessage_data_t;
323 
324  MoveServoMessage_data_t *data;
325 
326  interface_enum_map_t enum_map_RobotType;
327  public:
328  MoveServoMessage(const uint32_t ini_servo, const float ini_value, const float ini_speed);
330  ~MoveServoMessage();
331 
333  /* Methods */
334  uint32_t servo() const;
335  void set_servo(const uint32_t new_servo);
336  size_t maxlenof_servo() const;
337  float value() const;
338  void set_value(const float new_value);
339  size_t maxlenof_value() const;
340  float speed() const;
341  void set_speed(const float new_speed);
342  size_t maxlenof_speed() const;
343  virtual Message * clone() const;
344  };
345 
346  class MoveServosMessage : public Message
347  {
348  private:
349  /** Internal data storage, do NOT modify! */
350  typedef struct __attribute__((packed)) {
351  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
352  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
353  float speed; /**<
354  Fraction of max speed in range [0.0..1.0].
355  */
356  float head_yaw; /**< Head yaw */
357  float head_pitch; /**< Head pitch */
358  float l_shoulder_pitch; /**< Left shoulder pitch */
359  float l_shoulder_roll; /**< Left shoulder roll */
360  float l_elbow_yaw; /**< Left elbow yaw */
361  float l_elbow_roll; /**< Left elbow roll */
362  float l_wrist_yaw; /**< Left wrist yaw */
363  float l_hand; /**< Left hand */
364  float l_hip_yaw_pitch; /**< Left hip yaw pitch */
365  float l_hip_roll; /**< Left hip roll */
366  float l_hip_pitch; /**< Left hip pitch */
367  float l_knee_pitch; /**< Left knee pitch */
368  float l_ankle_pitch; /**< Left ankle pitch */
369  float l_ankle_roll; /**< Left ankle roll */
370  float r_shoulder_pitch; /**< Right shoulder pitch */
371  float r_shoulder_roll; /**< Right shoulder roll */
372  float r_elbow_yaw; /**< Right elbow yaw */
373  float r_elbow_roll; /**< Right elbow roll */
374  float r_wrist_yaw; /**< Right wrist yaw */
375  float r_hand; /**< Right hand */
376  float r_hip_yaw_pitch; /**< Right hip yaw pitch */
377  float r_hip_roll; /**< Right hip roll */
378  float r_hip_pitch; /**< Right hip pitch */
379  float r_knee_pitch; /**< Right knee pitch */
380  float r_ankle_pitch; /**< Right ankle pitch */
381  float r_ankle_roll; /**< Right ankle roll */
382  } MoveServosMessage_data_t;
383 
384  MoveServosMessage_data_t *data;
385 
386  interface_enum_map_t enum_map_RobotType;
387  public:
388  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);
391 
393  /* Methods */
394  float speed() const;
395  void set_speed(const float new_speed);
396  size_t maxlenof_speed() const;
397  float head_yaw() const;
398  void set_head_yaw(const float new_head_yaw);
399  size_t maxlenof_head_yaw() const;
400  float head_pitch() const;
401  void set_head_pitch(const float new_head_pitch);
402  size_t maxlenof_head_pitch() const;
403  float l_shoulder_pitch() const;
404  void set_l_shoulder_pitch(const float new_l_shoulder_pitch);
405  size_t maxlenof_l_shoulder_pitch() const;
406  float l_shoulder_roll() const;
407  void set_l_shoulder_roll(const float new_l_shoulder_roll);
408  size_t maxlenof_l_shoulder_roll() const;
409  float l_elbow_yaw() const;
410  void set_l_elbow_yaw(const float new_l_elbow_yaw);
411  size_t maxlenof_l_elbow_yaw() const;
412  float l_elbow_roll() const;
413  void set_l_elbow_roll(const float new_l_elbow_roll);
414  size_t maxlenof_l_elbow_roll() const;
415  float l_wrist_yaw() const;
416  void set_l_wrist_yaw(const float new_l_wrist_yaw);
417  size_t maxlenof_l_wrist_yaw() const;
418  float l_hand() const;
419  void set_l_hand(const float new_l_hand);
420  size_t maxlenof_l_hand() const;
421  float l_hip_yaw_pitch() const;
422  void set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch);
423  size_t maxlenof_l_hip_yaw_pitch() const;
424  float l_hip_roll() const;
425  void set_l_hip_roll(const float new_l_hip_roll);
426  size_t maxlenof_l_hip_roll() const;
427  float l_hip_pitch() const;
428  void set_l_hip_pitch(const float new_l_hip_pitch);
429  size_t maxlenof_l_hip_pitch() const;
430  float l_knee_pitch() const;
431  void set_l_knee_pitch(const float new_l_knee_pitch);
432  size_t maxlenof_l_knee_pitch() const;
433  float l_ankle_pitch() const;
434  void set_l_ankle_pitch(const float new_l_ankle_pitch);
435  size_t maxlenof_l_ankle_pitch() const;
436  float l_ankle_roll() const;
437  void set_l_ankle_roll(const float new_l_ankle_roll);
438  size_t maxlenof_l_ankle_roll() const;
439  float r_shoulder_pitch() const;
440  void set_r_shoulder_pitch(const float new_r_shoulder_pitch);
441  size_t maxlenof_r_shoulder_pitch() const;
442  float r_shoulder_roll() const;
443  void set_r_shoulder_roll(const float new_r_shoulder_roll);
444  size_t maxlenof_r_shoulder_roll() const;
445  float r_elbow_yaw() const;
446  void set_r_elbow_yaw(const float new_r_elbow_yaw);
447  size_t maxlenof_r_elbow_yaw() const;
448  float r_elbow_roll() const;
449  void set_r_elbow_roll(const float new_r_elbow_roll);
450  size_t maxlenof_r_elbow_roll() const;
451  float r_wrist_yaw() const;
452  void set_r_wrist_yaw(const float new_r_wrist_yaw);
453  size_t maxlenof_r_wrist_yaw() const;
454  float r_hand() const;
455  void set_r_hand(const float new_r_hand);
456  size_t maxlenof_r_hand() const;
457  float r_hip_yaw_pitch() const;
458  void set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch);
459  size_t maxlenof_r_hip_yaw_pitch() const;
460  float r_hip_roll() const;
461  void set_r_hip_roll(const float new_r_hip_roll);
462  size_t maxlenof_r_hip_roll() const;
463  float r_hip_pitch() const;
464  void set_r_hip_pitch(const float new_r_hip_pitch);
465  size_t maxlenof_r_hip_pitch() const;
466  float r_knee_pitch() const;
467  void set_r_knee_pitch(const float new_r_knee_pitch);
468  size_t maxlenof_r_knee_pitch() const;
469  float r_ankle_pitch() const;
470  void set_r_ankle_pitch(const float new_r_ankle_pitch);
471  size_t maxlenof_r_ankle_pitch() const;
472  float r_ankle_roll() const;
473  void set_r_ankle_roll(const float new_r_ankle_roll);
474  size_t maxlenof_r_ankle_roll() const;
475  virtual Message * clone() const;
476  };
477 
478  virtual bool message_valid(const Message *message) const;
479  private:
482 
483  public:
484  /* Methods */
485  RobotType robot_type() const;
486  void set_robot_type(const RobotType new_robot_type);
487  size_t maxlenof_robot_type() const;
488  uint8_t * robot_version() const;
489  uint8_t robot_version(unsigned int index) const;
490  void set_robot_version(unsigned int index, const uint8_t new_robot_version);
491  void set_robot_version(const uint8_t * new_robot_version);
492  size_t maxlenof_robot_version() const;
493  float head_yaw() const;
494  void set_head_yaw(const float new_head_yaw);
495  size_t maxlenof_head_yaw() const;
496  float head_pitch() const;
497  void set_head_pitch(const float new_head_pitch);
498  size_t maxlenof_head_pitch() const;
499  float l_shoulder_pitch() const;
500  void set_l_shoulder_pitch(const float new_l_shoulder_pitch);
501  size_t maxlenof_l_shoulder_pitch() const;
502  float l_shoulder_roll() const;
503  void set_l_shoulder_roll(const float new_l_shoulder_roll);
504  size_t maxlenof_l_shoulder_roll() const;
505  float l_elbow_yaw() const;
506  void set_l_elbow_yaw(const float new_l_elbow_yaw);
507  size_t maxlenof_l_elbow_yaw() const;
508  float l_elbow_roll() const;
509  void set_l_elbow_roll(const float new_l_elbow_roll);
510  size_t maxlenof_l_elbow_roll() const;
511  float l_wrist_yaw() const;
512  void set_l_wrist_yaw(const float new_l_wrist_yaw);
513  size_t maxlenof_l_wrist_yaw() const;
514  float l_hand() const;
515  void set_l_hand(const float new_l_hand);
516  size_t maxlenof_l_hand() const;
517  float l_hip_yaw_pitch() const;
518  void set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch);
519  size_t maxlenof_l_hip_yaw_pitch() const;
520  float l_hip_roll() const;
521  void set_l_hip_roll(const float new_l_hip_roll);
522  size_t maxlenof_l_hip_roll() const;
523  float l_hip_pitch() const;
524  void set_l_hip_pitch(const float new_l_hip_pitch);
525  size_t maxlenof_l_hip_pitch() const;
526  float l_knee_pitch() const;
527  void set_l_knee_pitch(const float new_l_knee_pitch);
528  size_t maxlenof_l_knee_pitch() const;
529  float l_ankle_pitch() const;
530  void set_l_ankle_pitch(const float new_l_ankle_pitch);
531  size_t maxlenof_l_ankle_pitch() const;
532  float l_ankle_roll() const;
533  void set_l_ankle_roll(const float new_l_ankle_roll);
534  size_t maxlenof_l_ankle_roll() const;
535  float r_shoulder_pitch() const;
536  void set_r_shoulder_pitch(const float new_r_shoulder_pitch);
537  size_t maxlenof_r_shoulder_pitch() const;
538  float r_shoulder_roll() const;
539  void set_r_shoulder_roll(const float new_r_shoulder_roll);
540  size_t maxlenof_r_shoulder_roll() const;
541  float r_elbow_yaw() const;
542  void set_r_elbow_yaw(const float new_r_elbow_yaw);
543  size_t maxlenof_r_elbow_yaw() const;
544  float r_elbow_roll() const;
545  void set_r_elbow_roll(const float new_r_elbow_roll);
546  size_t maxlenof_r_elbow_roll() const;
547  float r_wrist_yaw() const;
548  void set_r_wrist_yaw(const float new_r_wrist_yaw);
549  size_t maxlenof_r_wrist_yaw() const;
550  float r_hand() const;
551  void set_r_hand(const float new_r_hand);
552  size_t maxlenof_r_hand() const;
553  float r_hip_yaw_pitch() const;
554  void set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch);
555  size_t maxlenof_r_hip_yaw_pitch() const;
556  float r_hip_roll() const;
557  void set_r_hip_roll(const float new_r_hip_roll);
558  size_t maxlenof_r_hip_roll() const;
559  float r_hip_pitch() const;
560  void set_r_hip_pitch(const float new_r_hip_pitch);
561  size_t maxlenof_r_hip_pitch() const;
562  float r_knee_pitch() const;
563  void set_r_knee_pitch(const float new_r_knee_pitch);
564  size_t maxlenof_r_knee_pitch() const;
565  float r_ankle_pitch() const;
566  void set_r_ankle_pitch(const float new_r_ankle_pitch);
567  size_t maxlenof_r_ankle_pitch() const;
568  float r_ankle_roll() const;
569  void set_r_ankle_roll(const float new_r_ankle_roll);
570  size_t maxlenof_r_ankle_roll() const;
571  int32_t time() const;
572  void set_time(const int32_t new_time);
573  size_t maxlenof_time() const;
574  virtual Message * create_message(const char *type) const;
575 
576  virtual void copy_values(const Interface *other);
577  virtual const char * enum_tostring(const char *enumtype, int val) const;
578 
579 };
580 
581 } // end namespace fawkes
582 
583 #endif
static const uint32_t SERVO_l_shoulder_roll
SERVO_l_shoulder_roll constant.
void set_robot_version(unsigned int index, const uint8_t new_robot_version)
Set robot_version value at given index.
size_t maxlenof_r_knee_pitch() const
Get maximum length of r_knee_pitch value.
size_t maxlenof_l_ankle_roll() const
Get maximum length of l_ankle_roll value.
NaoJointPositionInterface Fawkes BlackBoard Interface.
static const uint32_t SERVO_l_ankle_roll
SERVO_l_ankle_roll constant.
void set_l_ankle_roll(const float new_l_ankle_roll)
Set l_ankle_roll value.
SetServoMessage Fawkes BlackBoard Interface Message.
static const uint32_t SERVO_min
SERVO_min constant.
size_t maxlenof_r_ankle_pitch() const
Get maximum length of r_ankle_pitch value.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:44
size_t maxlenof_l_ankle_pitch() const
Get maximum length of l_ankle_pitch value.
void set_r_shoulder_pitch(const float new_r_shoulder_pitch)
Set r_shoulder_pitch value.
void set_l_shoulder_roll(const float new_l_shoulder_roll)
Set l_shoulder_roll value.
static const uint32_t SERVO_l_hip_yaw_pitch
SERVO_l_hip_yaw_pitch constant.
float l_knee_pitch() const
Get l_knee_pitch value.
SetServosMessage Fawkes BlackBoard Interface Message.
float l_shoulder_pitch() const
Get l_shoulder_pitch value.
static const uint32_t SERVO_r_hip_roll
SERVO_r_hip_roll constant.
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.
const char * tostring_RobotType(RobotType value) const
Convert RobotType constant to string.
static const uint32_t SERVO_max
SERVO_max constant.
Fawkes library namespace.
size_t maxlenof_r_ankle_roll() const
Get maximum length of r_ankle_roll value.
static const uint32_t SERVO_l_wrist_yaw
SERVO_l_wrist_yaw constant.
void set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch)
Set r_hip_yaw_pitch value.
float r_shoulder_roll() const
Get r_shoulder_roll value.
size_t maxlenof_l_hip_pitch() const
Get maximum length of l_hip_pitch value.
size_t maxlenof_l_elbow_roll() const
Get maximum length of l_elbow_roll value.
size_t maxlenof_r_elbow_roll() const
Get maximum length of r_elbow_roll value.
size_t maxlenof_head_yaw() const
Get maximum length of head_yaw value.
void set_r_ankle_roll(const float new_r_ankle_roll)
Set r_ankle_roll value.
MoveServosMessage Fawkes BlackBoard Interface Message.
RobotType robot_type() const
Get robot_type value.
float head_yaw() const
Get head_yaw value.
size_t maxlenof_head_pitch() const
Get maximum length of head_pitch value.
float l_elbow_yaw() const
Get l_elbow_yaw value.
void set_r_elbow_yaw(const float new_r_elbow_yaw)
Set r_elbow_yaw value.
float r_elbow_yaw() const
Get r_elbow_yaw value.
static const uint32_t SERVO_l_elbow_yaw
SERVO_l_elbow_yaw constant.
void set_head_pitch(const float new_head_pitch)
Set head_pitch value.
size_t maxlenof_l_elbow_yaw() const
Get maximum length of l_elbow_yaw value.
size_t maxlenof_r_wrist_yaw() const
Get maximum length of r_wrist_yaw value.
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:79
virtual Message * create_message(const char *type) const
Create message based on type name.
float r_hand() const
Get r_hand value.
void set_l_wrist_yaw(const float new_l_wrist_yaw)
Set l_wrist_yaw value.
size_t maxlenof_l_hip_yaw_pitch() const
Get maximum length of l_hip_yaw_pitch value.
size_t maxlenof_r_elbow_yaw() const
Get maximum length of r_elbow_yaw value.
Academic version with 25 DoF and touch sensors.
float l_hip_pitch() const
Get l_hip_pitch value.
static const uint32_t SERVO_l_ankle_pitch
SERVO_l_ankle_pitch constant.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
static const uint32_t SERVO_l_shoulder_pitch
SERVO_l_shoulder_pitch constant.
void set_l_ankle_pitch(const float new_l_ankle_pitch)
Set l_ankle_pitch value.
float l_wrist_yaw() const
Get l_wrist_yaw value.
size_t maxlenof_r_shoulder_pitch() const
Get maximum length of r_shoulder_pitch value.
float r_ankle_roll() const
Get r_ankle_roll value.
void set_l_hip_pitch(const float new_l_hip_pitch)
Set l_hip_pitch value.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
void set_l_elbow_roll(const float new_l_elbow_roll)
Set l_elbow_roll value.
float r_knee_pitch() const
Get r_knee_pitch value.
static const uint32_t SERVO_l_knee_pitch
SERVO_l_knee_pitch constant.
const char * type() const
Get type of interface.
Definition: interface.cpp:651
static const uint32_t SERVO_r_hand
SERVO_r_hand constant.
static const uint32_t SERVO_r_ankle_roll
SERVO_r_ankle_roll constant.
float head_pitch() const
Get head_pitch value.
size_t maxlenof_r_hip_yaw_pitch() const
Get maximum length of r_hip_yaw_pitch value.
size_t maxlenof_l_hand() const
Get maximum length of l_hand value.
void set_r_hip_roll(const float new_r_hip_roll)
Set r_hip_roll value.
float l_ankle_roll() const
Get l_ankle_roll value.
void set_robot_type(const RobotType new_robot_type)
Set robot_type value.
float r_wrist_yaw() const
Get r_wrist_yaw value.
float r_hip_yaw_pitch() const
Get r_hip_yaw_pitch value.
float l_shoulder_roll() const
Get l_shoulder_roll 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.
size_t maxlenof_l_knee_pitch() const
Get maximum length of l_knee_pitch value.
void set_r_ankle_pitch(const float new_r_ankle_pitch)
Set r_ankle_pitch value.
void set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch)
Set l_hip_yaw_pitch value.
static const uint32_t SERVO_r_ankle_pitch
SERVO_r_ankle_pitch constant.
static const uint32_t SERVO_r_elbow_yaw
SERVO_r_elbow_yaw constant.
uint8_t * robot_version() const
Get robot_version value.
static const uint32_t SERVO_l_elbow_roll
SERVO_l_elbow_roll constant.
size_t maxlenof_l_shoulder_pitch() const
Get maximum length of l_shoulder_pitch value.
static const uint32_t SERVO_r_knee_pitch
SERVO_r_knee_pitch constant.
static const uint32_t SERVO_l_hand
SERVO_l_hand constant.
static const uint32_t SERVO_r_elbow_roll
SERVO_r_elbow_roll constant.
static const uint32_t SERVO_r_shoulder_pitch
SERVO_r_shoulder_pitch constant.
static const uint32_t SERVO_head_pitch
SERVO_head_pitch constant.
void set_r_elbow_roll(const float new_r_elbow_roll)
Set r_elbow_roll value.
float r_hip_pitch() const
Get r_hip_pitch value.
static const uint32_t SERVO_l_hip_pitch
SERVO_l_hip_pitch constant.
size_t maxlenof_r_shoulder_roll() const
Get maximum length of r_shoulder_roll value.
float l_elbow_roll() const
Get l_elbow_roll value.
void set_r_knee_pitch(const float new_r_knee_pitch)
Set r_knee_pitch value.
float l_ankle_pitch() const
Get l_ankle_pitch value.
float r_hip_roll() const
Get r_hip_roll value.
float r_elbow_roll() const
Get r_elbow_roll value.
size_t maxlenof_r_hand() const
Get maximum length of r_hand value.
void set_l_hand(const float new_l_hand)
Set l_hand value.
MoveServoMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_l_shoulder_roll() const
Get maximum length of l_shoulder_roll value.
void set_r_shoulder_roll(const float new_r_shoulder_roll)
Set r_shoulder_roll value.
static const uint32_t SERVO_r_hip_pitch
SERVO_r_hip_pitch constant.
static const uint32_t SERVO_r_hip_yaw_pitch
SERVO_r_hip_yaw_pitch constant.
size_t maxlenof_l_wrist_yaw() const
Get maximum length of l_wrist_yaw value.
static const uint32_t SERVO_r_wrist_yaw
SERVO_r_wrist_yaw constant.
size_t maxlenof_robot_version() const
Get maximum length of robot_version value.
void set_l_hip_roll(const float new_l_hip_roll)
Set l_hip_roll value.
size_t maxlenof_l_hip_roll() const
Get maximum length of l_hip_roll value.
void set_l_knee_pitch(const float new_l_knee_pitch)
Set l_knee_pitch value.
void set_r_wrist_yaw(const float new_r_wrist_yaw)
Set r_wrist_yaw value.
virtual void copy_values(const Interface *other)
Copy values from other interface.
float r_shoulder_pitch() const
Get r_shoulder_pitch value.
float r_ankle_pitch() const
Get r_ankle_pitch value.
void set_time(const int32_t new_time)
Set time value.
static const uint32_t SERVO_head_yaw
SERVO_head_yaw constant.
std::map< int, std::string > interface_enum_map_t
Map of enum integer to string values.
Definition: types.h:53
static const uint32_t SERVO_l_hip_roll
SERVO_l_hip_roll constant.
size_t maxlenof_r_hip_roll() const
Get maximum length of r_hip_roll value.
static const uint32_t SERVO_r_shoulder_roll
SERVO_r_shoulder_roll constant.
void set_r_hand(const float new_r_hand)
Set r_hand value.
void set_head_yaw(const float new_head_yaw)
Set head_yaw value.
float l_hip_yaw_pitch() const
Get l_hip_yaw_pitch value.
size_t maxlenof_robot_type() const
Get maximum length of robot_type value.
RobotType
Enumeration describing the actual version of the robot that&#39;s being used.
float l_hip_roll() const
Get l_hip_roll value.
size_t maxlenof_r_hip_pitch() const
Get maximum length of r_hip_pitch value.
float l_hand() const
Get l_hand value.