24 #include <interfaces/NaoJointStiffnessInterface.h>
26 #include <core/exceptions/software.h>
44 NaoJointStiffnessInterface::NaoJointStiffnessInterface() : Interface()
46 data_size =
sizeof(NaoJointStiffnessInterface_data_t);
48 data = (NaoJointStiffnessInterface_data_t *)
data_ptr;
81 unsigned char tmp_hash[] = {0x29, 0x35, 0x74, 0x2f, 0x4e, 0x93, 0x53, 0xc4, 0x28, 0x56, 0xc8, 0x4a, 0x66, 0x81, 0xd6, 0x6d};
86 NaoJointStiffnessInterface::~NaoJointStiffnessInterface()
98 return data->head_yaw;
118 data->head_yaw = new_head_yaw;
129 return data->head_pitch;
149 data->head_pitch = new_head_pitch;
160 return data->l_shoulder_pitch;
180 data->l_shoulder_pitch = new_l_shoulder_pitch;
191 return data->l_shoulder_roll;
211 data->l_shoulder_roll = new_l_shoulder_roll;
222 return data->l_elbow_yaw;
242 data->l_elbow_yaw = new_l_elbow_yaw;
253 return data->l_elbow_roll;
273 data->l_elbow_roll = new_l_elbow_roll;
284 return data->l_wrist_yaw;
304 data->l_wrist_yaw = new_l_wrist_yaw;
335 data->l_hand = new_l_hand;
346 return data->l_hip_yaw_pitch;
366 data->l_hip_yaw_pitch = new_l_hip_yaw_pitch;
377 return data->l_hip_roll;
397 data->l_hip_roll = new_l_hip_roll;
408 return data->l_hip_pitch;
428 data->l_hip_pitch = new_l_hip_pitch;
439 return data->l_knee_pitch;
459 data->l_knee_pitch = new_l_knee_pitch;
470 return data->l_ankle_pitch;
490 data->l_ankle_pitch = new_l_ankle_pitch;
501 return data->l_ankle_roll;
521 data->l_ankle_roll = new_l_ankle_roll;
532 return data->r_shoulder_pitch;
552 data->r_shoulder_pitch = new_r_shoulder_pitch;
563 return data->r_shoulder_roll;
583 data->r_shoulder_roll = new_r_shoulder_roll;
594 return data->r_elbow_yaw;
614 data->r_elbow_yaw = new_r_elbow_yaw;
625 return data->r_elbow_roll;
645 data->r_elbow_roll = new_r_elbow_roll;
656 return data->r_wrist_yaw;
676 data->r_wrist_yaw = new_r_wrist_yaw;
707 data->r_hand = new_r_hand;
718 return data->r_hip_yaw_pitch;
738 data->r_hip_yaw_pitch = new_r_hip_yaw_pitch;
749 return data->r_hip_roll;
769 data->r_hip_roll = new_r_hip_roll;
780 return data->r_hip_pitch;
800 data->r_hip_pitch = new_r_hip_pitch;
811 return data->r_knee_pitch;
831 data->r_knee_pitch = new_r_knee_pitch;
842 return data->r_ankle_pitch;
862 data->r_ankle_pitch = new_r_ankle_pitch;
873 return data->r_ankle_roll;
893 data->r_ankle_roll = new_r_ankle_roll;
907 return data->minimum;
930 data->minimum = new_minimum;
938 if ( strncmp(
"SetStiffnessMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
940 }
else if ( strncmp(
"SetBodyStiffnessMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
942 }
else if ( strncmp(
"SetStiffnessesMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
946 "message type for this interface type.", type);
962 memcpy(data, oi->data,
sizeof(NaoJointStiffnessInterface_data_t));
986 data_size =
sizeof(SetStiffnessMessage_data_t);
989 data = (SetStiffnessMessage_data_t *)
data_ptr;
991 data->servo = ini_servo;
992 data->value = ini_value;
993 data->time_sec = ini_time_sec;
1001 data_size =
sizeof(SetStiffnessMessage_data_t);
1004 data = (SetStiffnessMessage_data_t *)
data_ptr;
1025 data = (SetStiffnessMessage_data_t *)
data_ptr;
1067 data->servo = new_servo;
1097 data->value = new_value;
1107 return data->time_sec;
1127 data->time_sec = new_time_sec;
1153 data_size =
sizeof(SetBodyStiffnessMessage_data_t);
1156 data = (SetBodyStiffnessMessage_data_t *)
data_ptr;
1158 data->value = ini_value;
1159 data->time_sec = ini_time_sec;
1166 data_size =
sizeof(SetBodyStiffnessMessage_data_t);
1169 data = (SetBodyStiffnessMessage_data_t *)
data_ptr;
1189 data = (SetBodyStiffnessMessage_data_t *)
data_ptr;
1221 data->value = new_value;
1231 return data->time_sec;
1251 data->time_sec = new_time_sec;
1300 NaoJointStiffnessInterface::SetStiffnessesMessage::SetStiffnessesMessage(
const float ini_time_sec,
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_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 float ini_r_elbow_roll) :
Message(
"SetStiffnessesMessage")
1302 data_size =
sizeof(SetStiffnessesMessage_data_t);
1305 data = (SetStiffnessesMessage_data_t *)
data_ptr;
1307 data->time_sec = ini_time_sec;
1308 data->head_yaw = ini_head_yaw;
1309 data->head_pitch = ini_head_pitch;
1310 data->l_shoulder_pitch = ini_l_shoulder_pitch;
1311 data->l_shoulder_roll = ini_l_shoulder_roll;
1312 data->l_elbow_yaw = ini_l_elbow_yaw;
1313 data->l_elbow_roll = ini_l_elbow_roll;
1314 data->l_wrist_yaw = ini_l_wrist_yaw;
1315 data->l_hand = ini_l_hand;
1316 data->l_hip_yaw_pitch = ini_l_hip_yaw_pitch;
1317 data->l_hip_roll = ini_l_hip_roll;
1318 data->l_hip_pitch = ini_l_hip_pitch;
1319 data->l_knee_pitch = ini_l_knee_pitch;
1320 data->l_ankle_pitch = ini_l_ankle_pitch;
1321 data->l_ankle_roll = ini_l_ankle_roll;
1322 data->r_shoulder_pitch = ini_r_shoulder_pitch;
1323 data->r_shoulder_roll = ini_r_shoulder_roll;
1324 data->r_elbow_yaw = ini_r_elbow_yaw;
1325 data->r_wrist_yaw = ini_r_wrist_yaw;
1326 data->r_hand = ini_r_hand;
1327 data->r_hip_yaw_pitch = ini_r_hip_yaw_pitch;
1328 data->r_hip_roll = ini_r_hip_roll;
1329 data->r_hip_pitch = ini_r_hip_pitch;
1330 data->r_knee_pitch = ini_r_knee_pitch;
1331 data->r_ankle_pitch = ini_r_ankle_pitch;
1332 data->r_ankle_roll = ini_r_ankle_roll;
1333 data->r_elbow_roll = ini_r_elbow_roll;
1365 data_size =
sizeof(SetStiffnessesMessage_data_t);
1368 data = (SetStiffnessesMessage_data_t *)
data_ptr;
1413 data = (SetStiffnessesMessage_data_t *)
data_ptr;
1425 return data->time_sec;
1445 data->time_sec = new_time_sec;
1455 return data->head_yaw;
1475 data->head_yaw = new_head_yaw;
1485 return data->head_pitch;
1505 data->head_pitch = new_head_pitch;
1515 return data->l_shoulder_pitch;
1535 data->l_shoulder_pitch = new_l_shoulder_pitch;
1545 return data->l_shoulder_roll;
1565 data->l_shoulder_roll = new_l_shoulder_roll;
1575 return data->l_elbow_yaw;
1595 data->l_elbow_yaw = new_l_elbow_yaw;
1605 return data->l_elbow_roll;
1625 data->l_elbow_roll = new_l_elbow_roll;
1635 return data->l_wrist_yaw;
1655 data->l_wrist_yaw = new_l_wrist_yaw;
1665 return data->l_hand;
1685 data->l_hand = new_l_hand;
1695 return data->l_hip_yaw_pitch;
1715 data->l_hip_yaw_pitch = new_l_hip_yaw_pitch;
1725 return data->l_hip_roll;
1745 data->l_hip_roll = new_l_hip_roll;
1755 return data->l_hip_pitch;
1775 data->l_hip_pitch = new_l_hip_pitch;
1785 return data->l_knee_pitch;
1805 data->l_knee_pitch = new_l_knee_pitch;
1815 return data->l_ankle_pitch;
1835 data->l_ankle_pitch = new_l_ankle_pitch;
1845 return data->l_ankle_roll;
1865 data->l_ankle_roll = new_l_ankle_roll;
1875 return data->r_shoulder_pitch;
1895 data->r_shoulder_pitch = new_r_shoulder_pitch;
1905 return data->r_shoulder_roll;
1925 data->r_shoulder_roll = new_r_shoulder_roll;
1935 return data->r_elbow_yaw;
1955 data->r_elbow_yaw = new_r_elbow_yaw;
1965 return data->r_wrist_yaw;
1985 data->r_wrist_yaw = new_r_wrist_yaw;
1995 return data->r_hand;
2015 data->r_hand = new_r_hand;
2025 return data->r_hip_yaw_pitch;
2045 data->r_hip_yaw_pitch = new_r_hip_yaw_pitch;
2055 return data->r_hip_roll;
2075 data->r_hip_roll = new_r_hip_roll;
2085 return data->r_hip_pitch;
2105 data->r_hip_pitch = new_r_hip_pitch;
2115 return data->r_knee_pitch;
2135 data->r_knee_pitch = new_r_knee_pitch;
2145 return data->r_ankle_pitch;
2165 data->r_ankle_pitch = new_r_ankle_pitch;
2175 return data->r_ankle_roll;
2195 data->r_ankle_roll = new_r_ankle_roll;
2205 return data->r_elbow_roll;
2225 data->r_elbow_roll = new_r_elbow_roll;