24 #include <interfaces/NaoJointPositionInterface.h> 26 #include <core/exceptions/software.h> 102 NaoJointPositionInterface::NaoJointPositionInterface() : Interface()
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};
149 NaoJointPositionInterface::~NaoJointPositionInterface()
158 NaoJointPositionInterface::tostring_RobotType(
RobotType value)
const 161 case ROBOTYPE_ACADEMIC:
return "ROBOTYPE_ACADEMIC";
162 case ROBOTYPE_ROBOCUP:
return "ROBOTYPE_ROBOCUP";
163 default:
return "UNKNOWN";
172 NaoJointPositionInterface::robot_type()
const 182 NaoJointPositionInterface::maxlenof_robot_type()
const 192 NaoJointPositionInterface::set_robot_type(
const RobotType new_robot_type)
194 data->robot_type = new_robot_type;
207 NaoJointPositionInterface::robot_version()
const 209 return data->robot_version;
223 NaoJointPositionInterface::robot_version(
unsigned int index)
const 226 throw Exception(
"Index value %u out of bounds (0..4)", index);
228 return data->robot_version[index];
236 NaoJointPositionInterface::maxlenof_robot_version()
const 250 NaoJointPositionInterface::set_robot_version(
const uint8_t * new_robot_version)
252 memcpy(data->robot_version, new_robot_version,
sizeof(uint8_t) * 4);
266 NaoJointPositionInterface::set_robot_version(
unsigned int index,
const uint8_t new_robot_version)
269 throw Exception(
"Index value %u out of bounds (0..4)", index);
271 data->robot_version[index] = new_robot_version;
279 NaoJointPositionInterface::head_yaw()
const 281 return data->head_yaw;
289 NaoJointPositionInterface::maxlenof_head_yaw()
const 299 NaoJointPositionInterface::set_head_yaw(
const float new_head_yaw)
301 data->head_yaw = new_head_yaw;
310 NaoJointPositionInterface::head_pitch()
const 312 return data->head_pitch;
320 NaoJointPositionInterface::maxlenof_head_pitch()
const 330 NaoJointPositionInterface::set_head_pitch(
const float new_head_pitch)
332 data->head_pitch = new_head_pitch;
341 NaoJointPositionInterface::l_shoulder_pitch()
const 343 return data->l_shoulder_pitch;
351 NaoJointPositionInterface::maxlenof_l_shoulder_pitch()
const 361 NaoJointPositionInterface::set_l_shoulder_pitch(
const float new_l_shoulder_pitch)
363 data->l_shoulder_pitch = new_l_shoulder_pitch;
372 NaoJointPositionInterface::l_shoulder_roll()
const 374 return data->l_shoulder_roll;
382 NaoJointPositionInterface::maxlenof_l_shoulder_roll()
const 392 NaoJointPositionInterface::set_l_shoulder_roll(
const float new_l_shoulder_roll)
394 data->l_shoulder_roll = new_l_shoulder_roll;
403 NaoJointPositionInterface::l_elbow_yaw()
const 405 return data->l_elbow_yaw;
413 NaoJointPositionInterface::maxlenof_l_elbow_yaw()
const 423 NaoJointPositionInterface::set_l_elbow_yaw(
const float new_l_elbow_yaw)
425 data->l_elbow_yaw = new_l_elbow_yaw;
434 NaoJointPositionInterface::l_elbow_roll()
const 436 return data->l_elbow_roll;
444 NaoJointPositionInterface::maxlenof_l_elbow_roll()
const 454 NaoJointPositionInterface::set_l_elbow_roll(
const float new_l_elbow_roll)
456 data->l_elbow_roll = new_l_elbow_roll;
465 NaoJointPositionInterface::l_wrist_yaw()
const 467 return data->l_wrist_yaw;
475 NaoJointPositionInterface::maxlenof_l_wrist_yaw()
const 485 NaoJointPositionInterface::set_l_wrist_yaw(
const float new_l_wrist_yaw)
487 data->l_wrist_yaw = new_l_wrist_yaw;
496 NaoJointPositionInterface::l_hand()
const 506 NaoJointPositionInterface::maxlenof_l_hand()
const 516 NaoJointPositionInterface::set_l_hand(
const float new_l_hand)
518 data->l_hand = new_l_hand;
527 NaoJointPositionInterface::l_hip_yaw_pitch()
const 529 return data->l_hip_yaw_pitch;
537 NaoJointPositionInterface::maxlenof_l_hip_yaw_pitch()
const 547 NaoJointPositionInterface::set_l_hip_yaw_pitch(
const float new_l_hip_yaw_pitch)
549 data->l_hip_yaw_pitch = new_l_hip_yaw_pitch;
558 NaoJointPositionInterface::l_hip_roll()
const 560 return data->l_hip_roll;
568 NaoJointPositionInterface::maxlenof_l_hip_roll()
const 578 NaoJointPositionInterface::set_l_hip_roll(
const float new_l_hip_roll)
580 data->l_hip_roll = new_l_hip_roll;
589 NaoJointPositionInterface::l_hip_pitch()
const 591 return data->l_hip_pitch;
599 NaoJointPositionInterface::maxlenof_l_hip_pitch()
const 609 NaoJointPositionInterface::set_l_hip_pitch(
const float new_l_hip_pitch)
611 data->l_hip_pitch = new_l_hip_pitch;
620 NaoJointPositionInterface::l_knee_pitch()
const 622 return data->l_knee_pitch;
630 NaoJointPositionInterface::maxlenof_l_knee_pitch()
const 640 NaoJointPositionInterface::set_l_knee_pitch(
const float new_l_knee_pitch)
642 data->l_knee_pitch = new_l_knee_pitch;
651 NaoJointPositionInterface::l_ankle_pitch()
const 653 return data->l_ankle_pitch;
661 NaoJointPositionInterface::maxlenof_l_ankle_pitch()
const 671 NaoJointPositionInterface::set_l_ankle_pitch(
const float new_l_ankle_pitch)
673 data->l_ankle_pitch = new_l_ankle_pitch;
682 NaoJointPositionInterface::l_ankle_roll()
const 684 return data->l_ankle_roll;
692 NaoJointPositionInterface::maxlenof_l_ankle_roll()
const 702 NaoJointPositionInterface::set_l_ankle_roll(
const float new_l_ankle_roll)
704 data->l_ankle_roll = new_l_ankle_roll;
713 NaoJointPositionInterface::r_shoulder_pitch()
const 715 return data->r_shoulder_pitch;
723 NaoJointPositionInterface::maxlenof_r_shoulder_pitch()
const 733 NaoJointPositionInterface::set_r_shoulder_pitch(
const float new_r_shoulder_pitch)
735 data->r_shoulder_pitch = new_r_shoulder_pitch;
744 NaoJointPositionInterface::r_shoulder_roll()
const 746 return data->r_shoulder_roll;
754 NaoJointPositionInterface::maxlenof_r_shoulder_roll()
const 764 NaoJointPositionInterface::set_r_shoulder_roll(
const float new_r_shoulder_roll)
766 data->r_shoulder_roll = new_r_shoulder_roll;
775 NaoJointPositionInterface::r_elbow_yaw()
const 777 return data->r_elbow_yaw;
785 NaoJointPositionInterface::maxlenof_r_elbow_yaw()
const 795 NaoJointPositionInterface::set_r_elbow_yaw(
const float new_r_elbow_yaw)
797 data->r_elbow_yaw = new_r_elbow_yaw;
806 NaoJointPositionInterface::r_elbow_roll()
const 808 return data->r_elbow_roll;
816 NaoJointPositionInterface::maxlenof_r_elbow_roll()
const 826 NaoJointPositionInterface::set_r_elbow_roll(
const float new_r_elbow_roll)
828 data->r_elbow_roll = new_r_elbow_roll;
837 NaoJointPositionInterface::r_wrist_yaw()
const 839 return data->r_wrist_yaw;
847 NaoJointPositionInterface::maxlenof_r_wrist_yaw()
const 857 NaoJointPositionInterface::set_r_wrist_yaw(
const float new_r_wrist_yaw)
859 data->r_wrist_yaw = new_r_wrist_yaw;
868 NaoJointPositionInterface::r_hand()
const 878 NaoJointPositionInterface::maxlenof_r_hand()
const 888 NaoJointPositionInterface::set_r_hand(
const float new_r_hand)
890 data->r_hand = new_r_hand;
899 NaoJointPositionInterface::r_hip_yaw_pitch()
const 901 return data->r_hip_yaw_pitch;
909 NaoJointPositionInterface::maxlenof_r_hip_yaw_pitch()
const 919 NaoJointPositionInterface::set_r_hip_yaw_pitch(
const float new_r_hip_yaw_pitch)
921 data->r_hip_yaw_pitch = new_r_hip_yaw_pitch;
930 NaoJointPositionInterface::r_hip_roll()
const 932 return data->r_hip_roll;
940 NaoJointPositionInterface::maxlenof_r_hip_roll()
const 950 NaoJointPositionInterface::set_r_hip_roll(
const float new_r_hip_roll)
952 data->r_hip_roll = new_r_hip_roll;
961 NaoJointPositionInterface::r_hip_pitch()
const 963 return data->r_hip_pitch;
971 NaoJointPositionInterface::maxlenof_r_hip_pitch()
const 981 NaoJointPositionInterface::set_r_hip_pitch(
const float new_r_hip_pitch)
983 data->r_hip_pitch = new_r_hip_pitch;
992 NaoJointPositionInterface::r_knee_pitch()
const 994 return data->r_knee_pitch;
1002 NaoJointPositionInterface::maxlenof_r_knee_pitch()
const 1012 NaoJointPositionInterface::set_r_knee_pitch(
const float new_r_knee_pitch)
1014 data->r_knee_pitch = new_r_knee_pitch;
1015 data_changed =
true;
1023 NaoJointPositionInterface::r_ankle_pitch()
const 1025 return data->r_ankle_pitch;
1033 NaoJointPositionInterface::maxlenof_r_ankle_pitch()
const 1043 NaoJointPositionInterface::set_r_ankle_pitch(
const float new_r_ankle_pitch)
1045 data->r_ankle_pitch = new_r_ankle_pitch;
1046 data_changed =
true;
1054 NaoJointPositionInterface::r_ankle_roll()
const 1056 return data->r_ankle_roll;
1064 NaoJointPositionInterface::maxlenof_r_ankle_roll()
const 1074 NaoJointPositionInterface::set_r_ankle_roll(
const float new_r_ankle_roll)
1076 data->r_ankle_roll = new_r_ankle_roll;
1077 data_changed =
true;
1089 NaoJointPositionInterface::time()
const 1099 NaoJointPositionInterface::maxlenof_time()
const 1113 NaoJointPositionInterface::set_time(
const int32_t new_time)
1115 data->time = new_time;
1116 data_changed =
true;
1121 NaoJointPositionInterface::create_message(
const char *type)
const 1123 if ( strncmp(
"SetServoMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1125 }
else if ( strncmp(
"SetServosMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1127 }
else if ( strncmp(
"MoveServoMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1129 }
else if ( strncmp(
"MoveServosMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1133 "message type for this interface type.", type);
1142 NaoJointPositionInterface::copy_values(
const Interface *other)
1147 type(), other->
type());
1149 memcpy(data, oi->data,
sizeof(NaoJointPositionInterface_data_t));
1153 NaoJointPositionInterface::enum_tostring(
const char *enumtype,
int val)
const 1155 if (strcmp(enumtype,
"RobotType") == 0) {
1156 return tostring_RobotType((
RobotType)val);
1174 NaoJointPositionInterface::SetServoMessage::SetServoMessage(
const uint32_t ini_servo,
const float ini_value,
const int32_t ini_time) :
Message(
"SetServoMessage")
1176 data_size =
sizeof(SetServoMessage_data_t);
1179 data = (SetServoMessage_data_t *)
data_ptr;
1181 data->servo = ini_servo;
1182 data->value = ini_value;
1183 data->time = ini_time;
1193 data_size =
sizeof(SetServoMessage_data_t);
1196 data = (SetServoMessage_data_t *)
data_ptr;
1219 data = (SetServoMessage_data_t *)
data_ptr;
1255 data->servo = new_servo;
1285 data->value = new_value;
1323 data->time = new_time;
1372 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")
1374 data_size =
sizeof(SetServosMessage_data_t);
1377 data = (SetServosMessage_data_t *)
data_ptr;
1379 data->head_yaw = ini_head_yaw;
1380 data->head_pitch = ini_head_pitch;
1381 data->l_shoulder_pitch = ini_l_shoulder_pitch;
1382 data->l_shoulder_roll = ini_l_shoulder_roll;
1383 data->l_elbow_yaw = ini_l_elbow_yaw;
1384 data->l_elbow_roll = ini_l_elbow_roll;
1385 data->l_hip_yaw_pitch = ini_l_hip_yaw_pitch;
1386 data->l_hip_roll = ini_l_hip_roll;
1387 data->l_hip_pitch = ini_l_hip_pitch;
1388 data->l_knee_pitch = ini_l_knee_pitch;
1389 data->l_ankle_pitch = ini_l_ankle_pitch;
1390 data->l_ankle_roll = ini_l_ankle_roll;
1391 data->l_wrist_yaw = ini_l_wrist_yaw;
1392 data->l_hand = ini_l_hand;
1393 data->r_shoulder_pitch = ini_r_shoulder_pitch;
1394 data->r_shoulder_roll = ini_r_shoulder_roll;
1395 data->r_elbow_yaw = ini_r_elbow_yaw;
1396 data->r_elbow_roll = ini_r_elbow_roll;
1397 data->r_wrist_yaw = ini_r_wrist_yaw;
1398 data->r_hand = ini_r_hand;
1399 data->r_hip_yaw_pitch = ini_r_hip_yaw_pitch;
1400 data->r_hip_roll = ini_r_hip_roll;
1401 data->r_hip_pitch = ini_r_hip_pitch;
1402 data->r_knee_pitch = ini_r_knee_pitch;
1403 data->r_ankle_pitch = ini_r_ankle_pitch;
1404 data->r_ankle_roll = ini_r_ankle_roll;
1405 data->time = ini_time;
1439 data_size =
sizeof(SetServosMessage_data_t);
1442 data = (SetServosMessage_data_t *)
data_ptr;
1489 data = (SetServosMessage_data_t *)
data_ptr;
1501 return data->head_yaw;
1521 data->head_yaw = new_head_yaw;
1531 return data->head_pitch;
1551 data->head_pitch = new_head_pitch;
1561 return data->l_shoulder_pitch;
1581 data->l_shoulder_pitch = new_l_shoulder_pitch;
1591 return data->l_shoulder_roll;
1611 data->l_shoulder_roll = new_l_shoulder_roll;
1621 return data->l_elbow_yaw;
1641 data->l_elbow_yaw = new_l_elbow_yaw;
1651 return data->l_elbow_roll;
1671 data->l_elbow_roll = new_l_elbow_roll;
1681 return data->l_hip_yaw_pitch;
1701 data->l_hip_yaw_pitch = new_l_hip_yaw_pitch;
1711 return data->l_hip_roll;
1731 data->l_hip_roll = new_l_hip_roll;
1741 return data->l_hip_pitch;
1761 data->l_hip_pitch = new_l_hip_pitch;
1771 return data->l_knee_pitch;
1791 data->l_knee_pitch = new_l_knee_pitch;
1801 return data->l_ankle_pitch;
1821 data->l_ankle_pitch = new_l_ankle_pitch;
1831 return data->l_ankle_roll;
1851 data->l_ankle_roll = new_l_ankle_roll;
1861 return data->l_wrist_yaw;
1881 data->l_wrist_yaw = new_l_wrist_yaw;
1891 return data->l_hand;
1911 data->l_hand = new_l_hand;
1921 return data->r_shoulder_pitch;
1941 data->r_shoulder_pitch = new_r_shoulder_pitch;
1951 return data->r_shoulder_roll;
1971 data->r_shoulder_roll = new_r_shoulder_roll;
1981 return data->r_elbow_yaw;
2001 data->r_elbow_yaw = new_r_elbow_yaw;
2011 return data->r_elbow_roll;
2031 data->r_elbow_roll = new_r_elbow_roll;
2041 return data->r_wrist_yaw;
2061 data->r_wrist_yaw = new_r_wrist_yaw;
2071 return data->r_hand;
2091 data->r_hand = new_r_hand;
2101 return data->r_hip_yaw_pitch;
2121 data->r_hip_yaw_pitch = new_r_hip_yaw_pitch;
2131 return data->r_hip_roll;
2151 data->r_hip_roll = new_r_hip_roll;
2161 return data->r_hip_pitch;
2181 data->r_hip_pitch = new_r_hip_pitch;
2191 return data->r_knee_pitch;
2211 data->r_knee_pitch = new_r_knee_pitch;
2221 return data->r_ankle_pitch;
2241 data->r_ankle_pitch = new_r_ankle_pitch;
2251 return data->r_ankle_roll;
2271 data->r_ankle_roll = new_r_ankle_roll;
2309 data->time = new_time;
2336 data_size =
sizeof(MoveServoMessage_data_t);
2339 data = (MoveServoMessage_data_t *)
data_ptr;
2341 data->servo = ini_servo;
2342 data->value = ini_value;
2343 data->speed = ini_speed;
2353 data_size =
sizeof(MoveServoMessage_data_t);
2356 data = (MoveServoMessage_data_t *)
data_ptr;
2379 data = (MoveServoMessage_data_t *)
data_ptr;
2419 data->servo = new_servo;
2449 data->value = new_value;
2483 data->speed = new_speed;
2532 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")
2534 data_size =
sizeof(MoveServosMessage_data_t);
2537 data = (MoveServosMessage_data_t *)
data_ptr;
2539 data->speed = ini_speed;
2540 data->head_yaw = ini_head_yaw;
2541 data->head_pitch = ini_head_pitch;
2542 data->l_shoulder_pitch = ini_l_shoulder_pitch;
2543 data->l_shoulder_roll = ini_l_shoulder_roll;
2544 data->l_elbow_yaw = ini_l_elbow_yaw;
2545 data->l_elbow_roll = ini_l_elbow_roll;
2546 data->l_wrist_yaw = ini_l_wrist_yaw;
2547 data->l_hand = ini_l_hand;
2548 data->l_hip_yaw_pitch = ini_l_hip_yaw_pitch;
2549 data->l_hip_roll = ini_l_hip_roll;
2550 data->l_hip_pitch = ini_l_hip_pitch;
2551 data->l_knee_pitch = ini_l_knee_pitch;
2552 data->l_ankle_pitch = ini_l_ankle_pitch;
2553 data->l_ankle_roll = ini_l_ankle_roll;
2554 data->r_shoulder_pitch = ini_r_shoulder_pitch;
2555 data->r_shoulder_roll = ini_r_shoulder_roll;
2556 data->r_elbow_yaw = ini_r_elbow_yaw;
2557 data->r_elbow_roll = ini_r_elbow_roll;
2558 data->r_wrist_yaw = ini_r_wrist_yaw;
2559 data->r_hand = ini_r_hand;
2560 data->r_hip_yaw_pitch = ini_r_hip_yaw_pitch;
2561 data->r_hip_roll = ini_r_hip_roll;
2562 data->r_hip_pitch = ini_r_hip_pitch;
2563 data->r_knee_pitch = ini_r_knee_pitch;
2564 data->r_ankle_pitch = ini_r_ankle_pitch;
2565 data->r_ankle_roll = ini_r_ankle_roll;
2599 data_size =
sizeof(MoveServosMessage_data_t);
2602 data = (MoveServosMessage_data_t *)
data_ptr;
2649 data = (MoveServosMessage_data_t *)
data_ptr;
2685 data->speed = new_speed;
2695 return data->head_yaw;
2715 data->head_yaw = new_head_yaw;
2725 return data->head_pitch;
2745 data->head_pitch = new_head_pitch;
2755 return data->l_shoulder_pitch;
2775 data->l_shoulder_pitch = new_l_shoulder_pitch;
2785 return data->l_shoulder_roll;
2805 data->l_shoulder_roll = new_l_shoulder_roll;
2815 return data->l_elbow_yaw;
2835 data->l_elbow_yaw = new_l_elbow_yaw;
2845 return data->l_elbow_roll;
2865 data->l_elbow_roll = new_l_elbow_roll;
2875 return data->l_wrist_yaw;
2895 data->l_wrist_yaw = new_l_wrist_yaw;
2905 return data->l_hand;
2925 data->l_hand = new_l_hand;
2935 return data->l_hip_yaw_pitch;
2955 data->l_hip_yaw_pitch = new_l_hip_yaw_pitch;
2965 return data->l_hip_roll;
2985 data->l_hip_roll = new_l_hip_roll;
2995 return data->l_hip_pitch;
3015 data->l_hip_pitch = new_l_hip_pitch;
3025 return data->l_knee_pitch;
3045 data->l_knee_pitch = new_l_knee_pitch;
3055 return data->l_ankle_pitch;
3075 data->l_ankle_pitch = new_l_ankle_pitch;
3085 return data->l_ankle_roll;
3105 data->l_ankle_roll = new_l_ankle_roll;
3115 return data->r_shoulder_pitch;
3135 data->r_shoulder_pitch = new_r_shoulder_pitch;
3145 return data->r_shoulder_roll;
3165 data->r_shoulder_roll = new_r_shoulder_roll;
3175 return data->r_elbow_yaw;
3195 data->r_elbow_yaw = new_r_elbow_yaw;
3205 return data->r_elbow_roll;
3225 data->r_elbow_roll = new_r_elbow_roll;
3235 return data->r_wrist_yaw;
3255 data->r_wrist_yaw = new_r_wrist_yaw;
3265 return data->r_hand;
3285 data->r_hand = new_r_hand;
3295 return data->r_hip_yaw_pitch;
3315 data->r_hip_yaw_pitch = new_r_hip_yaw_pitch;
3325 return data->r_hip_roll;
3345 data->r_hip_roll = new_r_hip_roll;
3355 return data->r_hip_pitch;
3375 data->r_hip_pitch = new_r_hip_pitch;
3385 return data->r_knee_pitch;
3405 data->r_knee_pitch = new_r_knee_pitch;
3415 return data->r_ankle_pitch;
3435 data->r_ankle_pitch = new_r_ankle_pitch;
3445 return data->r_ankle_roll;
3465 data->r_ankle_roll = new_r_ankle_roll;
static const uint32_t SERVO_l_shoulder_roll
SERVO_l_shoulder_roll constant.
float l_elbow_roll() const
Get l_elbow_roll value.
float speed() const
Get speed value.
RoboCup version with 21 DoF.
MoveServosMessage()
Constructor.
void set_r_wrist_yaw(const float new_r_wrist_yaw)
Set r_wrist_yaw 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.
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_l_hip_roll() const
Get maximum length of l_hip_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.
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_shoulder_roll() const
Get maximum length of r_shoulder_roll value.
size_t maxlenof_value() const
Get maximum length of value value.
void set_r_elbow_yaw(const float new_r_elbow_yaw)
Set r_elbow_yaw 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.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
size_t maxlenof_l_hip_pitch() const
Get maximum length of l_hip_pitch value.
static const uint32_t SERVO_l_hip_yaw_pitch
SERVO_l_hip_yaw_pitch constant.
~MoveServoMessage()
Destructor.
size_t maxlenof_speed() const
Get maximum length of speed value.
SetServosMessage Fawkes BlackBoard Interface Message.
float l_shoulder_roll() const
Get l_shoulder_roll value.
void set_l_hip_pitch(const float new_l_hip_pitch)
Set l_hip_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.
float l_knee_pitch() const
Get l_knee_pitch value.
void set_l_ankle_pitch(const float new_l_ankle_pitch)
Set l_ankle_pitch value.
size_t maxlenof_head_pitch() const
Get maximum length of head_pitch value.
size_t maxlenof_l_hand() const
Get maximum length of l_hand 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_r_hip_roll() const
Get maximum length of r_hip_roll value.
size_t maxlenof_l_shoulder_roll() const
Get maximum length of l_shoulder_roll value.
static const uint32_t SERVO_max
SERVO_max constant.
size_t maxlenof_speed() const
Get maximum length of speed value.
float r_hip_roll() const
Get r_hip_roll value.
void set_speed(const float new_speed)
Set speed value.
size_t maxlenof_l_knee_pitch() const
Get maximum length of l_knee_pitch value.
size_t maxlenof_time() const
Get maximum length of time value.
Fawkes library namespace.
void set_r_knee_pitch(const float new_r_knee_pitch)
Set r_knee_pitch value.
size_t maxlenof_l_hip_pitch() const
Get maximum length of l_hip_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.
size_t maxlenof_l_ankle_pitch() const
Get maximum length of l_ankle_pitch value.
size_t maxlenof_r_knee_pitch() const
Get maximum length of r_knee_pitch value.
void set_r_shoulder_roll(const float new_r_shoulder_roll)
Set r_shoulder_roll value.
size_t maxlenof_l_shoulder_pitch() const
Get maximum length of l_shoulder_pitch value.
void set_l_knee_pitch(const float new_l_knee_pitch)
Set l_knee_pitch 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.
float r_hip_pitch() const
Get r_hip_pitch value.
MoveServosMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_r_knee_pitch() const
Get maximum length of r_knee_pitch value.
void set_r_elbow_roll(const float new_r_elbow_roll)
Set r_elbow_roll value.
float l_hip_roll() const
Get l_hip_roll value.
float l_shoulder_pitch() const
Get l_shoulder_pitch value.
size_t maxlenof_l_hip_yaw_pitch() const
Get maximum length of l_hip_yaw_pitch 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_r_ankle_pitch(const float new_r_ankle_pitch)
Set r_ankle_pitch value.
size_t maxlenof_value() const
Get maximum length of value value.
size_t maxlenof_r_elbow_yaw() const
Get maximum length of r_elbow_yaw value.
void set_l_wrist_yaw(const float new_l_wrist_yaw)
Set l_wrist_yaw value.
float l_knee_pitch() const
Get l_knee_pitch value.
float l_hand() const
Get l_hand 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.
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.
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.
float r_ankle_pitch() const
Get r_ankle_pitch value.
float l_ankle_roll() const
Get l_ankle_roll value.
void set_l_hand(const float new_l_hand)
Set l_hand value.
size_t maxlenof_r_shoulder_pitch() const
Get maximum length of r_shoulder_pitch value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_l_ankle_roll() const
Get maximum length of l_ankle_roll value.
virtual Message * clone() const
Clone this message.
float r_shoulder_pitch() const
Get r_shoulder_pitch value.
size_t maxlenof_l_wrist_yaw() const
Get maximum length of l_wrist_yaw value.
float l_wrist_yaw() const
Get l_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 r_knee_pitch() const
Get r_knee_pitch value.
size_t maxlenof_servo() const
Get maximum length of servo value.
Academic version with 25 DoF and touch sensors.
float l_shoulder_roll() const
Get l_shoulder_roll value.
size_t maxlenof_r_hand() const
Get maximum length of r_hand value.
size_t maxlenof_r_ankle_roll() const
Get maximum length of r_ankle_roll value.
static const uint32_t SERVO_l_ankle_pitch
SERVO_l_ankle_pitch constant.
message_data_ts_t * data_ts
data timestamp aliasing pointer
float r_wrist_yaw() const
Get r_wrist_yaw value.
float l_hip_pitch() const
Get l_hip_pitch value.
uint32_t servo() const
Get servo value.
void set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch)
Set r_hip_yaw_pitch value.
size_t maxlenof_r_shoulder_pitch() const
Get maximum length of r_shoulder_pitch value.
unsigned int data_size
Size of memory needed to hold all data.
MoveServoMessage()
Constructor.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
size_t maxlenof_r_ankle_roll() const
Get maximum length of r_ankle_roll value.
static const uint32_t SERVO_l_shoulder_pitch
SERVO_l_shoulder_pitch constant.
float r_wrist_yaw() const
Get r_wrist_yaw value.
size_t maxlenof_r_wrist_yaw() const
Get maximum length of r_wrist_yaw value.
void set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch)
Set l_hip_yaw_pitch value.
float r_hip_yaw_pitch() const
Get r_hip_yaw_pitch value.
float l_ankle_pitch() const
Get l_ankle_pitch value.
float l_hip_pitch() const
Get l_hip_pitch value.
float head_yaw() const
Get head_yaw value.
void set_l_hand(const float new_l_hand)
Set l_hand value.
void set_r_shoulder_roll(const float new_r_shoulder_roll)
Set r_shoulder_roll value.
size_t maxlenof_l_hand() const
Get maximum length of l_hand value.
float l_elbow_roll() const
Get l_elbow_roll value.
size_t maxlenof_r_hip_pitch() const
Get maximum length of r_hip_pitch value.
size_t maxlenof_time() const
Get maximum length of time value.
static const uint32_t SERVO_l_knee_pitch
SERVO_l_knee_pitch constant.
size_t maxlenof_r_hip_yaw_pitch() const
Get maximum length of r_hip_yaw_pitch value.
void set_l_elbow_roll(const float new_l_elbow_roll)
Set l_elbow_roll value.
const char * type() const
Get type of interface.
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.
virtual Message * clone() const
Clone this message.
Base class for exceptions in Fawkes.
~SetServosMessage()
Destructor.
void set_servo(const uint32_t new_servo)
Set servo value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_r_hip_yaw_pitch() const
Get maximum length of r_hip_yaw_pitch value.
float r_ankle_roll() const
Get r_ankle_roll value.
float l_hand() const
Get l_hand value.
float r_shoulder_roll() const
Get r_shoulder_roll value.
float r_ankle_roll() const
Get r_ankle_roll value.
size_t maxlenof_head_pitch() const
Get maximum length of head_pitch 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.
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.
float head_pitch() const
Get head_pitch value.
size_t maxlenof_l_hip_roll() const
Get maximum length of l_hip_roll value.
size_t maxlenof_l_shoulder_pitch() const
Get maximum length of l_shoulder_pitch 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.
float value() const
Get value value.
static const uint32_t SERVO_r_elbow_yaw
SERVO_r_elbow_yaw constant.
size_t maxlenof_l_shoulder_roll() const
Get maximum length of l_shoulder_roll value.
static const uint32_t SERVO_l_elbow_roll
SERVO_l_elbow_roll constant.
static const uint32_t SERVO_r_knee_pitch
SERVO_r_knee_pitch constant.
float l_elbow_yaw() const
Get l_elbow_yaw value.
static const uint32_t SERVO_l_hand
SERVO_l_hand constant.
float speed() const
Get speed value.
float l_wrist_yaw() const
Get l_wrist_yaw value.
float r_hand() const
Get r_hand value.
int32_t time() const
Get time value.
void set_r_hip_roll(const float new_r_hip_roll)
Set r_hip_roll value.
float r_elbow_yaw() const
Get r_elbow_yaw value.
size_t maxlenof_l_wrist_yaw() const
Get maximum length of l_wrist_yaw value.
float r_shoulder_pitch() const
Get r_shoulder_pitch value.
static const uint32_t SERVO_r_elbow_roll
SERVO_r_elbow_roll constant.
float head_yaw() const
Get head_yaw value.
float r_shoulder_roll() const
Get r_shoulder_roll value.
float r_elbow_roll() const
Get r_elbow_roll value.
void set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch)
Set r_hip_yaw_pitch value.
float l_shoulder_pitch() const
Get l_shoulder_pitch value.
SetServoMessage()
Constructor.
static const uint32_t SERVO_r_shoulder_pitch
SERVO_r_shoulder_pitch constant.
float l_ankle_roll() const
Get l_ankle_roll value.
float l_ankle_pitch() const
Get l_ankle_pitch value.
float r_hip_pitch() const
Get r_hip_pitch value.
static const uint32_t SERVO_head_pitch
SERVO_head_pitch constant.
float r_hip_yaw_pitch() const
Get r_hip_yaw_pitch value.
float r_knee_pitch() const
Get r_knee_pitch value.
size_t maxlenof_r_hand() const
Get maximum length of r_hand value.
size_t maxlenof_r_elbow_yaw() const
Get maximum length of r_elbow_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.
float value() const
Get value value.
size_t maxlenof_r_shoulder_roll() const
Get maximum length of r_shoulder_roll value.
uint32_t servo() const
Get servo value.
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.
size_t maxlenof_r_ankle_pitch() const
Get maximum length of r_ankle_pitch value.
void set_l_shoulder_pitch(const float new_l_shoulder_pitch)
Set l_shoulder_pitch value.
float r_hand() const
Get r_hand value.
void set_l_ankle_pitch(const float new_l_ankle_pitch)
Set l_ankle_pitch value.
SetServosMessage()
Constructor.
size_t maxlenof_r_ankle_pitch() const
Get maximum length of r_ankle_pitch value.
size_t maxlenof_l_hip_yaw_pitch() const
Get maximum length of l_hip_yaw_pitch value.
MoveServoMessage Fawkes BlackBoard Interface Message.
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.
void set_speed(const float new_speed)
Set speed value.
size_t maxlenof_r_wrist_yaw() const
Get maximum length of r_wrist_yaw value.
float head_pitch() const
Get head_pitch 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.
void set_r_hip_pitch(const float new_r_hip_pitch)
Set r_hip_pitch value.
size_t maxlenof_l_ankle_pitch() const
Get maximum length of l_ankle_pitch value.
static const uint32_t SERVO_r_wrist_yaw
SERVO_r_wrist_yaw constant.
size_t maxlenof_servo() const
Get maximum length of servo value.
void set_r_wrist_yaw(const float new_r_wrist_yaw)
Set r_wrist_yaw value.
size_t maxlenof_r_hip_pitch() const
Get maximum length of r_hip_pitch value.
void add_fieldinfo(interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0, const interface_enum_map_t *enum_map=0)
Add an entry to the info list.
void set_l_hip_pitch(const float new_l_hip_pitch)
Set l_hip_pitch value.
float l_hip_yaw_pitch() const
Get l_hip_yaw_pitch value.
void set_r_hand(const float new_r_hand)
Set r_hand value.
size_t maxlenof_l_knee_pitch() const
Get maximum length of l_knee_pitch value.
float r_elbow_roll() const
Get r_elbow_roll value.
float r_ankle_pitch() const
Get r_ankle_pitch value.
size_t maxlenof_head_yaw() const
Get maximum length of head_yaw value.
static const uint32_t SERVO_head_yaw
SERVO_head_yaw constant.
void set_time(const int32_t new_time)
Set time value.
size_t maxlenof_l_ankle_roll() const
Get maximum length of l_ankle_roll value.
float l_elbow_yaw() const
Get l_elbow_yaw value.
float r_elbow_yaw() const
Get r_elbow_yaw value.
static const uint32_t SERVO_l_hip_roll
SERVO_l_hip_roll constant.
float r_hip_roll() const
Get r_hip_roll value.
static const uint32_t SERVO_r_shoulder_roll
SERVO_r_shoulder_roll constant.
32 bit unsigned integer field
size_t maxlenof_l_elbow_roll() const
Get maximum length of l_elbow_roll value.
int32_t time() const
Get time value.
RobotType
Enumeration describing the actual version of the robot that's being used.
float l_hip_roll() const
Get l_hip_roll value.