24 #include <interfaces/NaoJointPositionInterface.h>
26 #include <core/exceptions/software.h>
100 NaoJointPositionInterface::NaoJointPositionInterface() : Interface()
102 data_size =
sizeof(NaoJointPositionInterface_data_t);
103 data_ptr = malloc(data_size);
104 data = (NaoJointPositionInterface_data_t *)data_ptr;
105 data_ts = (interface_data_ts_t *)data_ptr;
106 memset(data_ptr, 0, data_size);
107 add_fieldinfo(IFT_ENUM,
"robot_type", 1, &data->robot_type,
"robot_type");
108 add_fieldinfo(IFT_UINT8,
"robot_version", 4, &data->robot_version);
109 add_fieldinfo(IFT_FLOAT,
"head_yaw", 1, &data->head_yaw);
110 add_fieldinfo(IFT_FLOAT,
"head_pitch", 1, &data->head_pitch);
111 add_fieldinfo(IFT_FLOAT,
"l_shoulder_pitch", 1, &data->l_shoulder_pitch);
112 add_fieldinfo(IFT_FLOAT,
"l_shoulder_roll", 1, &data->l_shoulder_roll);
113 add_fieldinfo(IFT_FLOAT,
"l_elbow_yaw", 1, &data->l_elbow_yaw);
114 add_fieldinfo(IFT_FLOAT,
"l_elbow_roll", 1, &data->l_elbow_roll);
115 add_fieldinfo(IFT_FLOAT,
"l_wrist_yaw", 1, &data->l_wrist_yaw);
116 add_fieldinfo(IFT_FLOAT,
"l_hand", 1, &data->l_hand);
117 add_fieldinfo(IFT_FLOAT,
"l_hip_yaw_pitch", 1, &data->l_hip_yaw_pitch);
118 add_fieldinfo(IFT_FLOAT,
"l_hip_roll", 1, &data->l_hip_roll);
119 add_fieldinfo(IFT_FLOAT,
"l_hip_pitch", 1, &data->l_hip_pitch);
120 add_fieldinfo(IFT_FLOAT,
"l_knee_pitch", 1, &data->l_knee_pitch);
121 add_fieldinfo(IFT_FLOAT,
"l_ankle_pitch", 1, &data->l_ankle_pitch);
122 add_fieldinfo(IFT_FLOAT,
"l_ankle_roll", 1, &data->l_ankle_roll);
123 add_fieldinfo(IFT_FLOAT,
"r_shoulder_pitch", 1, &data->r_shoulder_pitch);
124 add_fieldinfo(IFT_FLOAT,
"r_shoulder_roll", 1, &data->r_shoulder_roll);
125 add_fieldinfo(IFT_FLOAT,
"r_elbow_yaw", 1, &data->r_elbow_yaw);
126 add_fieldinfo(IFT_FLOAT,
"r_elbow_roll", 1, &data->r_elbow_roll);
127 add_fieldinfo(IFT_FLOAT,
"r_wrist_yaw", 1, &data->r_wrist_yaw);
128 add_fieldinfo(IFT_FLOAT,
"r_hand", 1, &data->r_hand);
129 add_fieldinfo(IFT_FLOAT,
"r_hip_yaw_pitch", 1, &data->r_hip_yaw_pitch);
130 add_fieldinfo(IFT_FLOAT,
"r_hip_roll", 1, &data->r_hip_roll);
131 add_fieldinfo(IFT_FLOAT,
"r_hip_pitch", 1, &data->r_hip_pitch);
132 add_fieldinfo(IFT_FLOAT,
"r_knee_pitch", 1, &data->r_knee_pitch);
133 add_fieldinfo(IFT_FLOAT,
"r_ankle_pitch", 1, &data->r_ankle_pitch);
134 add_fieldinfo(IFT_FLOAT,
"r_ankle_roll", 1, &data->r_ankle_roll);
135 add_fieldinfo(IFT_INT32,
"time", 1, &data->time);
136 add_messageinfo(
"SetServoMessage");
137 add_messageinfo(
"SetServosMessage");
138 add_messageinfo(
"MoveServoMessage");
139 add_messageinfo(
"MoveServosMessage");
140 unsigned char tmp_hash[] = {0x87, 0x3b, 0x41, 0x5d, 0x94, 0x57, 0x82, 0x55, 0x3, 0xbb, 0x3e, 0xf, 0x89, 0x50, 0x6b, 0x46};
145 NaoJointPositionInterface::~NaoJointPositionInterface()
154 NaoJointPositionInterface::tostring_RobotType(
RobotType value)
const
157 case ROBOTYPE_ACADEMIC:
return "ROBOTYPE_ACADEMIC";
158 case ROBOTYPE_ROBOCUP:
return "ROBOTYPE_ROBOCUP";
159 default:
return "UNKNOWN";
168 NaoJointPositionInterface::robot_type()
const
178 NaoJointPositionInterface::maxlenof_robot_type()
const
188 NaoJointPositionInterface::set_robot_type(
const RobotType new_robot_type)
190 data->robot_type = new_robot_type;
203 NaoJointPositionInterface::robot_version()
const
205 return data->robot_version;
219 NaoJointPositionInterface::robot_version(
unsigned int index)
const
222 throw Exception(
"Index value %u out of bounds (0..4)", index);
224 return data->robot_version[index];
232 NaoJointPositionInterface::maxlenof_robot_version()
const
246 NaoJointPositionInterface::set_robot_version(
const uint8_t * new_robot_version)
248 memcpy(data->robot_version, new_robot_version,
sizeof(uint8_t) * 4);
262 NaoJointPositionInterface::set_robot_version(
unsigned int index,
const uint8_t new_robot_version)
265 throw Exception(
"Index value %u out of bounds (0..4)", index);
267 data->robot_version[index] = new_robot_version;
275 NaoJointPositionInterface::head_yaw()
const
277 return data->head_yaw;
285 NaoJointPositionInterface::maxlenof_head_yaw()
const
295 NaoJointPositionInterface::set_head_yaw(
const float new_head_yaw)
297 data->head_yaw = new_head_yaw;
306 NaoJointPositionInterface::head_pitch()
const
308 return data->head_pitch;
316 NaoJointPositionInterface::maxlenof_head_pitch()
const
326 NaoJointPositionInterface::set_head_pitch(
const float new_head_pitch)
328 data->head_pitch = new_head_pitch;
337 NaoJointPositionInterface::l_shoulder_pitch()
const
339 return data->l_shoulder_pitch;
347 NaoJointPositionInterface::maxlenof_l_shoulder_pitch()
const
357 NaoJointPositionInterface::set_l_shoulder_pitch(
const float new_l_shoulder_pitch)
359 data->l_shoulder_pitch = new_l_shoulder_pitch;
368 NaoJointPositionInterface::l_shoulder_roll()
const
370 return data->l_shoulder_roll;
378 NaoJointPositionInterface::maxlenof_l_shoulder_roll()
const
388 NaoJointPositionInterface::set_l_shoulder_roll(
const float new_l_shoulder_roll)
390 data->l_shoulder_roll = new_l_shoulder_roll;
399 NaoJointPositionInterface::l_elbow_yaw()
const
401 return data->l_elbow_yaw;
409 NaoJointPositionInterface::maxlenof_l_elbow_yaw()
const
419 NaoJointPositionInterface::set_l_elbow_yaw(
const float new_l_elbow_yaw)
421 data->l_elbow_yaw = new_l_elbow_yaw;
430 NaoJointPositionInterface::l_elbow_roll()
const
432 return data->l_elbow_roll;
440 NaoJointPositionInterface::maxlenof_l_elbow_roll()
const
450 NaoJointPositionInterface::set_l_elbow_roll(
const float new_l_elbow_roll)
452 data->l_elbow_roll = new_l_elbow_roll;
461 NaoJointPositionInterface::l_wrist_yaw()
const
463 return data->l_wrist_yaw;
471 NaoJointPositionInterface::maxlenof_l_wrist_yaw()
const
481 NaoJointPositionInterface::set_l_wrist_yaw(
const float new_l_wrist_yaw)
483 data->l_wrist_yaw = new_l_wrist_yaw;
492 NaoJointPositionInterface::l_hand()
const
502 NaoJointPositionInterface::maxlenof_l_hand()
const
512 NaoJointPositionInterface::set_l_hand(
const float new_l_hand)
514 data->l_hand = new_l_hand;
523 NaoJointPositionInterface::l_hip_yaw_pitch()
const
525 return data->l_hip_yaw_pitch;
533 NaoJointPositionInterface::maxlenof_l_hip_yaw_pitch()
const
543 NaoJointPositionInterface::set_l_hip_yaw_pitch(
const float new_l_hip_yaw_pitch)
545 data->l_hip_yaw_pitch = new_l_hip_yaw_pitch;
554 NaoJointPositionInterface::l_hip_roll()
const
556 return data->l_hip_roll;
564 NaoJointPositionInterface::maxlenof_l_hip_roll()
const
574 NaoJointPositionInterface::set_l_hip_roll(
const float new_l_hip_roll)
576 data->l_hip_roll = new_l_hip_roll;
585 NaoJointPositionInterface::l_hip_pitch()
const
587 return data->l_hip_pitch;
595 NaoJointPositionInterface::maxlenof_l_hip_pitch()
const
605 NaoJointPositionInterface::set_l_hip_pitch(
const float new_l_hip_pitch)
607 data->l_hip_pitch = new_l_hip_pitch;
616 NaoJointPositionInterface::l_knee_pitch()
const
618 return data->l_knee_pitch;
626 NaoJointPositionInterface::maxlenof_l_knee_pitch()
const
636 NaoJointPositionInterface::set_l_knee_pitch(
const float new_l_knee_pitch)
638 data->l_knee_pitch = new_l_knee_pitch;
647 NaoJointPositionInterface::l_ankle_pitch()
const
649 return data->l_ankle_pitch;
657 NaoJointPositionInterface::maxlenof_l_ankle_pitch()
const
667 NaoJointPositionInterface::set_l_ankle_pitch(
const float new_l_ankle_pitch)
669 data->l_ankle_pitch = new_l_ankle_pitch;
678 NaoJointPositionInterface::l_ankle_roll()
const
680 return data->l_ankle_roll;
688 NaoJointPositionInterface::maxlenof_l_ankle_roll()
const
698 NaoJointPositionInterface::set_l_ankle_roll(
const float new_l_ankle_roll)
700 data->l_ankle_roll = new_l_ankle_roll;
709 NaoJointPositionInterface::r_shoulder_pitch()
const
711 return data->r_shoulder_pitch;
719 NaoJointPositionInterface::maxlenof_r_shoulder_pitch()
const
729 NaoJointPositionInterface::set_r_shoulder_pitch(
const float new_r_shoulder_pitch)
731 data->r_shoulder_pitch = new_r_shoulder_pitch;
740 NaoJointPositionInterface::r_shoulder_roll()
const
742 return data->r_shoulder_roll;
750 NaoJointPositionInterface::maxlenof_r_shoulder_roll()
const
760 NaoJointPositionInterface::set_r_shoulder_roll(
const float new_r_shoulder_roll)
762 data->r_shoulder_roll = new_r_shoulder_roll;
771 NaoJointPositionInterface::r_elbow_yaw()
const
773 return data->r_elbow_yaw;
781 NaoJointPositionInterface::maxlenof_r_elbow_yaw()
const
791 NaoJointPositionInterface::set_r_elbow_yaw(
const float new_r_elbow_yaw)
793 data->r_elbow_yaw = new_r_elbow_yaw;
802 NaoJointPositionInterface::r_elbow_roll()
const
804 return data->r_elbow_roll;
812 NaoJointPositionInterface::maxlenof_r_elbow_roll()
const
822 NaoJointPositionInterface::set_r_elbow_roll(
const float new_r_elbow_roll)
824 data->r_elbow_roll = new_r_elbow_roll;
833 NaoJointPositionInterface::r_wrist_yaw()
const
835 return data->r_wrist_yaw;
843 NaoJointPositionInterface::maxlenof_r_wrist_yaw()
const
853 NaoJointPositionInterface::set_r_wrist_yaw(
const float new_r_wrist_yaw)
855 data->r_wrist_yaw = new_r_wrist_yaw;
864 NaoJointPositionInterface::r_hand()
const
874 NaoJointPositionInterface::maxlenof_r_hand()
const
884 NaoJointPositionInterface::set_r_hand(
const float new_r_hand)
886 data->r_hand = new_r_hand;
895 NaoJointPositionInterface::r_hip_yaw_pitch()
const
897 return data->r_hip_yaw_pitch;
905 NaoJointPositionInterface::maxlenof_r_hip_yaw_pitch()
const
915 NaoJointPositionInterface::set_r_hip_yaw_pitch(
const float new_r_hip_yaw_pitch)
917 data->r_hip_yaw_pitch = new_r_hip_yaw_pitch;
926 NaoJointPositionInterface::r_hip_roll()
const
928 return data->r_hip_roll;
936 NaoJointPositionInterface::maxlenof_r_hip_roll()
const
946 NaoJointPositionInterface::set_r_hip_roll(
const float new_r_hip_roll)
948 data->r_hip_roll = new_r_hip_roll;
957 NaoJointPositionInterface::r_hip_pitch()
const
959 return data->r_hip_pitch;
967 NaoJointPositionInterface::maxlenof_r_hip_pitch()
const
977 NaoJointPositionInterface::set_r_hip_pitch(
const float new_r_hip_pitch)
979 data->r_hip_pitch = new_r_hip_pitch;
988 NaoJointPositionInterface::r_knee_pitch()
const
990 return data->r_knee_pitch;
998 NaoJointPositionInterface::maxlenof_r_knee_pitch()
const
1008 NaoJointPositionInterface::set_r_knee_pitch(
const float new_r_knee_pitch)
1010 data->r_knee_pitch = new_r_knee_pitch;
1011 data_changed =
true;
1019 NaoJointPositionInterface::r_ankle_pitch()
const
1021 return data->r_ankle_pitch;
1029 NaoJointPositionInterface::maxlenof_r_ankle_pitch()
const
1039 NaoJointPositionInterface::set_r_ankle_pitch(
const float new_r_ankle_pitch)
1041 data->r_ankle_pitch = new_r_ankle_pitch;
1042 data_changed =
true;
1050 NaoJointPositionInterface::r_ankle_roll()
const
1052 return data->r_ankle_roll;
1060 NaoJointPositionInterface::maxlenof_r_ankle_roll()
const
1070 NaoJointPositionInterface::set_r_ankle_roll(
const float new_r_ankle_roll)
1072 data->r_ankle_roll = new_r_ankle_roll;
1073 data_changed =
true;
1085 NaoJointPositionInterface::time()
const
1095 NaoJointPositionInterface::maxlenof_time()
const
1109 NaoJointPositionInterface::set_time(
const int32_t new_time)
1111 data->time = new_time;
1112 data_changed =
true;
1117 NaoJointPositionInterface::create_message(
const char *type)
const
1119 if ( strncmp(
"SetServoMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1121 }
else if ( strncmp(
"SetServosMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1123 }
else if ( strncmp(
"MoveServoMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1125 }
else if ( strncmp(
"MoveServosMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1129 "message type for this interface type.", type);
1138 NaoJointPositionInterface::copy_values(
const Interface *other)
1143 type(), other->
type());
1145 memcpy(data, oi->data,
sizeof(NaoJointPositionInterface_data_t));
1149 NaoJointPositionInterface::enum_tostring(
const char *enumtype,
int val)
const
1151 if (strcmp(enumtype,
"RobotType") == 0) {
1152 return tostring_RobotType((
RobotType)val);
1170 NaoJointPositionInterface::SetServoMessage::SetServoMessage(
const uint32_t ini_servo,
const float ini_value,
const int32_t ini_time) :
Message(
"SetServoMessage")
1172 data_size =
sizeof(SetServoMessage_data_t);
1175 data = (SetServoMessage_data_t *)
data_ptr;
1177 data->servo = ini_servo;
1178 data->value = ini_value;
1179 data->time = ini_time;
1187 data_size =
sizeof(SetServoMessage_data_t);
1190 data = (SetServoMessage_data_t *)
data_ptr;
1211 data = (SetServoMessage_data_t *)
data_ptr;
1247 data->servo = new_servo;
1277 data->value = new_value;
1315 data->time = new_time;
1364 NaoJointPositionInterface::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")
1366 data_size =
sizeof(SetServosMessage_data_t);
1369 data = (SetServosMessage_data_t *)
data_ptr;
1371 data->head_yaw = ini_head_yaw;
1372 data->head_pitch = ini_head_pitch;
1373 data->l_shoulder_pitch = ini_l_shoulder_pitch;
1374 data->l_shoulder_roll = ini_l_shoulder_roll;
1375 data->l_elbow_yaw = ini_l_elbow_yaw;
1376 data->l_elbow_roll = ini_l_elbow_roll;
1377 data->l_hip_yaw_pitch = ini_l_hip_yaw_pitch;
1378 data->l_hip_roll = ini_l_hip_roll;
1379 data->l_hip_pitch = ini_l_hip_pitch;
1380 data->l_knee_pitch = ini_l_knee_pitch;
1381 data->l_ankle_pitch = ini_l_ankle_pitch;
1382 data->l_ankle_roll = ini_l_ankle_roll;
1383 data->l_wrist_yaw = ini_l_wrist_yaw;
1384 data->l_hand = ini_l_hand;
1385 data->r_shoulder_pitch = ini_r_shoulder_pitch;
1386 data->r_shoulder_roll = ini_r_shoulder_roll;
1387 data->r_elbow_yaw = ini_r_elbow_yaw;
1388 data->r_elbow_roll = ini_r_elbow_roll;
1389 data->r_wrist_yaw = ini_r_wrist_yaw;
1390 data->r_hand = ini_r_hand;
1391 data->r_hip_yaw_pitch = ini_r_hip_yaw_pitch;
1392 data->r_hip_roll = ini_r_hip_roll;
1393 data->r_hip_pitch = ini_r_hip_pitch;
1394 data->r_knee_pitch = ini_r_knee_pitch;
1395 data->r_ankle_pitch = ini_r_ankle_pitch;
1396 data->r_ankle_roll = ini_r_ankle_roll;
1397 data->time = ini_time;
1429 data_size =
sizeof(SetServosMessage_data_t);
1432 data = (SetServosMessage_data_t *)
data_ptr;
1477 data = (SetServosMessage_data_t *)
data_ptr;
1489 return data->head_yaw;
1509 data->head_yaw = new_head_yaw;
1519 return data->head_pitch;
1539 data->head_pitch = new_head_pitch;
1549 return data->l_shoulder_pitch;
1569 data->l_shoulder_pitch = new_l_shoulder_pitch;
1579 return data->l_shoulder_roll;
1599 data->l_shoulder_roll = new_l_shoulder_roll;
1609 return data->l_elbow_yaw;
1629 data->l_elbow_yaw = new_l_elbow_yaw;
1639 return data->l_elbow_roll;
1659 data->l_elbow_roll = new_l_elbow_roll;
1669 return data->l_hip_yaw_pitch;
1689 data->l_hip_yaw_pitch = new_l_hip_yaw_pitch;
1699 return data->l_hip_roll;
1719 data->l_hip_roll = new_l_hip_roll;
1729 return data->l_hip_pitch;
1749 data->l_hip_pitch = new_l_hip_pitch;
1759 return data->l_knee_pitch;
1779 data->l_knee_pitch = new_l_knee_pitch;
1789 return data->l_ankle_pitch;
1809 data->l_ankle_pitch = new_l_ankle_pitch;
1819 return data->l_ankle_roll;
1839 data->l_ankle_roll = new_l_ankle_roll;
1849 return data->l_wrist_yaw;
1869 data->l_wrist_yaw = new_l_wrist_yaw;
1879 return data->l_hand;
1899 data->l_hand = new_l_hand;
1909 return data->r_shoulder_pitch;
1929 data->r_shoulder_pitch = new_r_shoulder_pitch;
1939 return data->r_shoulder_roll;
1959 data->r_shoulder_roll = new_r_shoulder_roll;
1969 return data->r_elbow_yaw;
1989 data->r_elbow_yaw = new_r_elbow_yaw;
1999 return data->r_elbow_roll;
2019 data->r_elbow_roll = new_r_elbow_roll;
2029 return data->r_wrist_yaw;
2049 data->r_wrist_yaw = new_r_wrist_yaw;
2059 return data->r_hand;
2079 data->r_hand = new_r_hand;
2089 return data->r_hip_yaw_pitch;
2109 data->r_hip_yaw_pitch = new_r_hip_yaw_pitch;
2119 return data->r_hip_roll;
2139 data->r_hip_roll = new_r_hip_roll;
2149 return data->r_hip_pitch;
2169 data->r_hip_pitch = new_r_hip_pitch;
2179 return data->r_knee_pitch;
2199 data->r_knee_pitch = new_r_knee_pitch;
2209 return data->r_ankle_pitch;
2229 data->r_ankle_pitch = new_r_ankle_pitch;
2239 return data->r_ankle_roll;
2259 data->r_ankle_roll = new_r_ankle_roll;
2297 data->time = new_time;
2324 data_size =
sizeof(MoveServoMessage_data_t);
2327 data = (MoveServoMessage_data_t *)
data_ptr;
2329 data->servo = ini_servo;
2330 data->value = ini_value;
2331 data->speed = ini_speed;
2339 data_size =
sizeof(MoveServoMessage_data_t);
2342 data = (MoveServoMessage_data_t *)
data_ptr;
2363 data = (MoveServoMessage_data_t *)
data_ptr;
2403 data->servo = new_servo;
2433 data->value = new_value;
2467 data->speed = new_speed;
2516 NaoJointPositionInterface::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")
2518 data_size =
sizeof(MoveServosMessage_data_t);
2521 data = (MoveServosMessage_data_t *)
data_ptr;
2523 data->speed = ini_speed;
2524 data->head_yaw = ini_head_yaw;
2525 data->head_pitch = ini_head_pitch;
2526 data->l_shoulder_pitch = ini_l_shoulder_pitch;
2527 data->l_shoulder_roll = ini_l_shoulder_roll;
2528 data->l_elbow_yaw = ini_l_elbow_yaw;
2529 data->l_elbow_roll = ini_l_elbow_roll;
2530 data->l_wrist_yaw = ini_l_wrist_yaw;
2531 data->l_hand = ini_l_hand;
2532 data->l_hip_yaw_pitch = ini_l_hip_yaw_pitch;
2533 data->l_hip_roll = ini_l_hip_roll;
2534 data->l_hip_pitch = ini_l_hip_pitch;
2535 data->l_knee_pitch = ini_l_knee_pitch;
2536 data->l_ankle_pitch = ini_l_ankle_pitch;
2537 data->l_ankle_roll = ini_l_ankle_roll;
2538 data->r_shoulder_pitch = ini_r_shoulder_pitch;
2539 data->r_shoulder_roll = ini_r_shoulder_roll;
2540 data->r_elbow_yaw = ini_r_elbow_yaw;
2541 data->r_elbow_roll = ini_r_elbow_roll;
2542 data->r_wrist_yaw = ini_r_wrist_yaw;
2543 data->r_hand = ini_r_hand;
2544 data->r_hip_yaw_pitch = ini_r_hip_yaw_pitch;
2545 data->r_hip_roll = ini_r_hip_roll;
2546 data->r_hip_pitch = ini_r_hip_pitch;
2547 data->r_knee_pitch = ini_r_knee_pitch;
2548 data->r_ankle_pitch = ini_r_ankle_pitch;
2549 data->r_ankle_roll = ini_r_ankle_roll;
2581 data_size =
sizeof(MoveServosMessage_data_t);
2584 data = (MoveServosMessage_data_t *)
data_ptr;
2629 data = (MoveServosMessage_data_t *)
data_ptr;
2665 data->speed = new_speed;
2675 return data->head_yaw;
2695 data->head_yaw = new_head_yaw;
2705 return data->head_pitch;
2725 data->head_pitch = new_head_pitch;
2735 return data->l_shoulder_pitch;
2755 data->l_shoulder_pitch = new_l_shoulder_pitch;
2765 return data->l_shoulder_roll;
2785 data->l_shoulder_roll = new_l_shoulder_roll;
2795 return data->l_elbow_yaw;
2815 data->l_elbow_yaw = new_l_elbow_yaw;
2825 return data->l_elbow_roll;
2845 data->l_elbow_roll = new_l_elbow_roll;
2855 return data->l_wrist_yaw;
2875 data->l_wrist_yaw = new_l_wrist_yaw;
2885 return data->l_hand;
2905 data->l_hand = new_l_hand;
2915 return data->l_hip_yaw_pitch;
2935 data->l_hip_yaw_pitch = new_l_hip_yaw_pitch;
2945 return data->l_hip_roll;
2965 data->l_hip_roll = new_l_hip_roll;
2975 return data->l_hip_pitch;
2995 data->l_hip_pitch = new_l_hip_pitch;
3005 return data->l_knee_pitch;
3025 data->l_knee_pitch = new_l_knee_pitch;
3035 return data->l_ankle_pitch;
3055 data->l_ankle_pitch = new_l_ankle_pitch;
3065 return data->l_ankle_roll;
3085 data->l_ankle_roll = new_l_ankle_roll;
3095 return data->r_shoulder_pitch;
3115 data->r_shoulder_pitch = new_r_shoulder_pitch;
3125 return data->r_shoulder_roll;
3145 data->r_shoulder_roll = new_r_shoulder_roll;
3155 return data->r_elbow_yaw;
3175 data->r_elbow_yaw = new_r_elbow_yaw;
3185 return data->r_elbow_roll;
3205 data->r_elbow_roll = new_r_elbow_roll;
3215 return data->r_wrist_yaw;
3235 data->r_wrist_yaw = new_r_wrist_yaw;
3245 return data->r_hand;
3265 data->r_hand = new_r_hand;
3275 return data->r_hip_yaw_pitch;
3295 data->r_hip_yaw_pitch = new_r_hip_yaw_pitch;
3305 return data->r_hip_roll;
3325 data->r_hip_roll = new_r_hip_roll;
3335 return data->r_hip_pitch;
3355 data->r_hip_pitch = new_r_hip_pitch;
3365 return data->r_knee_pitch;
3385 data->r_knee_pitch = new_r_knee_pitch;
3395 return data->r_ankle_pitch;
3415 data->r_ankle_pitch = new_r_ankle_pitch;
3425 return data->r_ankle_roll;
3445 data->r_ankle_roll = new_r_ankle_roll;
static const uint32_t SERVO_l_shoulder_roll
SERVO_l_shoulder_roll constant.
uint32_t servo() const
Get servo value.
size_t maxlenof_head_pitch() const
Get maximum length of head_pitch value.
float r_hip_roll() const
Get r_hip_roll value.
MoveServosMessage()
Constructor.
void set_r_wrist_yaw(const float new_r_wrist_yaw)
Set r_wrist_yaw value.
size_t maxlenof_r_hip_roll() const
Get maximum length of r_hip_roll value.
void set_r_hip_pitch(const float new_r_hip_pitch)
Set r_hip_pitch value.
NaoJointPositionInterface Fawkes BlackBoard Interface.
~SetServoMessage()
Destructor.
size_t maxlenof_r_elbow_roll() const
Get maximum length of r_elbow_roll value.
void set_head_pitch(const float new_head_pitch)
Set head_pitch value.
static const uint32_t SERVO_l_ankle_roll
SERVO_l_ankle_roll constant.
SetServoMessage Fawkes BlackBoard Interface Message.
void set_l_hip_roll(const float new_l_hip_roll)
Set l_hip_roll value.
float l_elbow_roll() const
Get l_elbow_roll value.
void set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch)
Set l_hip_yaw_pitch value.
void * data_ptr
Pointer to memory that contains local data.
static const uint32_t SERVO_min
SERVO_min constant.
size_t maxlenof_r_ankle_pitch() const
Get maximum length of r_ankle_pitch value.
float r_hip_yaw_pitch() const
Get r_hip_yaw_pitch value.
void set_r_elbow_yaw(const float new_r_elbow_yaw)
Set r_elbow_yaw value.
float l_elbow_roll() const
Get l_elbow_roll value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
size_t maxlenof_l_hip_yaw_pitch() const
Get maximum length of l_hip_yaw_pitch value.
int32_t time() const
Get time value.
size_t maxlenof_l_hip_roll() const
Get maximum length of l_hip_roll value.
float r_hip_yaw_pitch() const
Get r_hip_yaw_pitch value.
size_t maxlenof_l_hip_yaw_pitch() const
Get maximum length of l_hip_yaw_pitch value.
float r_wrist_yaw() const
Get r_wrist_yaw value.
float r_elbow_roll() const
Get r_elbow_roll value.
static const uint32_t SERVO_l_hip_yaw_pitch
SERVO_l_hip_yaw_pitch constant.
~MoveServoMessage()
Destructor.
SetServosMessage Fawkes BlackBoard Interface Message.
float l_ankle_pitch() const
Get l_ankle_pitch value.
float head_yaw() const
Get head_yaw value.
void set_l_hip_pitch(const float new_l_hip_pitch)
Set l_hip_pitch value.
float l_hip_pitch() const
Get l_hip_pitch value.
float l_shoulder_pitch() const
Get l_shoulder_pitch value.
void set_servo(const uint32_t new_servo)
Set servo value.
static const uint32_t SERVO_r_hip_roll
SERVO_r_hip_roll constant.
void set_l_ankle_pitch(const float new_l_ankle_pitch)
Set l_ankle_pitch value.
float r_elbow_yaw() const
Get r_elbow_yaw value.
float r_hip_pitch() const
Get r_hip_pitch value.
void set_l_elbow_roll(const float new_l_elbow_roll)
Set l_elbow_roll value.
void set_l_knee_pitch(const float new_l_knee_pitch)
Set l_knee_pitch value.
void set_value(const float new_value)
Set value value.
size_t maxlenof_l_hand() const
Get maximum length of l_hand value.
static const uint32_t SERVO_max
SERVO_max constant.
float l_hip_roll() const
Get l_hip_roll value.
void set_speed(const float new_speed)
Set speed value.
Fawkes library namespace.
size_t maxlenof_r_knee_pitch() const
Get maximum length of r_knee_pitch value.
void set_r_knee_pitch(const float new_r_knee_pitch)
Set r_knee_pitch value.
void set_l_wrist_yaw(const float new_l_wrist_yaw)
Set l_wrist_yaw value.
void set_time(const int32_t new_time)
Set time value.
static const uint32_t SERVO_l_wrist_yaw
SERVO_l_wrist_yaw constant.
Timestamp data, must be present and first entries for each interface data structs! This leans on time...
void set_l_elbow_yaw(const float new_l_elbow_yaw)
Set l_elbow_yaw value.
void set_r_shoulder_roll(const float new_r_shoulder_roll)
Set r_shoulder_roll value.
size_t maxlenof_l_elbow_roll() const
Get maximum length of l_elbow_roll value.
float l_wrist_yaw() const
Get l_wrist_yaw 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_ankle_roll(const float new_r_ankle_roll)
Set r_ankle_roll value.
MoveServosMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_l_shoulder_pitch() const
Get maximum length of l_shoulder_pitch value.
void set_r_elbow_roll(const float new_r_elbow_roll)
Set r_elbow_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.
float l_knee_pitch() const
Get l_knee_pitch value.
size_t maxlenof_r_ankle_roll() const
Get maximum length of r_ankle_roll value.
void set_l_shoulder_roll(const float new_l_shoulder_roll)
Set l_shoulder_roll value.
void set_r_ankle_pitch(const float new_r_ankle_pitch)
Set r_ankle_pitch value.
void set_l_wrist_yaw(const float new_l_wrist_yaw)
Set l_wrist_yaw value.
size_t maxlenof_servo() const
Get maximum length of servo value.
float r_ankle_roll() const
Get r_ankle_roll value.
size_t maxlenof_value() const
Get maximum length of value value.
void set_r_shoulder_pitch(const float new_r_shoulder_pitch)
Set r_shoulder_pitch value.
static const uint32_t SERVO_l_elbow_yaw
SERVO_l_elbow_yaw constant.
float r_shoulder_roll() const
Get r_shoulder_roll value.
size_t maxlenof_l_ankle_roll() const
Get maximum length of l_ankle_roll value.
size_t maxlenof_r_elbow_yaw() const
Get maximum length of r_elbow_yaw value.
void set_l_ankle_roll(const float new_l_ankle_roll)
Set l_ankle_roll value.
Base class for all Fawkes BlackBoard interfaces.
size_t maxlenof_l_elbow_yaw() const
Get maximum length of l_elbow_yaw value.
void set_l_hand(const float new_l_hand)
Set l_hand value.
size_t maxlenof_r_shoulder_roll() const
Get maximum length of r_shoulder_roll value.
size_t maxlenof_l_knee_pitch() const
Get maximum length of l_knee_pitch value.
size_t maxlenof_r_elbow_yaw() const
Get maximum length of r_elbow_yaw value.
float r_knee_pitch() const
Get r_knee_pitch value.
size_t maxlenof_r_ankle_roll() const
Get maximum length of r_ankle_roll value.
float r_wrist_yaw() const
Get r_wrist_yaw value.
void set_r_elbow_roll(const float new_r_elbow_roll)
Set r_elbow_roll value.
void set_value(const float new_value)
Set value value.
float l_hip_roll() const
Get l_hip_roll value.
float head_pitch() const
Get head_pitch value.
float value() const
Get value value.
float l_ankle_roll() const
Get l_ankle_roll value.
float l_shoulder_roll() const
Get l_shoulder_roll value.
float value() const
Get value value.
static const uint32_t SERVO_l_ankle_pitch
SERVO_l_ankle_pitch constant.
message_data_ts_t * data_ts
data timestamp aliasing pointer
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.
unsigned int data_size
Size of memory needed to hold all data.
MoveServoMessage()
Constructor.
float l_ankle_roll() const
Get l_ankle_roll value.
size_t maxlenof_r_hip_yaw_pitch() const
Get maximum length of r_hip_yaw_pitch value.
static const uint32_t SERVO_l_shoulder_pitch
SERVO_l_shoulder_pitch constant.
void set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch)
Set l_hip_yaw_pitch value.
void set_l_hand(const float new_l_hand)
Set l_hand value.
float l_wrist_yaw() const
Get l_wrist_yaw value.
void set_r_shoulder_roll(const float new_r_shoulder_roll)
Set r_shoulder_roll value.
float r_hip_roll() const
Get r_hip_roll value.
size_t maxlenof_r_wrist_yaw() const
Get maximum length of r_wrist_yaw value.
static const uint32_t SERVO_l_knee_pitch
SERVO_l_knee_pitch constant.
size_t maxlenof_l_knee_pitch() const
Get maximum length of l_knee_pitch value.
void set_l_elbow_roll(const float new_l_elbow_roll)
Set l_elbow_roll value.
static const uint32_t SERVO_r_hand
SERVO_r_hand constant.
static const uint32_t SERVO_r_ankle_roll
SERVO_r_ankle_roll constant.
void set_r_elbow_yaw(const float new_r_elbow_yaw)
Set r_elbow_yaw value.
void * data_ptr
Pointer to local memory storage.
Base class for exceptions in Fawkes.
~SetServosMessage()
Destructor.
void set_servo(const uint32_t new_servo)
Set servo value.
size_t maxlenof_l_hand() const
Get maximum length of l_hand value.
float r_shoulder_pitch() const
Get r_shoulder_pitch value.
float r_ankle_pitch() const
Get r_ankle_pitch value.
size_t maxlenof_r_shoulder_roll() const
Get maximum length of r_shoulder_roll value.
size_t maxlenof_l_ankle_pitch() const
Get maximum length of l_ankle_pitch value.
float head_pitch() const
Get head_pitch value.
size_t maxlenof_servo() const
Get maximum length of servo value.
void set_head_yaw(const float new_head_yaw)
Set head_yaw value.
void set_l_shoulder_roll(const float new_l_shoulder_roll)
Set l_shoulder_roll value.
float l_hip_pitch() const
Get l_hip_pitch value.
float l_elbow_yaw() const
Get l_elbow_yaw value.
float l_hip_yaw_pitch() const
Get l_hip_yaw_pitch value.
void set_r_ankle_roll(const float new_r_ankle_roll)
Set r_ankle_roll value.
void set_r_ankle_pitch(const float new_r_ankle_pitch)
Set r_ankle_pitch value.
void set_head_pitch(const float new_head_pitch)
Set head_pitch value.
size_t maxlenof_r_hip_pitch() const
Get maximum length of r_hip_pitch value.
size_t maxlenof_r_shoulder_pitch() const
Get maximum length of r_shoulder_pitch value.
size_t maxlenof_r_knee_pitch() const
Get maximum length of r_knee_pitch value.
size_t maxlenof_l_hip_pitch() const
Get maximum length of l_hip_pitch value.
size_t maxlenof_head_yaw() const
Get maximum length of head_yaw value.
uint32_t servo() const
Get servo value.
float r_hand() const
Get r_hand value.
size_t maxlenof_r_hip_pitch() const
Get maximum length of r_hip_pitch value.
size_t maxlenof_l_shoulder_roll() const
Get maximum length of l_shoulder_roll value.
static const uint32_t SERVO_r_ankle_pitch
SERVO_r_ankle_pitch constant.
void set_r_hip_roll(const float new_r_hip_roll)
Set r_hip_roll value.
static const uint32_t SERVO_r_elbow_yaw
SERVO_r_elbow_yaw constant.
size_t maxlenof_r_shoulder_pitch() const
Get maximum length of r_shoulder_pitch value.
float r_hand() const
Get r_hand value.
static const uint32_t SERVO_l_elbow_roll
SERVO_l_elbow_roll constant.
float l_elbow_yaw() const
Get l_elbow_yaw value.
float l_shoulder_pitch() const
Get l_shoulder_pitch value.
size_t maxlenof_head_yaw() const
Get maximum length of head_yaw value.
size_t maxlenof_r_elbow_roll() const
Get maximum length of r_elbow_roll 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.
void set_r_hip_roll(const float new_r_hip_roll)
Set r_hip_roll value.
float r_ankle_roll() const
Get r_ankle_roll value.
size_t maxlenof_r_hip_roll() const
Get maximum length of r_hip_roll value.
size_t maxlenof_r_hand() const
Get maximum length of r_hand value.
size_t maxlenof_l_hip_pitch() const
Get maximum length of l_hip_pitch value.
static const uint32_t SERVO_r_elbow_roll
SERVO_r_elbow_roll constant.
size_t maxlenof_r_wrist_yaw() const
Get maximum length of r_wrist_yaw value.
size_t maxlenof_r_ankle_pitch() const
Get maximum length of r_ankle_pitch value.
virtual Message * clone() const
Clone this message.
void set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch)
Set r_hip_yaw_pitch value.
size_t maxlenof_l_ankle_pitch() const
Get maximum length of l_ankle_pitch value.
size_t maxlenof_r_hip_yaw_pitch() const
Get maximum length of r_hip_yaw_pitch value.
SetServoMessage()
Constructor.
static const uint32_t SERVO_r_shoulder_pitch
SERVO_r_shoulder_pitch constant.
static const uint32_t SERVO_head_pitch
SERVO_head_pitch constant.
size_t maxlenof_speed() const
Get maximum length of speed value.
virtual Message * clone() const
Clone this message.
float r_elbow_roll() const
Get r_elbow_roll value.
float r_elbow_yaw() const
Get r_elbow_yaw value.
size_t maxlenof_l_elbow_yaw() const
Get maximum length of l_elbow_yaw value.
size_t maxlenof_l_wrist_yaw() const
Get maximum length of l_wrist_yaw value.
void set_l_hip_roll(const float new_l_hip_roll)
Set l_hip_roll value.
~MoveServosMessage()
Destructor.
void set_l_shoulder_pitch(const float new_l_shoulder_pitch)
Set l_shoulder_pitch value.
static const uint32_t SERVO_l_hip_pitch
SERVO_l_hip_pitch constant.
int32_t time() const
Get time value.
size_t maxlenof_head_pitch() const
Get maximum length of head_pitch value.
float r_shoulder_roll() const
Get r_shoulder_roll value.
float r_knee_pitch() const
Get r_knee_pitch value.
virtual Message * clone() const
Clone this message.
void set_r_shoulder_pitch(const float new_r_shoulder_pitch)
Set r_shoulder_pitch value.
void set_r_knee_pitch(const float new_r_knee_pitch)
Set r_knee_pitch value.
float speed() const
Get speed value.
float l_hand() const
Get l_hand value.
void set_l_shoulder_pitch(const float new_l_shoulder_pitch)
Set l_shoulder_pitch value.
float l_hand() const
Get l_hand value.
size_t maxlenof_value() const
Get maximum length of value value.
void set_l_ankle_pitch(const float new_l_ankle_pitch)
Set l_ankle_pitch value.
SetServosMessage()
Constructor.
MoveServoMessage Fawkes BlackBoard Interface Message.
void add_fieldinfo(interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0)
Add an entry to the info list.
void set_head_yaw(const float new_head_yaw)
Set head_yaw value.
void set_r_hand(const float new_r_hand)
Set r_hand value.
void set_l_elbow_yaw(const float new_l_elbow_yaw)
Set l_elbow_yaw value.
float l_shoulder_roll() const
Get l_shoulder_roll value.
float l_ankle_pitch() const
Get l_ankle_pitch value.
void set_speed(const float new_speed)
Set speed value.
virtual Message * clone() const
Clone this message.
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.
float r_hip_pitch() const
Get r_hip_pitch value.
void set_r_hip_pitch(const float new_r_hip_pitch)
Set r_hip_pitch value.
size_t maxlenof_l_wrist_yaw() const
Get maximum length of l_wrist_yaw value.
float r_ankle_pitch() const
Get r_ankle_pitch value.
static const uint32_t SERVO_r_wrist_yaw
SERVO_r_wrist_yaw constant.
void set_r_wrist_yaw(const float new_r_wrist_yaw)
Set r_wrist_yaw value.
size_t maxlenof_r_hand() const
Get maximum length of r_hand value.
void set_l_hip_pitch(const float new_l_hip_pitch)
Set l_hip_pitch value.
void set_r_hand(const float new_r_hand)
Set r_hand value.
float r_shoulder_pitch() const
Get r_shoulder_pitch value.
size_t maxlenof_l_shoulder_roll() const
Get maximum length of l_shoulder_roll value.
float l_knee_pitch() const
Get l_knee_pitch value.
static const uint32_t SERVO_head_yaw
SERVO_head_yaw constant.
void set_time(const int32_t new_time)
Set time value.
const char * type() const
Get type of interface.
size_t maxlenof_speed() const
Get maximum length of speed value.
static const uint32_t SERVO_l_hip_roll
SERVO_l_hip_roll constant.
static const uint32_t SERVO_r_shoulder_roll
SERVO_r_shoulder_roll constant.
size_t maxlenof_time() const
Get maximum length of time value.
32 bit unsigned integer field
float head_yaw() const
Get head_yaw value.
float speed() const
Get speed value.
RobotType
Enumeration describing the actual version of the robot that's being used.
size_t maxlenof_time() const
Get maximum length of time value.
float l_hip_yaw_pitch() const
Get l_hip_yaw_pitch value.
size_t maxlenof_l_ankle_roll() const
Get maximum length of l_ankle_roll value.