Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * NaoJointStiffnessInterface.cpp - Fawkes BlackBoard Interface - NaoJointStiffnessInterface 00004 * 00005 * Templated created: Thu Oct 12 10:49:19 2006 00006 * Copyright 2008-2011 Tim Niemueller 00007 * 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. A runtime exception applies to 00014 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Library General Public License for more details. 00020 * 00021 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00022 */ 00023 00024 #include <interfaces/NaoJointStiffnessInterface.h> 00025 00026 #include <core/exceptions/software.h> 00027 00028 #include <cstring> 00029 #include <cstdlib> 00030 00031 namespace fawkes { 00032 00033 /** @class NaoJointStiffnessInterface <interfaces/NaoJointStiffnessInterface.h> 00034 * NaoJointStiffnessInterface Fawkes BlackBoard Interface. 00035 * 00036 This interface provides access to Nao joint stiffness. 00037 00038 * @ingroup FawkesInterfaces 00039 */ 00040 00041 00042 00043 /** Constructor */ 00044 NaoJointStiffnessInterface::NaoJointStiffnessInterface() : Interface() 00045 { 00046 data_size = sizeof(NaoJointStiffnessInterface_data_t); 00047 data_ptr = malloc(data_size); 00048 data = (NaoJointStiffnessInterface_data_t *)data_ptr; 00049 data_ts = (interface_data_ts_t *)data_ptr; 00050 memset(data_ptr, 0, data_size); 00051 add_fieldinfo(IFT_FLOAT, "head_yaw", 1, &data->head_yaw); 00052 add_fieldinfo(IFT_FLOAT, "head_pitch", 1, &data->head_pitch); 00053 add_fieldinfo(IFT_FLOAT, "l_shoulder_pitch", 1, &data->l_shoulder_pitch); 00054 add_fieldinfo(IFT_FLOAT, "l_shoulder_roll", 1, &data->l_shoulder_roll); 00055 add_fieldinfo(IFT_FLOAT, "l_elbow_yaw", 1, &data->l_elbow_yaw); 00056 add_fieldinfo(IFT_FLOAT, "l_elbow_roll", 1, &data->l_elbow_roll); 00057 add_fieldinfo(IFT_FLOAT, "l_wrist_yaw", 1, &data->l_wrist_yaw); 00058 add_fieldinfo(IFT_FLOAT, "l_hand", 1, &data->l_hand); 00059 add_fieldinfo(IFT_FLOAT, "l_hip_yaw_pitch", 1, &data->l_hip_yaw_pitch); 00060 add_fieldinfo(IFT_FLOAT, "l_hip_roll", 1, &data->l_hip_roll); 00061 add_fieldinfo(IFT_FLOAT, "l_hip_pitch", 1, &data->l_hip_pitch); 00062 add_fieldinfo(IFT_FLOAT, "l_knee_pitch", 1, &data->l_knee_pitch); 00063 add_fieldinfo(IFT_FLOAT, "l_ankle_pitch", 1, &data->l_ankle_pitch); 00064 add_fieldinfo(IFT_FLOAT, "l_ankle_roll", 1, &data->l_ankle_roll); 00065 add_fieldinfo(IFT_FLOAT, "r_shoulder_pitch", 1, &data->r_shoulder_pitch); 00066 add_fieldinfo(IFT_FLOAT, "r_shoulder_roll", 1, &data->r_shoulder_roll); 00067 add_fieldinfo(IFT_FLOAT, "r_elbow_yaw", 1, &data->r_elbow_yaw); 00068 add_fieldinfo(IFT_FLOAT, "r_elbow_roll", 1, &data->r_elbow_roll); 00069 add_fieldinfo(IFT_FLOAT, "r_wrist_yaw", 1, &data->r_wrist_yaw); 00070 add_fieldinfo(IFT_FLOAT, "r_hand", 1, &data->r_hand); 00071 add_fieldinfo(IFT_FLOAT, "r_hip_yaw_pitch", 1, &data->r_hip_yaw_pitch); 00072 add_fieldinfo(IFT_FLOAT, "r_hip_roll", 1, &data->r_hip_roll); 00073 add_fieldinfo(IFT_FLOAT, "r_hip_pitch", 1, &data->r_hip_pitch); 00074 add_fieldinfo(IFT_FLOAT, "r_knee_pitch", 1, &data->r_knee_pitch); 00075 add_fieldinfo(IFT_FLOAT, "r_ankle_pitch", 1, &data->r_ankle_pitch); 00076 add_fieldinfo(IFT_FLOAT, "r_ankle_roll", 1, &data->r_ankle_roll); 00077 add_fieldinfo(IFT_FLOAT, "minimum", 1, &data->minimum); 00078 add_messageinfo("SetStiffnessMessage"); 00079 add_messageinfo("SetBodyStiffnessMessage"); 00080 add_messageinfo("SetStiffnessesMessage"); 00081 unsigned char tmp_hash[] = {0x29, 0x35, 0x74, 0x2f, 0x4e, 0x93, 0x53, 0xc4, 0x28, 0x56, 0xc8, 0x4a, 0x66, 0x81, 0xd6, 0x6d}; 00082 set_hash(tmp_hash); 00083 } 00084 00085 /** Destructor */ 00086 NaoJointStiffnessInterface::~NaoJointStiffnessInterface() 00087 { 00088 free(data_ptr); 00089 } 00090 /* Methods */ 00091 /** Get head_yaw value. 00092 * Head yaw 00093 * @return head_yaw value 00094 */ 00095 float 00096 NaoJointStiffnessInterface::head_yaw() const 00097 { 00098 return data->head_yaw; 00099 } 00100 00101 /** Get maximum length of head_yaw value. 00102 * @return length of head_yaw value, can be length of the array or number of 00103 * maximum number of characters for a string 00104 */ 00105 size_t 00106 NaoJointStiffnessInterface::maxlenof_head_yaw() const 00107 { 00108 return 1; 00109 } 00110 00111 /** Set head_yaw value. 00112 * Head yaw 00113 * @param new_head_yaw new head_yaw value 00114 */ 00115 void 00116 NaoJointStiffnessInterface::set_head_yaw(const float new_head_yaw) 00117 { 00118 data->head_yaw = new_head_yaw; 00119 data_changed = true; 00120 } 00121 00122 /** Get head_pitch value. 00123 * Head pitch 00124 * @return head_pitch value 00125 */ 00126 float 00127 NaoJointStiffnessInterface::head_pitch() const 00128 { 00129 return data->head_pitch; 00130 } 00131 00132 /** Get maximum length of head_pitch value. 00133 * @return length of head_pitch value, can be length of the array or number of 00134 * maximum number of characters for a string 00135 */ 00136 size_t 00137 NaoJointStiffnessInterface::maxlenof_head_pitch() const 00138 { 00139 return 1; 00140 } 00141 00142 /** Set head_pitch value. 00143 * Head pitch 00144 * @param new_head_pitch new head_pitch value 00145 */ 00146 void 00147 NaoJointStiffnessInterface::set_head_pitch(const float new_head_pitch) 00148 { 00149 data->head_pitch = new_head_pitch; 00150 data_changed = true; 00151 } 00152 00153 /** Get l_shoulder_pitch value. 00154 * Left shoulder pitch 00155 * @return l_shoulder_pitch value 00156 */ 00157 float 00158 NaoJointStiffnessInterface::l_shoulder_pitch() const 00159 { 00160 return data->l_shoulder_pitch; 00161 } 00162 00163 /** Get maximum length of l_shoulder_pitch value. 00164 * @return length of l_shoulder_pitch value, can be length of the array or number of 00165 * maximum number of characters for a string 00166 */ 00167 size_t 00168 NaoJointStiffnessInterface::maxlenof_l_shoulder_pitch() const 00169 { 00170 return 1; 00171 } 00172 00173 /** Set l_shoulder_pitch value. 00174 * Left shoulder pitch 00175 * @param new_l_shoulder_pitch new l_shoulder_pitch value 00176 */ 00177 void 00178 NaoJointStiffnessInterface::set_l_shoulder_pitch(const float new_l_shoulder_pitch) 00179 { 00180 data->l_shoulder_pitch = new_l_shoulder_pitch; 00181 data_changed = true; 00182 } 00183 00184 /** Get l_shoulder_roll value. 00185 * Left shoulder roll 00186 * @return l_shoulder_roll value 00187 */ 00188 float 00189 NaoJointStiffnessInterface::l_shoulder_roll() const 00190 { 00191 return data->l_shoulder_roll; 00192 } 00193 00194 /** Get maximum length of l_shoulder_roll value. 00195 * @return length of l_shoulder_roll value, can be length of the array or number of 00196 * maximum number of characters for a string 00197 */ 00198 size_t 00199 NaoJointStiffnessInterface::maxlenof_l_shoulder_roll() const 00200 { 00201 return 1; 00202 } 00203 00204 /** Set l_shoulder_roll value. 00205 * Left shoulder roll 00206 * @param new_l_shoulder_roll new l_shoulder_roll value 00207 */ 00208 void 00209 NaoJointStiffnessInterface::set_l_shoulder_roll(const float new_l_shoulder_roll) 00210 { 00211 data->l_shoulder_roll = new_l_shoulder_roll; 00212 data_changed = true; 00213 } 00214 00215 /** Get l_elbow_yaw value. 00216 * Left elbow yaw 00217 * @return l_elbow_yaw value 00218 */ 00219 float 00220 NaoJointStiffnessInterface::l_elbow_yaw() const 00221 { 00222 return data->l_elbow_yaw; 00223 } 00224 00225 /** Get maximum length of l_elbow_yaw value. 00226 * @return length of l_elbow_yaw value, can be length of the array or number of 00227 * maximum number of characters for a string 00228 */ 00229 size_t 00230 NaoJointStiffnessInterface::maxlenof_l_elbow_yaw() const 00231 { 00232 return 1; 00233 } 00234 00235 /** Set l_elbow_yaw value. 00236 * Left elbow yaw 00237 * @param new_l_elbow_yaw new l_elbow_yaw value 00238 */ 00239 void 00240 NaoJointStiffnessInterface::set_l_elbow_yaw(const float new_l_elbow_yaw) 00241 { 00242 data->l_elbow_yaw = new_l_elbow_yaw; 00243 data_changed = true; 00244 } 00245 00246 /** Get l_elbow_roll value. 00247 * Left elbow roll 00248 * @return l_elbow_roll value 00249 */ 00250 float 00251 NaoJointStiffnessInterface::l_elbow_roll() const 00252 { 00253 return data->l_elbow_roll; 00254 } 00255 00256 /** Get maximum length of l_elbow_roll value. 00257 * @return length of l_elbow_roll value, can be length of the array or number of 00258 * maximum number of characters for a string 00259 */ 00260 size_t 00261 NaoJointStiffnessInterface::maxlenof_l_elbow_roll() const 00262 { 00263 return 1; 00264 } 00265 00266 /** Set l_elbow_roll value. 00267 * Left elbow roll 00268 * @param new_l_elbow_roll new l_elbow_roll value 00269 */ 00270 void 00271 NaoJointStiffnessInterface::set_l_elbow_roll(const float new_l_elbow_roll) 00272 { 00273 data->l_elbow_roll = new_l_elbow_roll; 00274 data_changed = true; 00275 } 00276 00277 /** Get l_wrist_yaw value. 00278 * Left wrist yaw 00279 * @return l_wrist_yaw value 00280 */ 00281 float 00282 NaoJointStiffnessInterface::l_wrist_yaw() const 00283 { 00284 return data->l_wrist_yaw; 00285 } 00286 00287 /** Get maximum length of l_wrist_yaw value. 00288 * @return length of l_wrist_yaw value, can be length of the array or number of 00289 * maximum number of characters for a string 00290 */ 00291 size_t 00292 NaoJointStiffnessInterface::maxlenof_l_wrist_yaw() const 00293 { 00294 return 1; 00295 } 00296 00297 /** Set l_wrist_yaw value. 00298 * Left wrist yaw 00299 * @param new_l_wrist_yaw new l_wrist_yaw value 00300 */ 00301 void 00302 NaoJointStiffnessInterface::set_l_wrist_yaw(const float new_l_wrist_yaw) 00303 { 00304 data->l_wrist_yaw = new_l_wrist_yaw; 00305 data_changed = true; 00306 } 00307 00308 /** Get l_hand value. 00309 * Left hand 00310 * @return l_hand value 00311 */ 00312 float 00313 NaoJointStiffnessInterface::l_hand() const 00314 { 00315 return data->l_hand; 00316 } 00317 00318 /** Get maximum length of l_hand value. 00319 * @return length of l_hand value, can be length of the array or number of 00320 * maximum number of characters for a string 00321 */ 00322 size_t 00323 NaoJointStiffnessInterface::maxlenof_l_hand() const 00324 { 00325 return 1; 00326 } 00327 00328 /** Set l_hand value. 00329 * Left hand 00330 * @param new_l_hand new l_hand value 00331 */ 00332 void 00333 NaoJointStiffnessInterface::set_l_hand(const float new_l_hand) 00334 { 00335 data->l_hand = new_l_hand; 00336 data_changed = true; 00337 } 00338 00339 /** Get l_hip_yaw_pitch value. 00340 * Left hip yaw pitch 00341 * @return l_hip_yaw_pitch value 00342 */ 00343 float 00344 NaoJointStiffnessInterface::l_hip_yaw_pitch() const 00345 { 00346 return data->l_hip_yaw_pitch; 00347 } 00348 00349 /** Get maximum length of l_hip_yaw_pitch value. 00350 * @return length of l_hip_yaw_pitch value, can be length of the array or number of 00351 * maximum number of characters for a string 00352 */ 00353 size_t 00354 NaoJointStiffnessInterface::maxlenof_l_hip_yaw_pitch() const 00355 { 00356 return 1; 00357 } 00358 00359 /** Set l_hip_yaw_pitch value. 00360 * Left hip yaw pitch 00361 * @param new_l_hip_yaw_pitch new l_hip_yaw_pitch value 00362 */ 00363 void 00364 NaoJointStiffnessInterface::set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch) 00365 { 00366 data->l_hip_yaw_pitch = new_l_hip_yaw_pitch; 00367 data_changed = true; 00368 } 00369 00370 /** Get l_hip_roll value. 00371 * Left hip roll 00372 * @return l_hip_roll value 00373 */ 00374 float 00375 NaoJointStiffnessInterface::l_hip_roll() const 00376 { 00377 return data->l_hip_roll; 00378 } 00379 00380 /** Get maximum length of l_hip_roll value. 00381 * @return length of l_hip_roll value, can be length of the array or number of 00382 * maximum number of characters for a string 00383 */ 00384 size_t 00385 NaoJointStiffnessInterface::maxlenof_l_hip_roll() const 00386 { 00387 return 1; 00388 } 00389 00390 /** Set l_hip_roll value. 00391 * Left hip roll 00392 * @param new_l_hip_roll new l_hip_roll value 00393 */ 00394 void 00395 NaoJointStiffnessInterface::set_l_hip_roll(const float new_l_hip_roll) 00396 { 00397 data->l_hip_roll = new_l_hip_roll; 00398 data_changed = true; 00399 } 00400 00401 /** Get l_hip_pitch value. 00402 * Left hip pitch 00403 * @return l_hip_pitch value 00404 */ 00405 float 00406 NaoJointStiffnessInterface::l_hip_pitch() const 00407 { 00408 return data->l_hip_pitch; 00409 } 00410 00411 /** Get maximum length of l_hip_pitch value. 00412 * @return length of l_hip_pitch value, can be length of the array or number of 00413 * maximum number of characters for a string 00414 */ 00415 size_t 00416 NaoJointStiffnessInterface::maxlenof_l_hip_pitch() const 00417 { 00418 return 1; 00419 } 00420 00421 /** Set l_hip_pitch value. 00422 * Left hip pitch 00423 * @param new_l_hip_pitch new l_hip_pitch value 00424 */ 00425 void 00426 NaoJointStiffnessInterface::set_l_hip_pitch(const float new_l_hip_pitch) 00427 { 00428 data->l_hip_pitch = new_l_hip_pitch; 00429 data_changed = true; 00430 } 00431 00432 /** Get l_knee_pitch value. 00433 * Left knee pitch 00434 * @return l_knee_pitch value 00435 */ 00436 float 00437 NaoJointStiffnessInterface::l_knee_pitch() const 00438 { 00439 return data->l_knee_pitch; 00440 } 00441 00442 /** Get maximum length of l_knee_pitch value. 00443 * @return length of l_knee_pitch value, can be length of the array or number of 00444 * maximum number of characters for a string 00445 */ 00446 size_t 00447 NaoJointStiffnessInterface::maxlenof_l_knee_pitch() const 00448 { 00449 return 1; 00450 } 00451 00452 /** Set l_knee_pitch value. 00453 * Left knee pitch 00454 * @param new_l_knee_pitch new l_knee_pitch value 00455 */ 00456 void 00457 NaoJointStiffnessInterface::set_l_knee_pitch(const float new_l_knee_pitch) 00458 { 00459 data->l_knee_pitch = new_l_knee_pitch; 00460 data_changed = true; 00461 } 00462 00463 /** Get l_ankle_pitch value. 00464 * Left ankle pitch 00465 * @return l_ankle_pitch value 00466 */ 00467 float 00468 NaoJointStiffnessInterface::l_ankle_pitch() const 00469 { 00470 return data->l_ankle_pitch; 00471 } 00472 00473 /** Get maximum length of l_ankle_pitch value. 00474 * @return length of l_ankle_pitch value, can be length of the array or number of 00475 * maximum number of characters for a string 00476 */ 00477 size_t 00478 NaoJointStiffnessInterface::maxlenof_l_ankle_pitch() const 00479 { 00480 return 1; 00481 } 00482 00483 /** Set l_ankle_pitch value. 00484 * Left ankle pitch 00485 * @param new_l_ankle_pitch new l_ankle_pitch value 00486 */ 00487 void 00488 NaoJointStiffnessInterface::set_l_ankle_pitch(const float new_l_ankle_pitch) 00489 { 00490 data->l_ankle_pitch = new_l_ankle_pitch; 00491 data_changed = true; 00492 } 00493 00494 /** Get l_ankle_roll value. 00495 * Left ankle roll 00496 * @return l_ankle_roll value 00497 */ 00498 float 00499 NaoJointStiffnessInterface::l_ankle_roll() const 00500 { 00501 return data->l_ankle_roll; 00502 } 00503 00504 /** Get maximum length of l_ankle_roll value. 00505 * @return length of l_ankle_roll value, can be length of the array or number of 00506 * maximum number of characters for a string 00507 */ 00508 size_t 00509 NaoJointStiffnessInterface::maxlenof_l_ankle_roll() const 00510 { 00511 return 1; 00512 } 00513 00514 /** Set l_ankle_roll value. 00515 * Left ankle roll 00516 * @param new_l_ankle_roll new l_ankle_roll value 00517 */ 00518 void 00519 NaoJointStiffnessInterface::set_l_ankle_roll(const float new_l_ankle_roll) 00520 { 00521 data->l_ankle_roll = new_l_ankle_roll; 00522 data_changed = true; 00523 } 00524 00525 /** Get r_shoulder_pitch value. 00526 * Right shoulder pitch 00527 * @return r_shoulder_pitch value 00528 */ 00529 float 00530 NaoJointStiffnessInterface::r_shoulder_pitch() const 00531 { 00532 return data->r_shoulder_pitch; 00533 } 00534 00535 /** Get maximum length of r_shoulder_pitch value. 00536 * @return length of r_shoulder_pitch value, can be length of the array or number of 00537 * maximum number of characters for a string 00538 */ 00539 size_t 00540 NaoJointStiffnessInterface::maxlenof_r_shoulder_pitch() const 00541 { 00542 return 1; 00543 } 00544 00545 /** Set r_shoulder_pitch value. 00546 * Right shoulder pitch 00547 * @param new_r_shoulder_pitch new r_shoulder_pitch value 00548 */ 00549 void 00550 NaoJointStiffnessInterface::set_r_shoulder_pitch(const float new_r_shoulder_pitch) 00551 { 00552 data->r_shoulder_pitch = new_r_shoulder_pitch; 00553 data_changed = true; 00554 } 00555 00556 /** Get r_shoulder_roll value. 00557 * Right shoulder roll 00558 * @return r_shoulder_roll value 00559 */ 00560 float 00561 NaoJointStiffnessInterface::r_shoulder_roll() const 00562 { 00563 return data->r_shoulder_roll; 00564 } 00565 00566 /** Get maximum length of r_shoulder_roll value. 00567 * @return length of r_shoulder_roll value, can be length of the array or number of 00568 * maximum number of characters for a string 00569 */ 00570 size_t 00571 NaoJointStiffnessInterface::maxlenof_r_shoulder_roll() const 00572 { 00573 return 1; 00574 } 00575 00576 /** Set r_shoulder_roll value. 00577 * Right shoulder roll 00578 * @param new_r_shoulder_roll new r_shoulder_roll value 00579 */ 00580 void 00581 NaoJointStiffnessInterface::set_r_shoulder_roll(const float new_r_shoulder_roll) 00582 { 00583 data->r_shoulder_roll = new_r_shoulder_roll; 00584 data_changed = true; 00585 } 00586 00587 /** Get r_elbow_yaw value. 00588 * Right elbow yaw 00589 * @return r_elbow_yaw value 00590 */ 00591 float 00592 NaoJointStiffnessInterface::r_elbow_yaw() const 00593 { 00594 return data->r_elbow_yaw; 00595 } 00596 00597 /** Get maximum length of r_elbow_yaw value. 00598 * @return length of r_elbow_yaw value, can be length of the array or number of 00599 * maximum number of characters for a string 00600 */ 00601 size_t 00602 NaoJointStiffnessInterface::maxlenof_r_elbow_yaw() const 00603 { 00604 return 1; 00605 } 00606 00607 /** Set r_elbow_yaw value. 00608 * Right elbow yaw 00609 * @param new_r_elbow_yaw new r_elbow_yaw value 00610 */ 00611 void 00612 NaoJointStiffnessInterface::set_r_elbow_yaw(const float new_r_elbow_yaw) 00613 { 00614 data->r_elbow_yaw = new_r_elbow_yaw; 00615 data_changed = true; 00616 } 00617 00618 /** Get r_elbow_roll value. 00619 * Right elbow roll 00620 * @return r_elbow_roll value 00621 */ 00622 float 00623 NaoJointStiffnessInterface::r_elbow_roll() const 00624 { 00625 return data->r_elbow_roll; 00626 } 00627 00628 /** Get maximum length of r_elbow_roll value. 00629 * @return length of r_elbow_roll value, can be length of the array or number of 00630 * maximum number of characters for a string 00631 */ 00632 size_t 00633 NaoJointStiffnessInterface::maxlenof_r_elbow_roll() const 00634 { 00635 return 1; 00636 } 00637 00638 /** Set r_elbow_roll value. 00639 * Right elbow roll 00640 * @param new_r_elbow_roll new r_elbow_roll value 00641 */ 00642 void 00643 NaoJointStiffnessInterface::set_r_elbow_roll(const float new_r_elbow_roll) 00644 { 00645 data->r_elbow_roll = new_r_elbow_roll; 00646 data_changed = true; 00647 } 00648 00649 /** Get r_wrist_yaw value. 00650 * Right wrist yaw 00651 * @return r_wrist_yaw value 00652 */ 00653 float 00654 NaoJointStiffnessInterface::r_wrist_yaw() const 00655 { 00656 return data->r_wrist_yaw; 00657 } 00658 00659 /** Get maximum length of r_wrist_yaw value. 00660 * @return length of r_wrist_yaw value, can be length of the array or number of 00661 * maximum number of characters for a string 00662 */ 00663 size_t 00664 NaoJointStiffnessInterface::maxlenof_r_wrist_yaw() const 00665 { 00666 return 1; 00667 } 00668 00669 /** Set r_wrist_yaw value. 00670 * Right wrist yaw 00671 * @param new_r_wrist_yaw new r_wrist_yaw value 00672 */ 00673 void 00674 NaoJointStiffnessInterface::set_r_wrist_yaw(const float new_r_wrist_yaw) 00675 { 00676 data->r_wrist_yaw = new_r_wrist_yaw; 00677 data_changed = true; 00678 } 00679 00680 /** Get r_hand value. 00681 * Right hand 00682 * @return r_hand value 00683 */ 00684 float 00685 NaoJointStiffnessInterface::r_hand() const 00686 { 00687 return data->r_hand; 00688 } 00689 00690 /** Get maximum length of r_hand value. 00691 * @return length of r_hand value, can be length of the array or number of 00692 * maximum number of characters for a string 00693 */ 00694 size_t 00695 NaoJointStiffnessInterface::maxlenof_r_hand() const 00696 { 00697 return 1; 00698 } 00699 00700 /** Set r_hand value. 00701 * Right hand 00702 * @param new_r_hand new r_hand value 00703 */ 00704 void 00705 NaoJointStiffnessInterface::set_r_hand(const float new_r_hand) 00706 { 00707 data->r_hand = new_r_hand; 00708 data_changed = true; 00709 } 00710 00711 /** Get r_hip_yaw_pitch value. 00712 * Right hip yaw pitch 00713 * @return r_hip_yaw_pitch value 00714 */ 00715 float 00716 NaoJointStiffnessInterface::r_hip_yaw_pitch() const 00717 { 00718 return data->r_hip_yaw_pitch; 00719 } 00720 00721 /** Get maximum length of r_hip_yaw_pitch value. 00722 * @return length of r_hip_yaw_pitch value, can be length of the array or number of 00723 * maximum number of characters for a string 00724 */ 00725 size_t 00726 NaoJointStiffnessInterface::maxlenof_r_hip_yaw_pitch() const 00727 { 00728 return 1; 00729 } 00730 00731 /** Set r_hip_yaw_pitch value. 00732 * Right hip yaw pitch 00733 * @param new_r_hip_yaw_pitch new r_hip_yaw_pitch value 00734 */ 00735 void 00736 NaoJointStiffnessInterface::set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch) 00737 { 00738 data->r_hip_yaw_pitch = new_r_hip_yaw_pitch; 00739 data_changed = true; 00740 } 00741 00742 /** Get r_hip_roll value. 00743 * Right hip roll 00744 * @return r_hip_roll value 00745 */ 00746 float 00747 NaoJointStiffnessInterface::r_hip_roll() const 00748 { 00749 return data->r_hip_roll; 00750 } 00751 00752 /** Get maximum length of r_hip_roll value. 00753 * @return length of r_hip_roll value, can be length of the array or number of 00754 * maximum number of characters for a string 00755 */ 00756 size_t 00757 NaoJointStiffnessInterface::maxlenof_r_hip_roll() const 00758 { 00759 return 1; 00760 } 00761 00762 /** Set r_hip_roll value. 00763 * Right hip roll 00764 * @param new_r_hip_roll new r_hip_roll value 00765 */ 00766 void 00767 NaoJointStiffnessInterface::set_r_hip_roll(const float new_r_hip_roll) 00768 { 00769 data->r_hip_roll = new_r_hip_roll; 00770 data_changed = true; 00771 } 00772 00773 /** Get r_hip_pitch value. 00774 * Right hip pitch 00775 * @return r_hip_pitch value 00776 */ 00777 float 00778 NaoJointStiffnessInterface::r_hip_pitch() const 00779 { 00780 return data->r_hip_pitch; 00781 } 00782 00783 /** Get maximum length of r_hip_pitch value. 00784 * @return length of r_hip_pitch value, can be length of the array or number of 00785 * maximum number of characters for a string 00786 */ 00787 size_t 00788 NaoJointStiffnessInterface::maxlenof_r_hip_pitch() const 00789 { 00790 return 1; 00791 } 00792 00793 /** Set r_hip_pitch value. 00794 * Right hip pitch 00795 * @param new_r_hip_pitch new r_hip_pitch value 00796 */ 00797 void 00798 NaoJointStiffnessInterface::set_r_hip_pitch(const float new_r_hip_pitch) 00799 { 00800 data->r_hip_pitch = new_r_hip_pitch; 00801 data_changed = true; 00802 } 00803 00804 /** Get r_knee_pitch value. 00805 * Right knee pitch 00806 * @return r_knee_pitch value 00807 */ 00808 float 00809 NaoJointStiffnessInterface::r_knee_pitch() const 00810 { 00811 return data->r_knee_pitch; 00812 } 00813 00814 /** Get maximum length of r_knee_pitch value. 00815 * @return length of r_knee_pitch value, can be length of the array or number of 00816 * maximum number of characters for a string 00817 */ 00818 size_t 00819 NaoJointStiffnessInterface::maxlenof_r_knee_pitch() const 00820 { 00821 return 1; 00822 } 00823 00824 /** Set r_knee_pitch value. 00825 * Right knee pitch 00826 * @param new_r_knee_pitch new r_knee_pitch value 00827 */ 00828 void 00829 NaoJointStiffnessInterface::set_r_knee_pitch(const float new_r_knee_pitch) 00830 { 00831 data->r_knee_pitch = new_r_knee_pitch; 00832 data_changed = true; 00833 } 00834 00835 /** Get r_ankle_pitch value. 00836 * Right ankle pitch 00837 * @return r_ankle_pitch value 00838 */ 00839 float 00840 NaoJointStiffnessInterface::r_ankle_pitch() const 00841 { 00842 return data->r_ankle_pitch; 00843 } 00844 00845 /** Get maximum length of r_ankle_pitch value. 00846 * @return length of r_ankle_pitch value, can be length of the array or number of 00847 * maximum number of characters for a string 00848 */ 00849 size_t 00850 NaoJointStiffnessInterface::maxlenof_r_ankle_pitch() const 00851 { 00852 return 1; 00853 } 00854 00855 /** Set r_ankle_pitch value. 00856 * Right ankle pitch 00857 * @param new_r_ankle_pitch new r_ankle_pitch value 00858 */ 00859 void 00860 NaoJointStiffnessInterface::set_r_ankle_pitch(const float new_r_ankle_pitch) 00861 { 00862 data->r_ankle_pitch = new_r_ankle_pitch; 00863 data_changed = true; 00864 } 00865 00866 /** Get r_ankle_roll value. 00867 * Right ankle roll 00868 * @return r_ankle_roll value 00869 */ 00870 float 00871 NaoJointStiffnessInterface::r_ankle_roll() const 00872 { 00873 return data->r_ankle_roll; 00874 } 00875 00876 /** Get maximum length of r_ankle_roll value. 00877 * @return length of r_ankle_roll value, can be length of the array or number of 00878 * maximum number of characters for a string 00879 */ 00880 size_t 00881 NaoJointStiffnessInterface::maxlenof_r_ankle_roll() const 00882 { 00883 return 1; 00884 } 00885 00886 /** Set r_ankle_roll value. 00887 * Right ankle roll 00888 * @param new_r_ankle_roll new r_ankle_roll value 00889 */ 00890 void 00891 NaoJointStiffnessInterface::set_r_ankle_roll(const float new_r_ankle_roll) 00892 { 00893 data->r_ankle_roll = new_r_ankle_roll; 00894 data_changed = true; 00895 } 00896 00897 /** Get minimum value. 00898 * 00899 Minimum stiffness of all joints. On the RoboCup version of the Nao this 00900 ignores the hand and wrist values. 00901 00902 * @return minimum value 00903 */ 00904 float 00905 NaoJointStiffnessInterface::minimum() const 00906 { 00907 return data->minimum; 00908 } 00909 00910 /** Get maximum length of minimum value. 00911 * @return length of minimum value, can be length of the array or number of 00912 * maximum number of characters for a string 00913 */ 00914 size_t 00915 NaoJointStiffnessInterface::maxlenof_minimum() const 00916 { 00917 return 1; 00918 } 00919 00920 /** Set minimum value. 00921 * 00922 Minimum stiffness of all joints. On the RoboCup version of the Nao this 00923 ignores the hand and wrist values. 00924 00925 * @param new_minimum new minimum value 00926 */ 00927 void 00928 NaoJointStiffnessInterface::set_minimum(const float new_minimum) 00929 { 00930 data->minimum = new_minimum; 00931 data_changed = true; 00932 } 00933 00934 /* =========== message create =========== */ 00935 Message * 00936 NaoJointStiffnessInterface::create_message(const char *type) const 00937 { 00938 if ( strncmp("SetStiffnessMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) { 00939 return new SetStiffnessMessage(); 00940 } else if ( strncmp("SetBodyStiffnessMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) { 00941 return new SetBodyStiffnessMessage(); 00942 } else if ( strncmp("SetStiffnessesMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) { 00943 return new SetStiffnessesMessage(); 00944 } else { 00945 throw UnknownTypeException("The given type '%s' does not match any known " 00946 "message type for this interface type.", type); 00947 } 00948 } 00949 00950 00951 /** Copy values from other interface. 00952 * @param other other interface to copy values from 00953 */ 00954 void 00955 NaoJointStiffnessInterface::copy_values(const Interface *other) 00956 { 00957 const NaoJointStiffnessInterface *oi = dynamic_cast<const NaoJointStiffnessInterface *>(other); 00958 if (oi == NULL) { 00959 throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)", 00960 type(), other->type()); 00961 } 00962 memcpy(data, oi->data, sizeof(NaoJointStiffnessInterface_data_t)); 00963 } 00964 00965 const char * 00966 NaoJointStiffnessInterface::enum_tostring(const char *enumtype, int val) const 00967 { 00968 throw UnknownTypeException("Unknown enum type %s", enumtype); 00969 } 00970 00971 /* =========== messages =========== */ 00972 /** @class NaoJointStiffnessInterface::SetStiffnessMessage <interfaces/NaoJointStiffnessInterface.h> 00973 * SetStiffnessMessage Fawkes BlackBoard Interface Message. 00974 * 00975 00976 */ 00977 00978 00979 /** Constructor with initial values. 00980 * @param ini_servo initial value for servo 00981 * @param ini_value initial value for value 00982 * @param ini_time_sec initial value for time_sec 00983 */ 00984 NaoJointStiffnessInterface::SetStiffnessMessage::SetStiffnessMessage(const uint32_t ini_servo, const float ini_value, const float ini_time_sec) : Message("SetStiffnessMessage") 00985 { 00986 data_size = sizeof(SetStiffnessMessage_data_t); 00987 data_ptr = malloc(data_size); 00988 memset(data_ptr, 0, data_size); 00989 data = (SetStiffnessMessage_data_t *)data_ptr; 00990 data_ts = (message_data_ts_t *)data_ptr; 00991 data->servo = ini_servo; 00992 data->value = ini_value; 00993 data->time_sec = ini_time_sec; 00994 add_fieldinfo(IFT_UINT32, "servo", 1, &data->servo); 00995 add_fieldinfo(IFT_FLOAT, "value", 1, &data->value); 00996 add_fieldinfo(IFT_FLOAT, "time_sec", 1, &data->time_sec); 00997 } 00998 /** Constructor */ 00999 NaoJointStiffnessInterface::SetStiffnessMessage::SetStiffnessMessage() : Message("SetStiffnessMessage") 01000 { 01001 data_size = sizeof(SetStiffnessMessage_data_t); 01002 data_ptr = malloc(data_size); 01003 memset(data_ptr, 0, data_size); 01004 data = (SetStiffnessMessage_data_t *)data_ptr; 01005 data_ts = (message_data_ts_t *)data_ptr; 01006 add_fieldinfo(IFT_UINT32, "servo", 1, &data->servo); 01007 add_fieldinfo(IFT_FLOAT, "value", 1, &data->value); 01008 add_fieldinfo(IFT_FLOAT, "time_sec", 1, &data->time_sec); 01009 } 01010 01011 /** Destructor */ 01012 NaoJointStiffnessInterface::SetStiffnessMessage::~SetStiffnessMessage() 01013 { 01014 free(data_ptr); 01015 } 01016 01017 /** Copy constructor. 01018 * @param m message to copy from 01019 */ 01020 NaoJointStiffnessInterface::SetStiffnessMessage::SetStiffnessMessage(const SetStiffnessMessage *m) : Message("SetStiffnessMessage") 01021 { 01022 data_size = m->data_size; 01023 data_ptr = malloc(data_size); 01024 memcpy(data_ptr, m->data_ptr, data_size); 01025 data = (SetStiffnessMessage_data_t *)data_ptr; 01026 data_ts = (message_data_ts_t *)data_ptr; 01027 } 01028 01029 /* Methods */ 01030 /** Get servo value. 01031 * 01032 A concatenated list of SERVO_* constants from the 01033 NaoJointPositionInterface to define the servos that should 01034 execute the movement. The list shall consist of binary or'ed 01035 SERVO_* constants. 01036 01037 * @return servo value 01038 */ 01039 uint32_t 01040 NaoJointStiffnessInterface::SetStiffnessMessage::servo() const 01041 { 01042 return data->servo; 01043 } 01044 01045 /** Get maximum length of servo value. 01046 * @return length of servo value, can be length of the array or number of 01047 * maximum number of characters for a string 01048 */ 01049 size_t 01050 NaoJointStiffnessInterface::SetStiffnessMessage::maxlenof_servo() const 01051 { 01052 return 1; 01053 } 01054 01055 /** Set servo value. 01056 * 01057 A concatenated list of SERVO_* constants from the 01058 NaoJointPositionInterface to define the servos that should 01059 execute the movement. The list shall consist of binary or'ed 01060 SERVO_* constants. 01061 01062 * @param new_servo new servo value 01063 */ 01064 void 01065 NaoJointStiffnessInterface::SetStiffnessMessage::set_servo(const uint32_t new_servo) 01066 { 01067 data->servo = new_servo; 01068 } 01069 01070 /** Get value value. 01071 * Servo value to set for servos. 01072 * @return value value 01073 */ 01074 float 01075 NaoJointStiffnessInterface::SetStiffnessMessage::value() const 01076 { 01077 return data->value; 01078 } 01079 01080 /** Get maximum length of value value. 01081 * @return length of value value, can be length of the array or number of 01082 * maximum number of characters for a string 01083 */ 01084 size_t 01085 NaoJointStiffnessInterface::SetStiffnessMessage::maxlenof_value() const 01086 { 01087 return 1; 01088 } 01089 01090 /** Set value value. 01091 * Servo value to set for servos. 01092 * @param new_value new value value 01093 */ 01094 void 01095 NaoJointStiffnessInterface::SetStiffnessMessage::set_value(const float new_value) 01096 { 01097 data->value = new_value; 01098 } 01099 01100 /** Get time_sec value. 01101 * Time when to reach the stiffness. 01102 * @return time_sec value 01103 */ 01104 float 01105 NaoJointStiffnessInterface::SetStiffnessMessage::time_sec() const 01106 { 01107 return data->time_sec; 01108 } 01109 01110 /** Get maximum length of time_sec value. 01111 * @return length of time_sec value, can be length of the array or number of 01112 * maximum number of characters for a string 01113 */ 01114 size_t 01115 NaoJointStiffnessInterface::SetStiffnessMessage::maxlenof_time_sec() const 01116 { 01117 return 1; 01118 } 01119 01120 /** Set time_sec value. 01121 * Time when to reach the stiffness. 01122 * @param new_time_sec new time_sec value 01123 */ 01124 void 01125 NaoJointStiffnessInterface::SetStiffnessMessage::set_time_sec(const float new_time_sec) 01126 { 01127 data->time_sec = new_time_sec; 01128 } 01129 01130 /** Clone this message. 01131 * Produces a message of the same type as this message and copies the 01132 * data to the new message. 01133 * @return clone of this message 01134 */ 01135 Message * 01136 NaoJointStiffnessInterface::SetStiffnessMessage::clone() const 01137 { 01138 return new NaoJointStiffnessInterface::SetStiffnessMessage(this); 01139 } 01140 /** @class NaoJointStiffnessInterface::SetBodyStiffnessMessage <interfaces/NaoJointStiffnessInterface.h> 01141 * SetBodyStiffnessMessage Fawkes BlackBoard Interface Message. 01142 * 01143 01144 */ 01145 01146 01147 /** Constructor with initial values. 01148 * @param ini_value initial value for value 01149 * @param ini_time_sec initial value for time_sec 01150 */ 01151 NaoJointStiffnessInterface::SetBodyStiffnessMessage::SetBodyStiffnessMessage(const float ini_value, const float ini_time_sec) : Message("SetBodyStiffnessMessage") 01152 { 01153 data_size = sizeof(SetBodyStiffnessMessage_data_t); 01154 data_ptr = malloc(data_size); 01155 memset(data_ptr, 0, data_size); 01156 data = (SetBodyStiffnessMessage_data_t *)data_ptr; 01157 data_ts = (message_data_ts_t *)data_ptr; 01158 data->value = ini_value; 01159 data->time_sec = ini_time_sec; 01160 add_fieldinfo(IFT_FLOAT, "value", 1, &data->value); 01161 add_fieldinfo(IFT_FLOAT, "time_sec", 1, &data->time_sec); 01162 } 01163 /** Constructor */ 01164 NaoJointStiffnessInterface::SetBodyStiffnessMessage::SetBodyStiffnessMessage() : Message("SetBodyStiffnessMessage") 01165 { 01166 data_size = sizeof(SetBodyStiffnessMessage_data_t); 01167 data_ptr = malloc(data_size); 01168 memset(data_ptr, 0, data_size); 01169 data = (SetBodyStiffnessMessage_data_t *)data_ptr; 01170 data_ts = (message_data_ts_t *)data_ptr; 01171 add_fieldinfo(IFT_FLOAT, "value", 1, &data->value); 01172 add_fieldinfo(IFT_FLOAT, "time_sec", 1, &data->time_sec); 01173 } 01174 01175 /** Destructor */ 01176 NaoJointStiffnessInterface::SetBodyStiffnessMessage::~SetBodyStiffnessMessage() 01177 { 01178 free(data_ptr); 01179 } 01180 01181 /** Copy constructor. 01182 * @param m message to copy from 01183 */ 01184 NaoJointStiffnessInterface::SetBodyStiffnessMessage::SetBodyStiffnessMessage(const SetBodyStiffnessMessage *m) : Message("SetBodyStiffnessMessage") 01185 { 01186 data_size = m->data_size; 01187 data_ptr = malloc(data_size); 01188 memcpy(data_ptr, m->data_ptr, data_size); 01189 data = (SetBodyStiffnessMessage_data_t *)data_ptr; 01190 data_ts = (message_data_ts_t *)data_ptr; 01191 } 01192 01193 /* Methods */ 01194 /** Get value value. 01195 * Servo value to set for servos. 01196 * @return value value 01197 */ 01198 float 01199 NaoJointStiffnessInterface::SetBodyStiffnessMessage::value() const 01200 { 01201 return data->value; 01202 } 01203 01204 /** Get maximum length of value value. 01205 * @return length of value value, can be length of the array or number of 01206 * maximum number of characters for a string 01207 */ 01208 size_t 01209 NaoJointStiffnessInterface::SetBodyStiffnessMessage::maxlenof_value() const 01210 { 01211 return 1; 01212 } 01213 01214 /** Set value value. 01215 * Servo value to set for servos. 01216 * @param new_value new value value 01217 */ 01218 void 01219 NaoJointStiffnessInterface::SetBodyStiffnessMessage::set_value(const float new_value) 01220 { 01221 data->value = new_value; 01222 } 01223 01224 /** Get time_sec value. 01225 * Time when to reach the stiffness. 01226 * @return time_sec value 01227 */ 01228 float 01229 NaoJointStiffnessInterface::SetBodyStiffnessMessage::time_sec() const 01230 { 01231 return data->time_sec; 01232 } 01233 01234 /** Get maximum length of time_sec value. 01235 * @return length of time_sec value, can be length of the array or number of 01236 * maximum number of characters for a string 01237 */ 01238 size_t 01239 NaoJointStiffnessInterface::SetBodyStiffnessMessage::maxlenof_time_sec() const 01240 { 01241 return 1; 01242 } 01243 01244 /** Set time_sec value. 01245 * Time when to reach the stiffness. 01246 * @param new_time_sec new time_sec value 01247 */ 01248 void 01249 NaoJointStiffnessInterface::SetBodyStiffnessMessage::set_time_sec(const float new_time_sec) 01250 { 01251 data->time_sec = new_time_sec; 01252 } 01253 01254 /** Clone this message. 01255 * Produces a message of the same type as this message and copies the 01256 * data to the new message. 01257 * @return clone of this message 01258 */ 01259 Message * 01260 NaoJointStiffnessInterface::SetBodyStiffnessMessage::clone() const 01261 { 01262 return new NaoJointStiffnessInterface::SetBodyStiffnessMessage(this); 01263 } 01264 /** @class NaoJointStiffnessInterface::SetStiffnessesMessage <interfaces/NaoJointStiffnessInterface.h> 01265 * SetStiffnessesMessage Fawkes BlackBoard Interface Message. 01266 * 01267 01268 */ 01269 01270 01271 /** Constructor with initial values. 01272 * @param ini_time_sec initial value for time_sec 01273 * @param ini_head_yaw initial value for head_yaw 01274 * @param ini_head_pitch initial value for head_pitch 01275 * @param ini_l_shoulder_pitch initial value for l_shoulder_pitch 01276 * @param ini_l_shoulder_roll initial value for l_shoulder_roll 01277 * @param ini_l_elbow_yaw initial value for l_elbow_yaw 01278 * @param ini_l_elbow_roll initial value for l_elbow_roll 01279 * @param ini_l_wrist_yaw initial value for l_wrist_yaw 01280 * @param ini_l_hand initial value for l_hand 01281 * @param ini_l_hip_yaw_pitch initial value for l_hip_yaw_pitch 01282 * @param ini_l_hip_roll initial value for l_hip_roll 01283 * @param ini_l_hip_pitch initial value for l_hip_pitch 01284 * @param ini_l_knee_pitch initial value for l_knee_pitch 01285 * @param ini_l_ankle_pitch initial value for l_ankle_pitch 01286 * @param ini_l_ankle_roll initial value for l_ankle_roll 01287 * @param ini_r_shoulder_pitch initial value for r_shoulder_pitch 01288 * @param ini_r_shoulder_roll initial value for r_shoulder_roll 01289 * @param ini_r_elbow_yaw initial value for r_elbow_yaw 01290 * @param ini_r_wrist_yaw initial value for r_wrist_yaw 01291 * @param ini_r_hand initial value for r_hand 01292 * @param ini_r_hip_yaw_pitch initial value for r_hip_yaw_pitch 01293 * @param ini_r_hip_roll initial value for r_hip_roll 01294 * @param ini_r_hip_pitch initial value for r_hip_pitch 01295 * @param ini_r_knee_pitch initial value for r_knee_pitch 01296 * @param ini_r_ankle_pitch initial value for r_ankle_pitch 01297 * @param ini_r_ankle_roll initial value for r_ankle_roll 01298 * @param ini_r_elbow_roll initial value for r_elbow_roll 01299 */ 01300 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") 01301 { 01302 data_size = sizeof(SetStiffnessesMessage_data_t); 01303 data_ptr = malloc(data_size); 01304 memset(data_ptr, 0, data_size); 01305 data = (SetStiffnessesMessage_data_t *)data_ptr; 01306 data_ts = (message_data_ts_t *)data_ptr; 01307 data->time_sec = ini_time_sec; 01308 data->head_yaw = ini_head_yaw; 01309 data->head_pitch = ini_head_pitch; 01310 data->l_shoulder_pitch = ini_l_shoulder_pitch; 01311 data->l_shoulder_roll = ini_l_shoulder_roll; 01312 data->l_elbow_yaw = ini_l_elbow_yaw; 01313 data->l_elbow_roll = ini_l_elbow_roll; 01314 data->l_wrist_yaw = ini_l_wrist_yaw; 01315 data->l_hand = ini_l_hand; 01316 data->l_hip_yaw_pitch = ini_l_hip_yaw_pitch; 01317 data->l_hip_roll = ini_l_hip_roll; 01318 data->l_hip_pitch = ini_l_hip_pitch; 01319 data->l_knee_pitch = ini_l_knee_pitch; 01320 data->l_ankle_pitch = ini_l_ankle_pitch; 01321 data->l_ankle_roll = ini_l_ankle_roll; 01322 data->r_shoulder_pitch = ini_r_shoulder_pitch; 01323 data->r_shoulder_roll = ini_r_shoulder_roll; 01324 data->r_elbow_yaw = ini_r_elbow_yaw; 01325 data->r_wrist_yaw = ini_r_wrist_yaw; 01326 data->r_hand = ini_r_hand; 01327 data->r_hip_yaw_pitch = ini_r_hip_yaw_pitch; 01328 data->r_hip_roll = ini_r_hip_roll; 01329 data->r_hip_pitch = ini_r_hip_pitch; 01330 data->r_knee_pitch = ini_r_knee_pitch; 01331 data->r_ankle_pitch = ini_r_ankle_pitch; 01332 data->r_ankle_roll = ini_r_ankle_roll; 01333 data->r_elbow_roll = ini_r_elbow_roll; 01334 add_fieldinfo(IFT_FLOAT, "time_sec", 1, &data->time_sec); 01335 add_fieldinfo(IFT_FLOAT, "head_yaw", 1, &data->head_yaw); 01336 add_fieldinfo(IFT_FLOAT, "head_pitch", 1, &data->head_pitch); 01337 add_fieldinfo(IFT_FLOAT, "l_shoulder_pitch", 1, &data->l_shoulder_pitch); 01338 add_fieldinfo(IFT_FLOAT, "l_shoulder_roll", 1, &data->l_shoulder_roll); 01339 add_fieldinfo(IFT_FLOAT, "l_elbow_yaw", 1, &data->l_elbow_yaw); 01340 add_fieldinfo(IFT_FLOAT, "l_elbow_roll", 1, &data->l_elbow_roll); 01341 add_fieldinfo(IFT_FLOAT, "l_wrist_yaw", 1, &data->l_wrist_yaw); 01342 add_fieldinfo(IFT_FLOAT, "l_hand", 1, &data->l_hand); 01343 add_fieldinfo(IFT_FLOAT, "l_hip_yaw_pitch", 1, &data->l_hip_yaw_pitch); 01344 add_fieldinfo(IFT_FLOAT, "l_hip_roll", 1, &data->l_hip_roll); 01345 add_fieldinfo(IFT_FLOAT, "l_hip_pitch", 1, &data->l_hip_pitch); 01346 add_fieldinfo(IFT_FLOAT, "l_knee_pitch", 1, &data->l_knee_pitch); 01347 add_fieldinfo(IFT_FLOAT, "l_ankle_pitch", 1, &data->l_ankle_pitch); 01348 add_fieldinfo(IFT_FLOAT, "l_ankle_roll", 1, &data->l_ankle_roll); 01349 add_fieldinfo(IFT_FLOAT, "r_shoulder_pitch", 1, &data->r_shoulder_pitch); 01350 add_fieldinfo(IFT_FLOAT, "r_shoulder_roll", 1, &data->r_shoulder_roll); 01351 add_fieldinfo(IFT_FLOAT, "r_elbow_yaw", 1, &data->r_elbow_yaw); 01352 add_fieldinfo(IFT_FLOAT, "r_wrist_yaw", 1, &data->r_wrist_yaw); 01353 add_fieldinfo(IFT_FLOAT, "r_hand", 1, &data->r_hand); 01354 add_fieldinfo(IFT_FLOAT, "r_hip_yaw_pitch", 1, &data->r_hip_yaw_pitch); 01355 add_fieldinfo(IFT_FLOAT, "r_hip_roll", 1, &data->r_hip_roll); 01356 add_fieldinfo(IFT_FLOAT, "r_hip_pitch", 1, &data->r_hip_pitch); 01357 add_fieldinfo(IFT_FLOAT, "r_knee_pitch", 1, &data->r_knee_pitch); 01358 add_fieldinfo(IFT_FLOAT, "r_ankle_pitch", 1, &data->r_ankle_pitch); 01359 add_fieldinfo(IFT_FLOAT, "r_ankle_roll", 1, &data->r_ankle_roll); 01360 add_fieldinfo(IFT_FLOAT, "r_elbow_roll", 1, &data->r_elbow_roll); 01361 } 01362 /** Constructor */ 01363 NaoJointStiffnessInterface::SetStiffnessesMessage::SetStiffnessesMessage() : Message("SetStiffnessesMessage") 01364 { 01365 data_size = sizeof(SetStiffnessesMessage_data_t); 01366 data_ptr = malloc(data_size); 01367 memset(data_ptr, 0, data_size); 01368 data = (SetStiffnessesMessage_data_t *)data_ptr; 01369 data_ts = (message_data_ts_t *)data_ptr; 01370 add_fieldinfo(IFT_FLOAT, "time_sec", 1, &data->time_sec); 01371 add_fieldinfo(IFT_FLOAT, "head_yaw", 1, &data->head_yaw); 01372 add_fieldinfo(IFT_FLOAT, "head_pitch", 1, &data->head_pitch); 01373 add_fieldinfo(IFT_FLOAT, "l_shoulder_pitch", 1, &data->l_shoulder_pitch); 01374 add_fieldinfo(IFT_FLOAT, "l_shoulder_roll", 1, &data->l_shoulder_roll); 01375 add_fieldinfo(IFT_FLOAT, "l_elbow_yaw", 1, &data->l_elbow_yaw); 01376 add_fieldinfo(IFT_FLOAT, "l_elbow_roll", 1, &data->l_elbow_roll); 01377 add_fieldinfo(IFT_FLOAT, "l_wrist_yaw", 1, &data->l_wrist_yaw); 01378 add_fieldinfo(IFT_FLOAT, "l_hand", 1, &data->l_hand); 01379 add_fieldinfo(IFT_FLOAT, "l_hip_yaw_pitch", 1, &data->l_hip_yaw_pitch); 01380 add_fieldinfo(IFT_FLOAT, "l_hip_roll", 1, &data->l_hip_roll); 01381 add_fieldinfo(IFT_FLOAT, "l_hip_pitch", 1, &data->l_hip_pitch); 01382 add_fieldinfo(IFT_FLOAT, "l_knee_pitch", 1, &data->l_knee_pitch); 01383 add_fieldinfo(IFT_FLOAT, "l_ankle_pitch", 1, &data->l_ankle_pitch); 01384 add_fieldinfo(IFT_FLOAT, "l_ankle_roll", 1, &data->l_ankle_roll); 01385 add_fieldinfo(IFT_FLOAT, "r_shoulder_pitch", 1, &data->r_shoulder_pitch); 01386 add_fieldinfo(IFT_FLOAT, "r_shoulder_roll", 1, &data->r_shoulder_roll); 01387 add_fieldinfo(IFT_FLOAT, "r_elbow_yaw", 1, &data->r_elbow_yaw); 01388 add_fieldinfo(IFT_FLOAT, "r_wrist_yaw", 1, &data->r_wrist_yaw); 01389 add_fieldinfo(IFT_FLOAT, "r_hand", 1, &data->r_hand); 01390 add_fieldinfo(IFT_FLOAT, "r_hip_yaw_pitch", 1, &data->r_hip_yaw_pitch); 01391 add_fieldinfo(IFT_FLOAT, "r_hip_roll", 1, &data->r_hip_roll); 01392 add_fieldinfo(IFT_FLOAT, "r_hip_pitch", 1, &data->r_hip_pitch); 01393 add_fieldinfo(IFT_FLOAT, "r_knee_pitch", 1, &data->r_knee_pitch); 01394 add_fieldinfo(IFT_FLOAT, "r_ankle_pitch", 1, &data->r_ankle_pitch); 01395 add_fieldinfo(IFT_FLOAT, "r_ankle_roll", 1, &data->r_ankle_roll); 01396 add_fieldinfo(IFT_FLOAT, "r_elbow_roll", 1, &data->r_elbow_roll); 01397 } 01398 01399 /** Destructor */ 01400 NaoJointStiffnessInterface::SetStiffnessesMessage::~SetStiffnessesMessage() 01401 { 01402 free(data_ptr); 01403 } 01404 01405 /** Copy constructor. 01406 * @param m message to copy from 01407 */ 01408 NaoJointStiffnessInterface::SetStiffnessesMessage::SetStiffnessesMessage(const SetStiffnessesMessage *m) : Message("SetStiffnessesMessage") 01409 { 01410 data_size = m->data_size; 01411 data_ptr = malloc(data_size); 01412 memcpy(data_ptr, m->data_ptr, data_size); 01413 data = (SetStiffnessesMessage_data_t *)data_ptr; 01414 data_ts = (message_data_ts_t *)data_ptr; 01415 } 01416 01417 /* Methods */ 01418 /** Get time_sec value. 01419 * Time when to reach the stiffness. 01420 * @return time_sec value 01421 */ 01422 float 01423 NaoJointStiffnessInterface::SetStiffnessesMessage::time_sec() const 01424 { 01425 return data->time_sec; 01426 } 01427 01428 /** Get maximum length of time_sec value. 01429 * @return length of time_sec value, can be length of the array or number of 01430 * maximum number of characters for a string 01431 */ 01432 size_t 01433 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_time_sec() const 01434 { 01435 return 1; 01436 } 01437 01438 /** Set time_sec value. 01439 * Time when to reach the stiffness. 01440 * @param new_time_sec new time_sec value 01441 */ 01442 void 01443 NaoJointStiffnessInterface::SetStiffnessesMessage::set_time_sec(const float new_time_sec) 01444 { 01445 data->time_sec = new_time_sec; 01446 } 01447 01448 /** Get head_yaw value. 01449 * Head yaw 01450 * @return head_yaw value 01451 */ 01452 float 01453 NaoJointStiffnessInterface::SetStiffnessesMessage::head_yaw() const 01454 { 01455 return data->head_yaw; 01456 } 01457 01458 /** Get maximum length of head_yaw value. 01459 * @return length of head_yaw value, can be length of the array or number of 01460 * maximum number of characters for a string 01461 */ 01462 size_t 01463 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_head_yaw() const 01464 { 01465 return 1; 01466 } 01467 01468 /** Set head_yaw value. 01469 * Head yaw 01470 * @param new_head_yaw new head_yaw value 01471 */ 01472 void 01473 NaoJointStiffnessInterface::SetStiffnessesMessage::set_head_yaw(const float new_head_yaw) 01474 { 01475 data->head_yaw = new_head_yaw; 01476 } 01477 01478 /** Get head_pitch value. 01479 * Head pitch 01480 * @return head_pitch value 01481 */ 01482 float 01483 NaoJointStiffnessInterface::SetStiffnessesMessage::head_pitch() const 01484 { 01485 return data->head_pitch; 01486 } 01487 01488 /** Get maximum length of head_pitch value. 01489 * @return length of head_pitch value, can be length of the array or number of 01490 * maximum number of characters for a string 01491 */ 01492 size_t 01493 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_head_pitch() const 01494 { 01495 return 1; 01496 } 01497 01498 /** Set head_pitch value. 01499 * Head pitch 01500 * @param new_head_pitch new head_pitch value 01501 */ 01502 void 01503 NaoJointStiffnessInterface::SetStiffnessesMessage::set_head_pitch(const float new_head_pitch) 01504 { 01505 data->head_pitch = new_head_pitch; 01506 } 01507 01508 /** Get l_shoulder_pitch value. 01509 * Left shoulder pitch 01510 * @return l_shoulder_pitch value 01511 */ 01512 float 01513 NaoJointStiffnessInterface::SetStiffnessesMessage::l_shoulder_pitch() const 01514 { 01515 return data->l_shoulder_pitch; 01516 } 01517 01518 /** Get maximum length of l_shoulder_pitch value. 01519 * @return length of l_shoulder_pitch value, can be length of the array or number of 01520 * maximum number of characters for a string 01521 */ 01522 size_t 01523 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_l_shoulder_pitch() const 01524 { 01525 return 1; 01526 } 01527 01528 /** Set l_shoulder_pitch value. 01529 * Left shoulder pitch 01530 * @param new_l_shoulder_pitch new l_shoulder_pitch value 01531 */ 01532 void 01533 NaoJointStiffnessInterface::SetStiffnessesMessage::set_l_shoulder_pitch(const float new_l_shoulder_pitch) 01534 { 01535 data->l_shoulder_pitch = new_l_shoulder_pitch; 01536 } 01537 01538 /** Get l_shoulder_roll value. 01539 * Left shoulder roll 01540 * @return l_shoulder_roll value 01541 */ 01542 float 01543 NaoJointStiffnessInterface::SetStiffnessesMessage::l_shoulder_roll() const 01544 { 01545 return data->l_shoulder_roll; 01546 } 01547 01548 /** Get maximum length of l_shoulder_roll value. 01549 * @return length of l_shoulder_roll value, can be length of the array or number of 01550 * maximum number of characters for a string 01551 */ 01552 size_t 01553 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_l_shoulder_roll() const 01554 { 01555 return 1; 01556 } 01557 01558 /** Set l_shoulder_roll value. 01559 * Left shoulder roll 01560 * @param new_l_shoulder_roll new l_shoulder_roll value 01561 */ 01562 void 01563 NaoJointStiffnessInterface::SetStiffnessesMessage::set_l_shoulder_roll(const float new_l_shoulder_roll) 01564 { 01565 data->l_shoulder_roll = new_l_shoulder_roll; 01566 } 01567 01568 /** Get l_elbow_yaw value. 01569 * Left elbow yaw 01570 * @return l_elbow_yaw value 01571 */ 01572 float 01573 NaoJointStiffnessInterface::SetStiffnessesMessage::l_elbow_yaw() const 01574 { 01575 return data->l_elbow_yaw; 01576 } 01577 01578 /** Get maximum length of l_elbow_yaw value. 01579 * @return length of l_elbow_yaw value, can be length of the array or number of 01580 * maximum number of characters for a string 01581 */ 01582 size_t 01583 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_l_elbow_yaw() const 01584 { 01585 return 1; 01586 } 01587 01588 /** Set l_elbow_yaw value. 01589 * Left elbow yaw 01590 * @param new_l_elbow_yaw new l_elbow_yaw value 01591 */ 01592 void 01593 NaoJointStiffnessInterface::SetStiffnessesMessage::set_l_elbow_yaw(const float new_l_elbow_yaw) 01594 { 01595 data->l_elbow_yaw = new_l_elbow_yaw; 01596 } 01597 01598 /** Get l_elbow_roll value. 01599 * Left elbow roll 01600 * @return l_elbow_roll value 01601 */ 01602 float 01603 NaoJointStiffnessInterface::SetStiffnessesMessage::l_elbow_roll() const 01604 { 01605 return data->l_elbow_roll; 01606 } 01607 01608 /** Get maximum length of l_elbow_roll value. 01609 * @return length of l_elbow_roll value, can be length of the array or number of 01610 * maximum number of characters for a string 01611 */ 01612 size_t 01613 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_l_elbow_roll() const 01614 { 01615 return 1; 01616 } 01617 01618 /** Set l_elbow_roll value. 01619 * Left elbow roll 01620 * @param new_l_elbow_roll new l_elbow_roll value 01621 */ 01622 void 01623 NaoJointStiffnessInterface::SetStiffnessesMessage::set_l_elbow_roll(const float new_l_elbow_roll) 01624 { 01625 data->l_elbow_roll = new_l_elbow_roll; 01626 } 01627 01628 /** Get l_wrist_yaw value. 01629 * Left wrist yaw 01630 * @return l_wrist_yaw value 01631 */ 01632 float 01633 NaoJointStiffnessInterface::SetStiffnessesMessage::l_wrist_yaw() const 01634 { 01635 return data->l_wrist_yaw; 01636 } 01637 01638 /** Get maximum length of l_wrist_yaw value. 01639 * @return length of l_wrist_yaw value, can be length of the array or number of 01640 * maximum number of characters for a string 01641 */ 01642 size_t 01643 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_l_wrist_yaw() const 01644 { 01645 return 1; 01646 } 01647 01648 /** Set l_wrist_yaw value. 01649 * Left wrist yaw 01650 * @param new_l_wrist_yaw new l_wrist_yaw value 01651 */ 01652 void 01653 NaoJointStiffnessInterface::SetStiffnessesMessage::set_l_wrist_yaw(const float new_l_wrist_yaw) 01654 { 01655 data->l_wrist_yaw = new_l_wrist_yaw; 01656 } 01657 01658 /** Get l_hand value. 01659 * Left hand 01660 * @return l_hand value 01661 */ 01662 float 01663 NaoJointStiffnessInterface::SetStiffnessesMessage::l_hand() const 01664 { 01665 return data->l_hand; 01666 } 01667 01668 /** Get maximum length of l_hand value. 01669 * @return length of l_hand value, can be length of the array or number of 01670 * maximum number of characters for a string 01671 */ 01672 size_t 01673 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_l_hand() const 01674 { 01675 return 1; 01676 } 01677 01678 /** Set l_hand value. 01679 * Left hand 01680 * @param new_l_hand new l_hand value 01681 */ 01682 void 01683 NaoJointStiffnessInterface::SetStiffnessesMessage::set_l_hand(const float new_l_hand) 01684 { 01685 data->l_hand = new_l_hand; 01686 } 01687 01688 /** Get l_hip_yaw_pitch value. 01689 * Left hip yaw pitch 01690 * @return l_hip_yaw_pitch value 01691 */ 01692 float 01693 NaoJointStiffnessInterface::SetStiffnessesMessage::l_hip_yaw_pitch() const 01694 { 01695 return data->l_hip_yaw_pitch; 01696 } 01697 01698 /** Get maximum length of l_hip_yaw_pitch value. 01699 * @return length of l_hip_yaw_pitch value, can be length of the array or number of 01700 * maximum number of characters for a string 01701 */ 01702 size_t 01703 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_l_hip_yaw_pitch() const 01704 { 01705 return 1; 01706 } 01707 01708 /** Set l_hip_yaw_pitch value. 01709 * Left hip yaw pitch 01710 * @param new_l_hip_yaw_pitch new l_hip_yaw_pitch value 01711 */ 01712 void 01713 NaoJointStiffnessInterface::SetStiffnessesMessage::set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch) 01714 { 01715 data->l_hip_yaw_pitch = new_l_hip_yaw_pitch; 01716 } 01717 01718 /** Get l_hip_roll value. 01719 * Left hip roll 01720 * @return l_hip_roll value 01721 */ 01722 float 01723 NaoJointStiffnessInterface::SetStiffnessesMessage::l_hip_roll() const 01724 { 01725 return data->l_hip_roll; 01726 } 01727 01728 /** Get maximum length of l_hip_roll value. 01729 * @return length of l_hip_roll value, can be length of the array or number of 01730 * maximum number of characters for a string 01731 */ 01732 size_t 01733 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_l_hip_roll() const 01734 { 01735 return 1; 01736 } 01737 01738 /** Set l_hip_roll value. 01739 * Left hip roll 01740 * @param new_l_hip_roll new l_hip_roll value 01741 */ 01742 void 01743 NaoJointStiffnessInterface::SetStiffnessesMessage::set_l_hip_roll(const float new_l_hip_roll) 01744 { 01745 data->l_hip_roll = new_l_hip_roll; 01746 } 01747 01748 /** Get l_hip_pitch value. 01749 * Left hip pitch 01750 * @return l_hip_pitch value 01751 */ 01752 float 01753 NaoJointStiffnessInterface::SetStiffnessesMessage::l_hip_pitch() const 01754 { 01755 return data->l_hip_pitch; 01756 } 01757 01758 /** Get maximum length of l_hip_pitch value. 01759 * @return length of l_hip_pitch value, can be length of the array or number of 01760 * maximum number of characters for a string 01761 */ 01762 size_t 01763 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_l_hip_pitch() const 01764 { 01765 return 1; 01766 } 01767 01768 /** Set l_hip_pitch value. 01769 * Left hip pitch 01770 * @param new_l_hip_pitch new l_hip_pitch value 01771 */ 01772 void 01773 NaoJointStiffnessInterface::SetStiffnessesMessage::set_l_hip_pitch(const float new_l_hip_pitch) 01774 { 01775 data->l_hip_pitch = new_l_hip_pitch; 01776 } 01777 01778 /** Get l_knee_pitch value. 01779 * Left knee pitch 01780 * @return l_knee_pitch value 01781 */ 01782 float 01783 NaoJointStiffnessInterface::SetStiffnessesMessage::l_knee_pitch() const 01784 { 01785 return data->l_knee_pitch; 01786 } 01787 01788 /** Get maximum length of l_knee_pitch value. 01789 * @return length of l_knee_pitch value, can be length of the array or number of 01790 * maximum number of characters for a string 01791 */ 01792 size_t 01793 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_l_knee_pitch() const 01794 { 01795 return 1; 01796 } 01797 01798 /** Set l_knee_pitch value. 01799 * Left knee pitch 01800 * @param new_l_knee_pitch new l_knee_pitch value 01801 */ 01802 void 01803 NaoJointStiffnessInterface::SetStiffnessesMessage::set_l_knee_pitch(const float new_l_knee_pitch) 01804 { 01805 data->l_knee_pitch = new_l_knee_pitch; 01806 } 01807 01808 /** Get l_ankle_pitch value. 01809 * Left ankle pitch 01810 * @return l_ankle_pitch value 01811 */ 01812 float 01813 NaoJointStiffnessInterface::SetStiffnessesMessage::l_ankle_pitch() const 01814 { 01815 return data->l_ankle_pitch; 01816 } 01817 01818 /** Get maximum length of l_ankle_pitch value. 01819 * @return length of l_ankle_pitch value, can be length of the array or number of 01820 * maximum number of characters for a string 01821 */ 01822 size_t 01823 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_l_ankle_pitch() const 01824 { 01825 return 1; 01826 } 01827 01828 /** Set l_ankle_pitch value. 01829 * Left ankle pitch 01830 * @param new_l_ankle_pitch new l_ankle_pitch value 01831 */ 01832 void 01833 NaoJointStiffnessInterface::SetStiffnessesMessage::set_l_ankle_pitch(const float new_l_ankle_pitch) 01834 { 01835 data->l_ankle_pitch = new_l_ankle_pitch; 01836 } 01837 01838 /** Get l_ankle_roll value. 01839 * Left ankle roll 01840 * @return l_ankle_roll value 01841 */ 01842 float 01843 NaoJointStiffnessInterface::SetStiffnessesMessage::l_ankle_roll() const 01844 { 01845 return data->l_ankle_roll; 01846 } 01847 01848 /** Get maximum length of l_ankle_roll value. 01849 * @return length of l_ankle_roll value, can be length of the array or number of 01850 * maximum number of characters for a string 01851 */ 01852 size_t 01853 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_l_ankle_roll() const 01854 { 01855 return 1; 01856 } 01857 01858 /** Set l_ankle_roll value. 01859 * Left ankle roll 01860 * @param new_l_ankle_roll new l_ankle_roll value 01861 */ 01862 void 01863 NaoJointStiffnessInterface::SetStiffnessesMessage::set_l_ankle_roll(const float new_l_ankle_roll) 01864 { 01865 data->l_ankle_roll = new_l_ankle_roll; 01866 } 01867 01868 /** Get r_shoulder_pitch value. 01869 * Right shoulder pitch 01870 * @return r_shoulder_pitch value 01871 */ 01872 float 01873 NaoJointStiffnessInterface::SetStiffnessesMessage::r_shoulder_pitch() const 01874 { 01875 return data->r_shoulder_pitch; 01876 } 01877 01878 /** Get maximum length of r_shoulder_pitch value. 01879 * @return length of r_shoulder_pitch value, can be length of the array or number of 01880 * maximum number of characters for a string 01881 */ 01882 size_t 01883 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_r_shoulder_pitch() const 01884 { 01885 return 1; 01886 } 01887 01888 /** Set r_shoulder_pitch value. 01889 * Right shoulder pitch 01890 * @param new_r_shoulder_pitch new r_shoulder_pitch value 01891 */ 01892 void 01893 NaoJointStiffnessInterface::SetStiffnessesMessage::set_r_shoulder_pitch(const float new_r_shoulder_pitch) 01894 { 01895 data->r_shoulder_pitch = new_r_shoulder_pitch; 01896 } 01897 01898 /** Get r_shoulder_roll value. 01899 * Right shoulder roll 01900 * @return r_shoulder_roll value 01901 */ 01902 float 01903 NaoJointStiffnessInterface::SetStiffnessesMessage::r_shoulder_roll() const 01904 { 01905 return data->r_shoulder_roll; 01906 } 01907 01908 /** Get maximum length of r_shoulder_roll value. 01909 * @return length of r_shoulder_roll value, can be length of the array or number of 01910 * maximum number of characters for a string 01911 */ 01912 size_t 01913 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_r_shoulder_roll() const 01914 { 01915 return 1; 01916 } 01917 01918 /** Set r_shoulder_roll value. 01919 * Right shoulder roll 01920 * @param new_r_shoulder_roll new r_shoulder_roll value 01921 */ 01922 void 01923 NaoJointStiffnessInterface::SetStiffnessesMessage::set_r_shoulder_roll(const float new_r_shoulder_roll) 01924 { 01925 data->r_shoulder_roll = new_r_shoulder_roll; 01926 } 01927 01928 /** Get r_elbow_yaw value. 01929 * Right elbow yaw 01930 * @return r_elbow_yaw value 01931 */ 01932 float 01933 NaoJointStiffnessInterface::SetStiffnessesMessage::r_elbow_yaw() const 01934 { 01935 return data->r_elbow_yaw; 01936 } 01937 01938 /** Get maximum length of r_elbow_yaw value. 01939 * @return length of r_elbow_yaw value, can be length of the array or number of 01940 * maximum number of characters for a string 01941 */ 01942 size_t 01943 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_r_elbow_yaw() const 01944 { 01945 return 1; 01946 } 01947 01948 /** Set r_elbow_yaw value. 01949 * Right elbow yaw 01950 * @param new_r_elbow_yaw new r_elbow_yaw value 01951 */ 01952 void 01953 NaoJointStiffnessInterface::SetStiffnessesMessage::set_r_elbow_yaw(const float new_r_elbow_yaw) 01954 { 01955 data->r_elbow_yaw = new_r_elbow_yaw; 01956 } 01957 01958 /** Get r_wrist_yaw value. 01959 * Right wrist yaw 01960 * @return r_wrist_yaw value 01961 */ 01962 float 01963 NaoJointStiffnessInterface::SetStiffnessesMessage::r_wrist_yaw() const 01964 { 01965 return data->r_wrist_yaw; 01966 } 01967 01968 /** Get maximum length of r_wrist_yaw value. 01969 * @return length of r_wrist_yaw value, can be length of the array or number of 01970 * maximum number of characters for a string 01971 */ 01972 size_t 01973 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_r_wrist_yaw() const 01974 { 01975 return 1; 01976 } 01977 01978 /** Set r_wrist_yaw value. 01979 * Right wrist yaw 01980 * @param new_r_wrist_yaw new r_wrist_yaw value 01981 */ 01982 void 01983 NaoJointStiffnessInterface::SetStiffnessesMessage::set_r_wrist_yaw(const float new_r_wrist_yaw) 01984 { 01985 data->r_wrist_yaw = new_r_wrist_yaw; 01986 } 01987 01988 /** Get r_hand value. 01989 * Right hand 01990 * @return r_hand value 01991 */ 01992 float 01993 NaoJointStiffnessInterface::SetStiffnessesMessage::r_hand() const 01994 { 01995 return data->r_hand; 01996 } 01997 01998 /** Get maximum length of r_hand value. 01999 * @return length of r_hand value, can be length of the array or number of 02000 * maximum number of characters for a string 02001 */ 02002 size_t 02003 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_r_hand() const 02004 { 02005 return 1; 02006 } 02007 02008 /** Set r_hand value. 02009 * Right hand 02010 * @param new_r_hand new r_hand value 02011 */ 02012 void 02013 NaoJointStiffnessInterface::SetStiffnessesMessage::set_r_hand(const float new_r_hand) 02014 { 02015 data->r_hand = new_r_hand; 02016 } 02017 02018 /** Get r_hip_yaw_pitch value. 02019 * Right hip yaw pitch 02020 * @return r_hip_yaw_pitch value 02021 */ 02022 float 02023 NaoJointStiffnessInterface::SetStiffnessesMessage::r_hip_yaw_pitch() const 02024 { 02025 return data->r_hip_yaw_pitch; 02026 } 02027 02028 /** Get maximum length of r_hip_yaw_pitch value. 02029 * @return length of r_hip_yaw_pitch value, can be length of the array or number of 02030 * maximum number of characters for a string 02031 */ 02032 size_t 02033 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_r_hip_yaw_pitch() const 02034 { 02035 return 1; 02036 } 02037 02038 /** Set r_hip_yaw_pitch value. 02039 * Right hip yaw pitch 02040 * @param new_r_hip_yaw_pitch new r_hip_yaw_pitch value 02041 */ 02042 void 02043 NaoJointStiffnessInterface::SetStiffnessesMessage::set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch) 02044 { 02045 data->r_hip_yaw_pitch = new_r_hip_yaw_pitch; 02046 } 02047 02048 /** Get r_hip_roll value. 02049 * Right hip roll 02050 * @return r_hip_roll value 02051 */ 02052 float 02053 NaoJointStiffnessInterface::SetStiffnessesMessage::r_hip_roll() const 02054 { 02055 return data->r_hip_roll; 02056 } 02057 02058 /** Get maximum length of r_hip_roll value. 02059 * @return length of r_hip_roll value, can be length of the array or number of 02060 * maximum number of characters for a string 02061 */ 02062 size_t 02063 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_r_hip_roll() const 02064 { 02065 return 1; 02066 } 02067 02068 /** Set r_hip_roll value. 02069 * Right hip roll 02070 * @param new_r_hip_roll new r_hip_roll value 02071 */ 02072 void 02073 NaoJointStiffnessInterface::SetStiffnessesMessage::set_r_hip_roll(const float new_r_hip_roll) 02074 { 02075 data->r_hip_roll = new_r_hip_roll; 02076 } 02077 02078 /** Get r_hip_pitch value. 02079 * Right hip pitch 02080 * @return r_hip_pitch value 02081 */ 02082 float 02083 NaoJointStiffnessInterface::SetStiffnessesMessage::r_hip_pitch() const 02084 { 02085 return data->r_hip_pitch; 02086 } 02087 02088 /** Get maximum length of r_hip_pitch value. 02089 * @return length of r_hip_pitch value, can be length of the array or number of 02090 * maximum number of characters for a string 02091 */ 02092 size_t 02093 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_r_hip_pitch() const 02094 { 02095 return 1; 02096 } 02097 02098 /** Set r_hip_pitch value. 02099 * Right hip pitch 02100 * @param new_r_hip_pitch new r_hip_pitch value 02101 */ 02102 void 02103 NaoJointStiffnessInterface::SetStiffnessesMessage::set_r_hip_pitch(const float new_r_hip_pitch) 02104 { 02105 data->r_hip_pitch = new_r_hip_pitch; 02106 } 02107 02108 /** Get r_knee_pitch value. 02109 * Right knee pitch 02110 * @return r_knee_pitch value 02111 */ 02112 float 02113 NaoJointStiffnessInterface::SetStiffnessesMessage::r_knee_pitch() const 02114 { 02115 return data->r_knee_pitch; 02116 } 02117 02118 /** Get maximum length of r_knee_pitch value. 02119 * @return length of r_knee_pitch value, can be length of the array or number of 02120 * maximum number of characters for a string 02121 */ 02122 size_t 02123 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_r_knee_pitch() const 02124 { 02125 return 1; 02126 } 02127 02128 /** Set r_knee_pitch value. 02129 * Right knee pitch 02130 * @param new_r_knee_pitch new r_knee_pitch value 02131 */ 02132 void 02133 NaoJointStiffnessInterface::SetStiffnessesMessage::set_r_knee_pitch(const float new_r_knee_pitch) 02134 { 02135 data->r_knee_pitch = new_r_knee_pitch; 02136 } 02137 02138 /** Get r_ankle_pitch value. 02139 * Right ankle pitch 02140 * @return r_ankle_pitch value 02141 */ 02142 float 02143 NaoJointStiffnessInterface::SetStiffnessesMessage::r_ankle_pitch() const 02144 { 02145 return data->r_ankle_pitch; 02146 } 02147 02148 /** Get maximum length of r_ankle_pitch value. 02149 * @return length of r_ankle_pitch value, can be length of the array or number of 02150 * maximum number of characters for a string 02151 */ 02152 size_t 02153 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_r_ankle_pitch() const 02154 { 02155 return 1; 02156 } 02157 02158 /** Set r_ankle_pitch value. 02159 * Right ankle pitch 02160 * @param new_r_ankle_pitch new r_ankle_pitch value 02161 */ 02162 void 02163 NaoJointStiffnessInterface::SetStiffnessesMessage::set_r_ankle_pitch(const float new_r_ankle_pitch) 02164 { 02165 data->r_ankle_pitch = new_r_ankle_pitch; 02166 } 02167 02168 /** Get r_ankle_roll value. 02169 * Right ankle roll 02170 * @return r_ankle_roll value 02171 */ 02172 float 02173 NaoJointStiffnessInterface::SetStiffnessesMessage::r_ankle_roll() const 02174 { 02175 return data->r_ankle_roll; 02176 } 02177 02178 /** Get maximum length of r_ankle_roll value. 02179 * @return length of r_ankle_roll value, can be length of the array or number of 02180 * maximum number of characters for a string 02181 */ 02182 size_t 02183 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_r_ankle_roll() const 02184 { 02185 return 1; 02186 } 02187 02188 /** Set r_ankle_roll value. 02189 * Right ankle roll 02190 * @param new_r_ankle_roll new r_ankle_roll value 02191 */ 02192 void 02193 NaoJointStiffnessInterface::SetStiffnessesMessage::set_r_ankle_roll(const float new_r_ankle_roll) 02194 { 02195 data->r_ankle_roll = new_r_ankle_roll; 02196 } 02197 02198 /** Get r_elbow_roll value. 02199 * Right elbow roll 02200 * @return r_elbow_roll value 02201 */ 02202 float 02203 NaoJointStiffnessInterface::SetStiffnessesMessage::r_elbow_roll() const 02204 { 02205 return data->r_elbow_roll; 02206 } 02207 02208 /** Get maximum length of r_elbow_roll value. 02209 * @return length of r_elbow_roll value, can be length of the array or number of 02210 * maximum number of characters for a string 02211 */ 02212 size_t 02213 NaoJointStiffnessInterface::SetStiffnessesMessage::maxlenof_r_elbow_roll() const 02214 { 02215 return 1; 02216 } 02217 02218 /** Set r_elbow_roll value. 02219 * Right elbow roll 02220 * @param new_r_elbow_roll new r_elbow_roll value 02221 */ 02222 void 02223 NaoJointStiffnessInterface::SetStiffnessesMessage::set_r_elbow_roll(const float new_r_elbow_roll) 02224 { 02225 data->r_elbow_roll = new_r_elbow_roll; 02226 } 02227 02228 /** Clone this message. 02229 * Produces a message of the same type as this message and copies the 02230 * data to the new message. 02231 * @return clone of this message 02232 */ 02233 Message * 02234 NaoJointStiffnessInterface::SetStiffnessesMessage::clone() const 02235 { 02236 return new NaoJointStiffnessInterface::SetStiffnessesMessage(this); 02237 } 02238 /** Check if message is valid and can be enqueued. 02239 * @param message Message to check 02240 * @return true if the message is valid, false otherwise. 02241 */ 02242 bool 02243 NaoJointStiffnessInterface::message_valid(const Message *message) const 02244 { 02245 const SetStiffnessMessage *m0 = dynamic_cast<const SetStiffnessMessage *>(message); 02246 if ( m0 != NULL ) { 02247 return true; 02248 } 02249 const SetBodyStiffnessMessage *m1 = dynamic_cast<const SetBodyStiffnessMessage *>(message); 02250 if ( m1 != NULL ) { 02251 return true; 02252 } 02253 const SetStiffnessesMessage *m2 = dynamic_cast<const SetStiffnessesMessage *>(message); 02254 if ( m2 != NULL ) { 02255 return true; 02256 } 02257 return false; 02258 } 02259 02260 /// @cond INTERNALS 02261 EXPORT_INTERFACE(NaoJointStiffnessInterface) 02262 /// @endcond 02263 02264 02265 } // end namespace fawkes