HumanoidMotionInterface.cpp

00001 
00002 /***************************************************************************
00003  *  HumanoidMotionInterface.cpp - Fawkes BlackBoard Interface - HumanoidMotionInterface
00004  *
00005  *  Templated created:   Thu Oct 12 10:49:19 2006
00006  *  Copyright  2008  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/HumanoidMotionInterface.h>
00025 
00026 #include <core/exceptions/software.h>
00027 
00028 #include <cstring>
00029 #include <cstdlib>
00030 
00031 namespace fawkes {
00032 
00033 /** @class HumanoidMotionInterface <interfaces/HumanoidMotionInterface.h>
00034  * HumanoidMotionInterface Fawkes BlackBoard Interface.
00035  * 
00036       This interface provides acces to basic humanoid motion patterns.
00037     
00038  * @ingroup FawkesInterfaces
00039  */
00040 
00041 
00042 
00043 /** Constructor */
00044 HumanoidMotionInterface::HumanoidMotionInterface() : Interface()
00045 {
00046   data_size = sizeof(HumanoidMotionInterface_data_t);
00047   data_ptr  = malloc(data_size);
00048   data      = (HumanoidMotionInterface_data_t *)data_ptr;
00049   data_ts   = (interface_data_ts_t *)data_ptr;
00050   memset(data_ptr, 0, data_size);
00051   add_fieldinfo(IFT_BOOL, "moving", 1, &data->moving);
00052   add_fieldinfo(IFT_ENUM, "supporting_leg", 1, &data->supporting_leg, "LegEnum");
00053   add_fieldinfo(IFT_FLOAT, "max_step_length", 1, &data->max_step_length);
00054   add_fieldinfo(IFT_FLOAT, "max_step_height", 1, &data->max_step_height);
00055   add_fieldinfo(IFT_FLOAT, "max_step_side", 1, &data->max_step_side);
00056   add_fieldinfo(IFT_FLOAT, "max_step_turn", 1, &data->max_step_turn);
00057   add_fieldinfo(IFT_FLOAT, "zmp_offset_forward", 1, &data->zmp_offset_forward);
00058   add_fieldinfo(IFT_FLOAT, "zmp_offset_sideward", 1, &data->zmp_offset_sideward);
00059   add_fieldinfo(IFT_FLOAT, "l_hip_roll_compensation", 1, &data->l_hip_roll_compensation);
00060   add_fieldinfo(IFT_FLOAT, "r_hip_roll_compensation", 1, &data->r_hip_roll_compensation);
00061   add_fieldinfo(IFT_FLOAT, "hip_height", 1, &data->hip_height);
00062   add_fieldinfo(IFT_FLOAT, "torso_sideward_orientation", 1, &data->torso_sideward_orientation);
00063   add_fieldinfo(IFT_BOOL, "arms_enabled", 1, &data->arms_enabled);
00064   add_fieldinfo(IFT_FLOAT, "shoulder_pitch_median", 1, &data->shoulder_pitch_median);
00065   add_fieldinfo(IFT_FLOAT, "shoulder_pitch_amplitude", 1, &data->shoulder_pitch_amplitude);
00066   add_fieldinfo(IFT_FLOAT, "elbow_roll_median", 1, &data->elbow_roll_median);
00067   add_fieldinfo(IFT_FLOAT, "elbow_roll_amplitude", 1, &data->elbow_roll_amplitude);
00068   add_fieldinfo(IFT_UINT32, "msgid", 1, &data->msgid);
00069   add_messageinfo("SetWalkParamsMessage");
00070   add_messageinfo("SetWalkArmsParamsMessage");
00071   add_messageinfo("StopMessage");
00072   add_messageinfo("WalkStraightMessage");
00073   add_messageinfo("WalkSidewaysMessage");
00074   add_messageinfo("WalkArcMessage");
00075   add_messageinfo("TurnMessage");
00076   add_messageinfo("KickMessage");
00077   add_messageinfo("ParkMessage");
00078   add_messageinfo("GetUpMessage");
00079   add_messageinfo("StandupMessage");
00080   add_messageinfo("YawPitchHeadMessage");
00081   add_messageinfo("SetStiffnessParamsMessage");
00082   unsigned char tmp_hash[] = {0xee, 0x4a, 0x86, 0xce, 0x88, 0xf0, 0x83, 0xef, 0x80, 0xa, 0x8e, 0x3b, 0x3f, 0xae, 0xe3, 0x8b};
00083   set_hash(tmp_hash);
00084 }
00085 
00086 /** Destructor */
00087 HumanoidMotionInterface::~HumanoidMotionInterface()
00088 {
00089   free(data_ptr);
00090 }
00091 /** Convert LegEnum constant to string.
00092  * @param value value to convert to string
00093  * @return constant value as string.
00094  */
00095 const char *
00096 HumanoidMotionInterface::tostring_LegEnum(LegEnum value) const
00097 {
00098   switch (value) {
00099   case LEG_LEFT: return "LEG_LEFT";
00100   case LEG_RIGHT: return "LEG_RIGHT";
00101   default: return "UNKNOWN";
00102   }
00103 }
00104 /** Convert StandupEnum constant to string.
00105  * @param value value to convert to string
00106  * @return constant value as string.
00107  */
00108 const char *
00109 HumanoidMotionInterface::tostring_StandupEnum(StandupEnum value) const
00110 {
00111   switch (value) {
00112   case STANDUP_DETECT: return "STANDUP_DETECT";
00113   case STANDUP_BACK: return "STANDUP_BACK";
00114   case STANDUP_FRONT: return "STANDUP_FRONT";
00115   default: return "UNKNOWN";
00116   }
00117 }
00118 /** Convert StiffnessMotionPatternEnum constant to string.
00119  * @param value value to convert to string
00120  * @return constant value as string.
00121  */
00122 const char *
00123 HumanoidMotionInterface::tostring_StiffnessMotionPatternEnum(StiffnessMotionPatternEnum value) const
00124 {
00125   switch (value) {
00126   case WALK: return "WALK";
00127   case KICK: return "KICK";
00128   default: return "UNKNOWN";
00129   }
00130 }
00131 /* Methods */
00132 /** Get moving value.
00133  * True if the robot is currently moving.
00134  * @return moving value
00135  */
00136 bool
00137 HumanoidMotionInterface::is_moving() const
00138 {
00139   return data->moving;
00140 }
00141 
00142 /** Get maximum length of moving value.
00143  * @return length of moving value, can be length of the array or number of 
00144  * maximum number of characters for a string
00145  */
00146 size_t
00147 HumanoidMotionInterface::maxlenof_moving() const
00148 {
00149   return 1;
00150 }
00151 
00152 /** Set moving value.
00153  * True if the robot is currently moving.
00154  * @param new_moving new moving value
00155  */
00156 void
00157 HumanoidMotionInterface::set_moving(const bool new_moving)
00158 {
00159   data->moving = new_moving;
00160   data_changed = true;
00161 }
00162 
00163 /** Get supporting_leg value.
00164  * Marks the supporting leg
00165  * @return supporting_leg value
00166  */
00167 HumanoidMotionInterface::LegEnum
00168 HumanoidMotionInterface::supporting_leg() const
00169 {
00170   return data->supporting_leg;
00171 }
00172 
00173 /** Get maximum length of supporting_leg value.
00174  * @return length of supporting_leg value, can be length of the array or number of 
00175  * maximum number of characters for a string
00176  */
00177 size_t
00178 HumanoidMotionInterface::maxlenof_supporting_leg() const
00179 {
00180   return 1;
00181 }
00182 
00183 /** Set supporting_leg value.
00184  * Marks the supporting leg
00185  * @param new_supporting_leg new supporting_leg value
00186  */
00187 void
00188 HumanoidMotionInterface::set_supporting_leg(const LegEnum new_supporting_leg)
00189 {
00190   data->supporting_leg = new_supporting_leg;
00191   data_changed = true;
00192 }
00193 
00194 /** Get max_step_length value.
00195  * 
00196       Maximum length of a footstep in m.
00197     
00198  * @return max_step_length value
00199  */
00200 float
00201 HumanoidMotionInterface::max_step_length() const
00202 {
00203   return data->max_step_length;
00204 }
00205 
00206 /** Get maximum length of max_step_length value.
00207  * @return length of max_step_length value, can be length of the array or number of 
00208  * maximum number of characters for a string
00209  */
00210 size_t
00211 HumanoidMotionInterface::maxlenof_max_step_length() const
00212 {
00213   return 1;
00214 }
00215 
00216 /** Set max_step_length value.
00217  * 
00218       Maximum length of a footstep in m.
00219     
00220  * @param new_max_step_length new max_step_length value
00221  */
00222 void
00223 HumanoidMotionInterface::set_max_step_length(const float new_max_step_length)
00224 {
00225   data->max_step_length = new_max_step_length;
00226   data_changed = true;
00227 }
00228 
00229 /** Get max_step_height value.
00230  * 
00231       Maxium height of a footstep cycloid in m.
00232     
00233  * @return max_step_height value
00234  */
00235 float
00236 HumanoidMotionInterface::max_step_height() const
00237 {
00238   return data->max_step_height;
00239 }
00240 
00241 /** Get maximum length of max_step_height value.
00242  * @return length of max_step_height value, can be length of the array or number of 
00243  * maximum number of characters for a string
00244  */
00245 size_t
00246 HumanoidMotionInterface::maxlenof_max_step_height() const
00247 {
00248   return 1;
00249 }
00250 
00251 /** Set max_step_height value.
00252  * 
00253       Maxium height of a footstep cycloid in m.
00254     
00255  * @param new_max_step_height new max_step_height value
00256  */
00257 void
00258 HumanoidMotionInterface::set_max_step_height(const float new_max_step_height)
00259 {
00260   data->max_step_height = new_max_step_height;
00261   data_changed = true;
00262 }
00263 
00264 /** Get max_step_side value.
00265  * 
00266       Maximum length of side step in m.
00267     
00268  * @return max_step_side value
00269  */
00270 float
00271 HumanoidMotionInterface::max_step_side() const
00272 {
00273   return data->max_step_side;
00274 }
00275 
00276 /** Get maximum length of max_step_side value.
00277  * @return length of max_step_side value, can be length of the array or number of 
00278  * maximum number of characters for a string
00279  */
00280 size_t
00281 HumanoidMotionInterface::maxlenof_max_step_side() const
00282 {
00283   return 1;
00284 }
00285 
00286 /** Set max_step_side value.
00287  * 
00288       Maximum length of side step in m.
00289     
00290  * @param new_max_step_side new max_step_side value
00291  */
00292 void
00293 HumanoidMotionInterface::set_max_step_side(const float new_max_step_side)
00294 {
00295   data->max_step_side = new_max_step_side;
00296   data_changed = true;
00297 }
00298 
00299 /** Get max_step_turn value.
00300  * 
00301       Maximum change around vertical axis on radians per footstep.
00302     
00303  * @return max_step_turn value
00304  */
00305 float
00306 HumanoidMotionInterface::max_step_turn() const
00307 {
00308   return data->max_step_turn;
00309 }
00310 
00311 /** Get maximum length of max_step_turn value.
00312  * @return length of max_step_turn value, can be length of the array or number of 
00313  * maximum number of characters for a string
00314  */
00315 size_t
00316 HumanoidMotionInterface::maxlenof_max_step_turn() const
00317 {
00318   return 1;
00319 }
00320 
00321 /** Set max_step_turn value.
00322  * 
00323       Maximum change around vertical axis on radians per footstep.
00324     
00325  * @param new_max_step_turn new max_step_turn value
00326  */
00327 void
00328 HumanoidMotionInterface::set_max_step_turn(const float new_max_step_turn)
00329 {
00330   data->max_step_turn = new_max_step_turn;
00331   data_changed = true;
00332 }
00333 
00334 /** Get zmp_offset_forward value.
00335  * 
00336       Zero moment point offset in forward direction in m.
00337     
00338  * @return zmp_offset_forward value
00339  */
00340 float
00341 HumanoidMotionInterface::zmp_offset_forward() const
00342 {
00343   return data->zmp_offset_forward;
00344 }
00345 
00346 /** Get maximum length of zmp_offset_forward value.
00347  * @return length of zmp_offset_forward value, can be length of the array or number of 
00348  * maximum number of characters for a string
00349  */
00350 size_t
00351 HumanoidMotionInterface::maxlenof_zmp_offset_forward() const
00352 {
00353   return 1;
00354 }
00355 
00356 /** Set zmp_offset_forward value.
00357  * 
00358       Zero moment point offset in forward direction in m.
00359     
00360  * @param new_zmp_offset_forward new zmp_offset_forward value
00361  */
00362 void
00363 HumanoidMotionInterface::set_zmp_offset_forward(const float new_zmp_offset_forward)
00364 {
00365   data->zmp_offset_forward = new_zmp_offset_forward;
00366   data_changed = true;
00367 }
00368 
00369 /** Get zmp_offset_sideward value.
00370  * 
00371       Zero moment point offset in sideward direction in m.
00372     
00373  * @return zmp_offset_sideward value
00374  */
00375 float
00376 HumanoidMotionInterface::zmp_offset_sideward() const
00377 {
00378   return data->zmp_offset_sideward;
00379 }
00380 
00381 /** Get maximum length of zmp_offset_sideward value.
00382  * @return length of zmp_offset_sideward value, can be length of the array or number of 
00383  * maximum number of characters for a string
00384  */
00385 size_t
00386 HumanoidMotionInterface::maxlenof_zmp_offset_sideward() const
00387 {
00388   return 1;
00389 }
00390 
00391 /** Set zmp_offset_sideward value.
00392  * 
00393       Zero moment point offset in sideward direction in m.
00394     
00395  * @param new_zmp_offset_sideward new zmp_offset_sideward value
00396  */
00397 void
00398 HumanoidMotionInterface::set_zmp_offset_sideward(const float new_zmp_offset_sideward)
00399 {
00400   data->zmp_offset_sideward = new_zmp_offset_sideward;
00401   data_changed = true;
00402 }
00403 
00404 /** Get l_hip_roll_compensation value.
00405  * 
00406       Amplitude in degrees of backlash compensation for left hip roll.
00407       This is fitted to the Nao and is possibly not applicable to other robots.
00408     
00409  * @return l_hip_roll_compensation value
00410  */
00411 float
00412 HumanoidMotionInterface::l_hip_roll_compensation() const
00413 {
00414   return data->l_hip_roll_compensation;
00415 }
00416 
00417 /** Get maximum length of l_hip_roll_compensation value.
00418  * @return length of l_hip_roll_compensation value, can be length of the array or number of 
00419  * maximum number of characters for a string
00420  */
00421 size_t
00422 HumanoidMotionInterface::maxlenof_l_hip_roll_compensation() const
00423 {
00424   return 1;
00425 }
00426 
00427 /** Set l_hip_roll_compensation value.
00428  * 
00429       Amplitude in degrees of backlash compensation for left hip roll.
00430       This is fitted to the Nao and is possibly not applicable to other robots.
00431     
00432  * @param new_l_hip_roll_compensation new l_hip_roll_compensation value
00433  */
00434 void
00435 HumanoidMotionInterface::set_l_hip_roll_compensation(const float new_l_hip_roll_compensation)
00436 {
00437   data->l_hip_roll_compensation = new_l_hip_roll_compensation;
00438   data_changed = true;
00439 }
00440 
00441 /** Get r_hip_roll_compensation value.
00442  * 
00443       Amplitude in degrees of backlash compensation for left hip roll.
00444       This is fitted to the Nao and is possibly not applicable to other robots.
00445     
00446  * @return r_hip_roll_compensation value
00447  */
00448 float
00449 HumanoidMotionInterface::r_hip_roll_compensation() const
00450 {
00451   return data->r_hip_roll_compensation;
00452 }
00453 
00454 /** Get maximum length of r_hip_roll_compensation value.
00455  * @return length of r_hip_roll_compensation value, can be length of the array or number of 
00456  * maximum number of characters for a string
00457  */
00458 size_t
00459 HumanoidMotionInterface::maxlenof_r_hip_roll_compensation() const
00460 {
00461   return 1;
00462 }
00463 
00464 /** Set r_hip_roll_compensation value.
00465  * 
00466       Amplitude in degrees of backlash compensation for left hip roll.
00467       This is fitted to the Nao and is possibly not applicable to other robots.
00468     
00469  * @param new_r_hip_roll_compensation new r_hip_roll_compensation value
00470  */
00471 void
00472 HumanoidMotionInterface::set_r_hip_roll_compensation(const float new_r_hip_roll_compensation)
00473 {
00474   data->r_hip_roll_compensation = new_r_hip_roll_compensation;
00475   data_changed = true;
00476 }
00477 
00478 /** Get hip_height value.
00479  * 
00480       Height of hip during walk process.
00481       This is fitted to the Nao and is possibly not applicable to other robots.
00482     
00483  * @return hip_height value
00484  */
00485 float
00486 HumanoidMotionInterface::hip_height() const
00487 {
00488   return data->hip_height;
00489 }
00490 
00491 /** Get maximum length of hip_height value.
00492  * @return length of hip_height value, can be length of the array or number of 
00493  * maximum number of characters for a string
00494  */
00495 size_t
00496 HumanoidMotionInterface::maxlenof_hip_height() const
00497 {
00498   return 1;
00499 }
00500 
00501 /** Set hip_height value.
00502  * 
00503       Height of hip during walk process.
00504       This is fitted to the Nao and is possibly not applicable to other robots.
00505     
00506  * @param new_hip_height new hip_height value
00507  */
00508 void
00509 HumanoidMotionInterface::set_hip_height(const float new_hip_height)
00510 {
00511   data->hip_height = new_hip_height;
00512   data_changed = true;
00513 }
00514 
00515 /** Get torso_sideward_orientation value.
00516  * 
00517       Torso orientation in degrees in sideward direction during walking.
00518       This is fitted to the Nao and is possibly not applicable to other robots.
00519     
00520  * @return torso_sideward_orientation value
00521  */
00522 float
00523 HumanoidMotionInterface::torso_sideward_orientation() const
00524 {
00525   return data->torso_sideward_orientation;
00526 }
00527 
00528 /** Get maximum length of torso_sideward_orientation value.
00529  * @return length of torso_sideward_orientation value, can be length of the array or number of 
00530  * maximum number of characters for a string
00531  */
00532 size_t
00533 HumanoidMotionInterface::maxlenof_torso_sideward_orientation() const
00534 {
00535   return 1;
00536 }
00537 
00538 /** Set torso_sideward_orientation value.
00539  * 
00540       Torso orientation in degrees in sideward direction during walking.
00541       This is fitted to the Nao and is possibly not applicable to other robots.
00542     
00543  * @param new_torso_sideward_orientation new torso_sideward_orientation value
00544  */
00545 void
00546 HumanoidMotionInterface::set_torso_sideward_orientation(const float new_torso_sideward_orientation)
00547 {
00548   data->torso_sideward_orientation = new_torso_sideward_orientation;
00549   data_changed = true;
00550 }
00551 
00552 /** Get arms_enabled value.
00553  * 
00554       If true the arms are controlled during walking for balancing.
00555     
00556  * @return arms_enabled value
00557  */
00558 bool
00559 HumanoidMotionInterface::is_arms_enabled() const
00560 {
00561   return data->arms_enabled;
00562 }
00563 
00564 /** Get maximum length of arms_enabled value.
00565  * @return length of arms_enabled value, can be length of the array or number of 
00566  * maximum number of characters for a string
00567  */
00568 size_t
00569 HumanoidMotionInterface::maxlenof_arms_enabled() const
00570 {
00571   return 1;
00572 }
00573 
00574 /** Set arms_enabled value.
00575  * 
00576       If true the arms are controlled during walking for balancing.
00577     
00578  * @param new_arms_enabled new arms_enabled value
00579  */
00580 void
00581 HumanoidMotionInterface::set_arms_enabled(const bool new_arms_enabled)
00582 {
00583   data->arms_enabled = new_arms_enabled;
00584   data_changed = true;
00585 }
00586 
00587 /** Get shoulder_pitch_median value.
00588  * 
00589       Median in radians of the shoulder pitch during walking.
00590     
00591  * @return shoulder_pitch_median value
00592  */
00593 float
00594 HumanoidMotionInterface::shoulder_pitch_median() const
00595 {
00596   return data->shoulder_pitch_median;
00597 }
00598 
00599 /** Get maximum length of shoulder_pitch_median value.
00600  * @return length of shoulder_pitch_median value, can be length of the array or number of 
00601  * maximum number of characters for a string
00602  */
00603 size_t
00604 HumanoidMotionInterface::maxlenof_shoulder_pitch_median() const
00605 {
00606   return 1;
00607 }
00608 
00609 /** Set shoulder_pitch_median value.
00610  * 
00611       Median in radians of the shoulder pitch during walking.
00612     
00613  * @param new_shoulder_pitch_median new shoulder_pitch_median value
00614  */
00615 void
00616 HumanoidMotionInterface::set_shoulder_pitch_median(const float new_shoulder_pitch_median)
00617 {
00618   data->shoulder_pitch_median = new_shoulder_pitch_median;
00619   data_changed = true;
00620 }
00621 
00622 /** Get shoulder_pitch_amplitude value.
00623  * 
00624       Amplitude of the shoulder pitch movement during walking.
00625     
00626  * @return shoulder_pitch_amplitude value
00627  */
00628 float
00629 HumanoidMotionInterface::shoulder_pitch_amplitude() const
00630 {
00631   return data->shoulder_pitch_amplitude;
00632 }
00633 
00634 /** Get maximum length of shoulder_pitch_amplitude value.
00635  * @return length of shoulder_pitch_amplitude value, can be length of the array or number of 
00636  * maximum number of characters for a string
00637  */
00638 size_t
00639 HumanoidMotionInterface::maxlenof_shoulder_pitch_amplitude() const
00640 {
00641   return 1;
00642 }
00643 
00644 /** Set shoulder_pitch_amplitude value.
00645  * 
00646       Amplitude of the shoulder pitch movement during walking.
00647     
00648  * @param new_shoulder_pitch_amplitude new shoulder_pitch_amplitude value
00649  */
00650 void
00651 HumanoidMotionInterface::set_shoulder_pitch_amplitude(const float new_shoulder_pitch_amplitude)
00652 {
00653   data->shoulder_pitch_amplitude = new_shoulder_pitch_amplitude;
00654   data_changed = true;
00655 }
00656 
00657 /** Get elbow_roll_median value.
00658  * 
00659       Median in radians of the elbow roll during walking.
00660     
00661  * @return elbow_roll_median value
00662  */
00663 float
00664 HumanoidMotionInterface::elbow_roll_median() const
00665 {
00666   return data->elbow_roll_median;
00667 }
00668 
00669 /** Get maximum length of elbow_roll_median value.
00670  * @return length of elbow_roll_median value, can be length of the array or number of 
00671  * maximum number of characters for a string
00672  */
00673 size_t
00674 HumanoidMotionInterface::maxlenof_elbow_roll_median() const
00675 {
00676   return 1;
00677 }
00678 
00679 /** Set elbow_roll_median value.
00680  * 
00681       Median in radians of the elbow roll during walking.
00682     
00683  * @param new_elbow_roll_median new elbow_roll_median value
00684  */
00685 void
00686 HumanoidMotionInterface::set_elbow_roll_median(const float new_elbow_roll_median)
00687 {
00688   data->elbow_roll_median = new_elbow_roll_median;
00689   data_changed = true;
00690 }
00691 
00692 /** Get elbow_roll_amplitude value.
00693  * 
00694       Amplitude of the elbow roll movement during walking.
00695     
00696  * @return elbow_roll_amplitude value
00697  */
00698 float
00699 HumanoidMotionInterface::elbow_roll_amplitude() const
00700 {
00701   return data->elbow_roll_amplitude;
00702 }
00703 
00704 /** Get maximum length of elbow_roll_amplitude value.
00705  * @return length of elbow_roll_amplitude value, can be length of the array or number of 
00706  * maximum number of characters for a string
00707  */
00708 size_t
00709 HumanoidMotionInterface::maxlenof_elbow_roll_amplitude() const
00710 {
00711   return 1;
00712 }
00713 
00714 /** Set elbow_roll_amplitude value.
00715  * 
00716       Amplitude of the elbow roll movement during walking.
00717     
00718  * @param new_elbow_roll_amplitude new elbow_roll_amplitude value
00719  */
00720 void
00721 HumanoidMotionInterface::set_elbow_roll_amplitude(const float new_elbow_roll_amplitude)
00722 {
00723   data->elbow_roll_amplitude = new_elbow_roll_amplitude;
00724   data_changed = true;
00725 }
00726 
00727 /** Get msgid value.
00728  * 
00729       The ID of the message that is currently being
00730       processed, or 0 if no message is being processed.
00731     
00732  * @return msgid value
00733  */
00734 uint32_t
00735 HumanoidMotionInterface::msgid() const
00736 {
00737   return data->msgid;
00738 }
00739 
00740 /** Get maximum length of msgid value.
00741  * @return length of msgid value, can be length of the array or number of 
00742  * maximum number of characters for a string
00743  */
00744 size_t
00745 HumanoidMotionInterface::maxlenof_msgid() const
00746 {
00747   return 1;
00748 }
00749 
00750 /** Set msgid value.
00751  * 
00752       The ID of the message that is currently being
00753       processed, or 0 if no message is being processed.
00754     
00755  * @param new_msgid new msgid value
00756  */
00757 void
00758 HumanoidMotionInterface::set_msgid(const uint32_t new_msgid)
00759 {
00760   data->msgid = new_msgid;
00761   data_changed = true;
00762 }
00763 
00764 /* =========== message create =========== */
00765 Message *
00766 HumanoidMotionInterface::create_message(const char *type) const
00767 {
00768   if ( strncmp("SetWalkParamsMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
00769     return new SetWalkParamsMessage();
00770   } else if ( strncmp("SetWalkArmsParamsMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
00771     return new SetWalkArmsParamsMessage();
00772   } else if ( strncmp("StopMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
00773     return new StopMessage();
00774   } else if ( strncmp("WalkStraightMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
00775     return new WalkStraightMessage();
00776   } else if ( strncmp("WalkSidewaysMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
00777     return new WalkSidewaysMessage();
00778   } else if ( strncmp("WalkArcMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
00779     return new WalkArcMessage();
00780   } else if ( strncmp("TurnMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
00781     return new TurnMessage();
00782   } else if ( strncmp("KickMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
00783     return new KickMessage();
00784   } else if ( strncmp("ParkMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
00785     return new ParkMessage();
00786   } else if ( strncmp("GetUpMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
00787     return new GetUpMessage();
00788   } else if ( strncmp("StandupMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
00789     return new StandupMessage();
00790   } else if ( strncmp("YawPitchHeadMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
00791     return new YawPitchHeadMessage();
00792   } else if ( strncmp("SetStiffnessParamsMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
00793     return new SetStiffnessParamsMessage();
00794   } else {
00795     throw UnknownTypeException("The given type '%s' does not match any known "
00796                                "message type for this interface type.", type);
00797   }
00798 }
00799 
00800 
00801 /** Copy values from other interface.
00802  * @param other other interface to copy values from
00803  */
00804 void
00805 HumanoidMotionInterface::copy_values(const Interface *other)
00806 {
00807   const HumanoidMotionInterface *oi = dynamic_cast<const HumanoidMotionInterface *>(other);
00808   if (oi == NULL) {
00809     throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)",
00810                                 type(), other->type());
00811   }
00812   memcpy(data, oi->data, sizeof(HumanoidMotionInterface_data_t));
00813 }
00814 
00815 const char *
00816 HumanoidMotionInterface::enum_tostring(const char *enumtype, int val) const
00817 {
00818   if (strcmp(enumtype, "LegEnum") == 0) {
00819     return tostring_LegEnum((LegEnum)val);
00820   }
00821   if (strcmp(enumtype, "StandupEnum") == 0) {
00822     return tostring_StandupEnum((StandupEnum)val);
00823   }
00824   if (strcmp(enumtype, "StiffnessMotionPatternEnum") == 0) {
00825     return tostring_StiffnessMotionPatternEnum((StiffnessMotionPatternEnum)val);
00826   }
00827   throw UnknownTypeException("Unknown enum type %s", enumtype);
00828 }
00829 
00830 /* =========== messages =========== */
00831 /** @class HumanoidMotionInterface::SetWalkParamsMessage <interfaces/HumanoidMotionInterface.h>
00832  * SetWalkParamsMessage Fawkes BlackBoard Interface Message.
00833  * 
00834     
00835  */
00836 
00837 
00838 /** Constructor with initial values.
00839  * @param ini_max_step_length initial value for max_step_length
00840  * @param ini_max_step_height initial value for max_step_height
00841  * @param ini_max_step_side initial value for max_step_side
00842  * @param ini_max_step_turn initial value for max_step_turn
00843  * @param ini_zmp_offset_forward initial value for zmp_offset_forward
00844  * @param ini_zmp_offset_sideward initial value for zmp_offset_sideward
00845  * @param ini_l_hip_roll_compensation initial value for l_hip_roll_compensation
00846  * @param ini_r_hip_roll_compensation initial value for r_hip_roll_compensation
00847  * @param ini_hip_height initial value for hip_height
00848  * @param ini_torso_sideward_orientation initial value for torso_sideward_orientation
00849  */
00850 HumanoidMotionInterface::SetWalkParamsMessage::SetWalkParamsMessage(const float ini_max_step_length, const float ini_max_step_height, const float ini_max_step_side, const float ini_max_step_turn, const float ini_zmp_offset_forward, const float ini_zmp_offset_sideward, const float ini_l_hip_roll_compensation, const float ini_r_hip_roll_compensation, const float ini_hip_height, const float ini_torso_sideward_orientation) : Message("SetWalkParamsMessage")
00851 {
00852   data_size = sizeof(SetWalkParamsMessage_data_t);
00853   data_ptr  = malloc(data_size);
00854   memset(data_ptr, 0, data_size);
00855   data      = (SetWalkParamsMessage_data_t *)data_ptr;
00856   data_ts   = (message_data_ts_t *)data_ptr;
00857   data->max_step_length = ini_max_step_length;
00858   data->max_step_height = ini_max_step_height;
00859   data->max_step_side = ini_max_step_side;
00860   data->max_step_turn = ini_max_step_turn;
00861   data->zmp_offset_forward = ini_zmp_offset_forward;
00862   data->zmp_offset_sideward = ini_zmp_offset_sideward;
00863   data->l_hip_roll_compensation = ini_l_hip_roll_compensation;
00864   data->r_hip_roll_compensation = ini_r_hip_roll_compensation;
00865   data->hip_height = ini_hip_height;
00866   data->torso_sideward_orientation = ini_torso_sideward_orientation;
00867   add_fieldinfo(IFT_FLOAT, "max_step_length", 1, &data->max_step_length);
00868   add_fieldinfo(IFT_FLOAT, "max_step_height", 1, &data->max_step_height);
00869   add_fieldinfo(IFT_FLOAT, "max_step_side", 1, &data->max_step_side);
00870   add_fieldinfo(IFT_FLOAT, "max_step_turn", 1, &data->max_step_turn);
00871   add_fieldinfo(IFT_FLOAT, "zmp_offset_forward", 1, &data->zmp_offset_forward);
00872   add_fieldinfo(IFT_FLOAT, "zmp_offset_sideward", 1, &data->zmp_offset_sideward);
00873   add_fieldinfo(IFT_FLOAT, "l_hip_roll_compensation", 1, &data->l_hip_roll_compensation);
00874   add_fieldinfo(IFT_FLOAT, "r_hip_roll_compensation", 1, &data->r_hip_roll_compensation);
00875   add_fieldinfo(IFT_FLOAT, "hip_height", 1, &data->hip_height);
00876   add_fieldinfo(IFT_FLOAT, "torso_sideward_orientation", 1, &data->torso_sideward_orientation);
00877 }
00878 /** Constructor */
00879 HumanoidMotionInterface::SetWalkParamsMessage::SetWalkParamsMessage() : Message("SetWalkParamsMessage")
00880 {
00881   data_size = sizeof(SetWalkParamsMessage_data_t);
00882   data_ptr  = malloc(data_size);
00883   memset(data_ptr, 0, data_size);
00884   data      = (SetWalkParamsMessage_data_t *)data_ptr;
00885   data_ts   = (message_data_ts_t *)data_ptr;
00886   add_fieldinfo(IFT_FLOAT, "max_step_length", 1, &data->max_step_length);
00887   add_fieldinfo(IFT_FLOAT, "max_step_height", 1, &data->max_step_height);
00888   add_fieldinfo(IFT_FLOAT, "max_step_side", 1, &data->max_step_side);
00889   add_fieldinfo(IFT_FLOAT, "max_step_turn", 1, &data->max_step_turn);
00890   add_fieldinfo(IFT_FLOAT, "zmp_offset_forward", 1, &data->zmp_offset_forward);
00891   add_fieldinfo(IFT_FLOAT, "zmp_offset_sideward", 1, &data->zmp_offset_sideward);
00892   add_fieldinfo(IFT_FLOAT, "l_hip_roll_compensation", 1, &data->l_hip_roll_compensation);
00893   add_fieldinfo(IFT_FLOAT, "r_hip_roll_compensation", 1, &data->r_hip_roll_compensation);
00894   add_fieldinfo(IFT_FLOAT, "hip_height", 1, &data->hip_height);
00895   add_fieldinfo(IFT_FLOAT, "torso_sideward_orientation", 1, &data->torso_sideward_orientation);
00896 }
00897 
00898 /** Destructor */
00899 HumanoidMotionInterface::SetWalkParamsMessage::~SetWalkParamsMessage()
00900 {
00901   free(data_ptr);
00902 }
00903 
00904 /** Copy constructor.
00905  * @param m message to copy from
00906  */
00907 HumanoidMotionInterface::SetWalkParamsMessage::SetWalkParamsMessage(const SetWalkParamsMessage *m) : Message("SetWalkParamsMessage")
00908 {
00909   data_size = m->data_size;
00910   data_ptr  = malloc(data_size);
00911   memcpy(data_ptr, m->data_ptr, data_size);
00912   data      = (SetWalkParamsMessage_data_t *)data_ptr;
00913   data_ts   = (message_data_ts_t *)data_ptr;
00914 }
00915 
00916 /* Methods */
00917 /** Get max_step_length value.
00918  * 
00919       Maximum length of a footstep in m.
00920     
00921  * @return max_step_length value
00922  */
00923 float
00924 HumanoidMotionInterface::SetWalkParamsMessage::max_step_length() const
00925 {
00926   return data->max_step_length;
00927 }
00928 
00929 /** Get maximum length of max_step_length value.
00930  * @return length of max_step_length value, can be length of the array or number of 
00931  * maximum number of characters for a string
00932  */
00933 size_t
00934 HumanoidMotionInterface::SetWalkParamsMessage::maxlenof_max_step_length() const
00935 {
00936   return 1;
00937 }
00938 
00939 /** Set max_step_length value.
00940  * 
00941       Maximum length of a footstep in m.
00942     
00943  * @param new_max_step_length new max_step_length value
00944  */
00945 void
00946 HumanoidMotionInterface::SetWalkParamsMessage::set_max_step_length(const float new_max_step_length)
00947 {
00948   data->max_step_length = new_max_step_length;
00949 }
00950 
00951 /** Get max_step_height value.
00952  * 
00953       Maxium height of a footstep cycloid in m.
00954     
00955  * @return max_step_height value
00956  */
00957 float
00958 HumanoidMotionInterface::SetWalkParamsMessage::max_step_height() const
00959 {
00960   return data->max_step_height;
00961 }
00962 
00963 /** Get maximum length of max_step_height value.
00964  * @return length of max_step_height value, can be length of the array or number of 
00965  * maximum number of characters for a string
00966  */
00967 size_t
00968 HumanoidMotionInterface::SetWalkParamsMessage::maxlenof_max_step_height() const
00969 {
00970   return 1;
00971 }
00972 
00973 /** Set max_step_height value.
00974  * 
00975       Maxium height of a footstep cycloid in m.
00976     
00977  * @param new_max_step_height new max_step_height value
00978  */
00979 void
00980 HumanoidMotionInterface::SetWalkParamsMessage::set_max_step_height(const float new_max_step_height)
00981 {
00982   data->max_step_height = new_max_step_height;
00983 }
00984 
00985 /** Get max_step_side value.
00986  * 
00987       Maximum length of side step in m.
00988     
00989  * @return max_step_side value
00990  */
00991 float
00992 HumanoidMotionInterface::SetWalkParamsMessage::max_step_side() const
00993 {
00994   return data->max_step_side;
00995 }
00996 
00997 /** Get maximum length of max_step_side value.
00998  * @return length of max_step_side value, can be length of the array or number of 
00999  * maximum number of characters for a string
01000  */
01001 size_t
01002 HumanoidMotionInterface::SetWalkParamsMessage::maxlenof_max_step_side() const
01003 {
01004   return 1;
01005 }
01006 
01007 /** Set max_step_side value.
01008  * 
01009       Maximum length of side step in m.
01010     
01011  * @param new_max_step_side new max_step_side value
01012  */
01013 void
01014 HumanoidMotionInterface::SetWalkParamsMessage::set_max_step_side(const float new_max_step_side)
01015 {
01016   data->max_step_side = new_max_step_side;
01017 }
01018 
01019 /** Get max_step_turn value.
01020  * 
01021       Maximum change around vertical axis on radians per footstep.
01022     
01023  * @return max_step_turn value
01024  */
01025 float
01026 HumanoidMotionInterface::SetWalkParamsMessage::max_step_turn() const
01027 {
01028   return data->max_step_turn;
01029 }
01030 
01031 /** Get maximum length of max_step_turn value.
01032  * @return length of max_step_turn value, can be length of the array or number of 
01033  * maximum number of characters for a string
01034  */
01035 size_t
01036 HumanoidMotionInterface::SetWalkParamsMessage::maxlenof_max_step_turn() const
01037 {
01038   return 1;
01039 }
01040 
01041 /** Set max_step_turn value.
01042  * 
01043       Maximum change around vertical axis on radians per footstep.
01044     
01045  * @param new_max_step_turn new max_step_turn value
01046  */
01047 void
01048 HumanoidMotionInterface::SetWalkParamsMessage::set_max_step_turn(const float new_max_step_turn)
01049 {
01050   data->max_step_turn = new_max_step_turn;
01051 }
01052 
01053 /** Get zmp_offset_forward value.
01054  * 
01055       Zero moment point offset in forward direction in m.
01056     
01057  * @return zmp_offset_forward value
01058  */
01059 float
01060 HumanoidMotionInterface::SetWalkParamsMessage::zmp_offset_forward() const
01061 {
01062   return data->zmp_offset_forward;
01063 }
01064 
01065 /** Get maximum length of zmp_offset_forward value.
01066  * @return length of zmp_offset_forward value, can be length of the array or number of 
01067  * maximum number of characters for a string
01068  */
01069 size_t
01070 HumanoidMotionInterface::SetWalkParamsMessage::maxlenof_zmp_offset_forward() const
01071 {
01072   return 1;
01073 }
01074 
01075 /** Set zmp_offset_forward value.
01076  * 
01077       Zero moment point offset in forward direction in m.
01078     
01079  * @param new_zmp_offset_forward new zmp_offset_forward value
01080  */
01081 void
01082 HumanoidMotionInterface::SetWalkParamsMessage::set_zmp_offset_forward(const float new_zmp_offset_forward)
01083 {
01084   data->zmp_offset_forward = new_zmp_offset_forward;
01085 }
01086 
01087 /** Get zmp_offset_sideward value.
01088  * 
01089       Zero moment point offset in sideward direction in m.
01090     
01091  * @return zmp_offset_sideward value
01092  */
01093 float
01094 HumanoidMotionInterface::SetWalkParamsMessage::zmp_offset_sideward() const
01095 {
01096   return data->zmp_offset_sideward;
01097 }
01098 
01099 /** Get maximum length of zmp_offset_sideward value.
01100  * @return length of zmp_offset_sideward value, can be length of the array or number of 
01101  * maximum number of characters for a string
01102  */
01103 size_t
01104 HumanoidMotionInterface::SetWalkParamsMessage::maxlenof_zmp_offset_sideward() const
01105 {
01106   return 1;
01107 }
01108 
01109 /** Set zmp_offset_sideward value.
01110  * 
01111       Zero moment point offset in sideward direction in m.
01112     
01113  * @param new_zmp_offset_sideward new zmp_offset_sideward value
01114  */
01115 void
01116 HumanoidMotionInterface::SetWalkParamsMessage::set_zmp_offset_sideward(const float new_zmp_offset_sideward)
01117 {
01118   data->zmp_offset_sideward = new_zmp_offset_sideward;
01119 }
01120 
01121 /** Get l_hip_roll_compensation value.
01122  * 
01123       Amplitude in degrees of backlash compensation for left hip roll.
01124       This is fitted to the Nao and is possibly not applicable to other robots.
01125     
01126  * @return l_hip_roll_compensation value
01127  */
01128 float
01129 HumanoidMotionInterface::SetWalkParamsMessage::l_hip_roll_compensation() const
01130 {
01131   return data->l_hip_roll_compensation;
01132 }
01133 
01134 /** Get maximum length of l_hip_roll_compensation value.
01135  * @return length of l_hip_roll_compensation value, can be length of the array or number of 
01136  * maximum number of characters for a string
01137  */
01138 size_t
01139 HumanoidMotionInterface::SetWalkParamsMessage::maxlenof_l_hip_roll_compensation() const
01140 {
01141   return 1;
01142 }
01143 
01144 /** Set l_hip_roll_compensation value.
01145  * 
01146       Amplitude in degrees of backlash compensation for left hip roll.
01147       This is fitted to the Nao and is possibly not applicable to other robots.
01148     
01149  * @param new_l_hip_roll_compensation new l_hip_roll_compensation value
01150  */
01151 void
01152 HumanoidMotionInterface::SetWalkParamsMessage::set_l_hip_roll_compensation(const float new_l_hip_roll_compensation)
01153 {
01154   data->l_hip_roll_compensation = new_l_hip_roll_compensation;
01155 }
01156 
01157 /** Get r_hip_roll_compensation value.
01158  * 
01159       Amplitude in degrees of backlash compensation for left hip roll.
01160       This is fitted to the Nao and is possibly not applicable to other robots.
01161     
01162  * @return r_hip_roll_compensation value
01163  */
01164 float
01165 HumanoidMotionInterface::SetWalkParamsMessage::r_hip_roll_compensation() const
01166 {
01167   return data->r_hip_roll_compensation;
01168 }
01169 
01170 /** Get maximum length of r_hip_roll_compensation value.
01171  * @return length of r_hip_roll_compensation value, can be length of the array or number of 
01172  * maximum number of characters for a string
01173  */
01174 size_t
01175 HumanoidMotionInterface::SetWalkParamsMessage::maxlenof_r_hip_roll_compensation() const
01176 {
01177   return 1;
01178 }
01179 
01180 /** Set r_hip_roll_compensation value.
01181  * 
01182       Amplitude in degrees of backlash compensation for left hip roll.
01183       This is fitted to the Nao and is possibly not applicable to other robots.
01184     
01185  * @param new_r_hip_roll_compensation new r_hip_roll_compensation value
01186  */
01187 void
01188 HumanoidMotionInterface::SetWalkParamsMessage::set_r_hip_roll_compensation(const float new_r_hip_roll_compensation)
01189 {
01190   data->r_hip_roll_compensation = new_r_hip_roll_compensation;
01191 }
01192 
01193 /** Get hip_height value.
01194  * 
01195       Height of hip during walk process.
01196       This is fitted to the Nao and is possibly not applicable to other robots.
01197     
01198  * @return hip_height value
01199  */
01200 float
01201 HumanoidMotionInterface::SetWalkParamsMessage::hip_height() const
01202 {
01203   return data->hip_height;
01204 }
01205 
01206 /** Get maximum length of hip_height value.
01207  * @return length of hip_height value, can be length of the array or number of 
01208  * maximum number of characters for a string
01209  */
01210 size_t
01211 HumanoidMotionInterface::SetWalkParamsMessage::maxlenof_hip_height() const
01212 {
01213   return 1;
01214 }
01215 
01216 /** Set hip_height value.
01217  * 
01218       Height of hip during walk process.
01219       This is fitted to the Nao and is possibly not applicable to other robots.
01220     
01221  * @param new_hip_height new hip_height value
01222  */
01223 void
01224 HumanoidMotionInterface::SetWalkParamsMessage::set_hip_height(const float new_hip_height)
01225 {
01226   data->hip_height = new_hip_height;
01227 }
01228 
01229 /** Get torso_sideward_orientation value.
01230  * 
01231       Torso orientation in degrees in sideward direction during walking.
01232       This is fitted to the Nao and is possibly not applicable to other robots.
01233     
01234  * @return torso_sideward_orientation value
01235  */
01236 float
01237 HumanoidMotionInterface::SetWalkParamsMessage::torso_sideward_orientation() const
01238 {
01239   return data->torso_sideward_orientation;
01240 }
01241 
01242 /** Get maximum length of torso_sideward_orientation value.
01243  * @return length of torso_sideward_orientation value, can be length of the array or number of 
01244  * maximum number of characters for a string
01245  */
01246 size_t
01247 HumanoidMotionInterface::SetWalkParamsMessage::maxlenof_torso_sideward_orientation() const
01248 {
01249   return 1;
01250 }
01251 
01252 /** Set torso_sideward_orientation value.
01253  * 
01254       Torso orientation in degrees in sideward direction during walking.
01255       This is fitted to the Nao and is possibly not applicable to other robots.
01256     
01257  * @param new_torso_sideward_orientation new torso_sideward_orientation value
01258  */
01259 void
01260 HumanoidMotionInterface::SetWalkParamsMessage::set_torso_sideward_orientation(const float new_torso_sideward_orientation)
01261 {
01262   data->torso_sideward_orientation = new_torso_sideward_orientation;
01263 }
01264 
01265 /** Clone this message.
01266  * Produces a message of the same type as this message and copies the
01267  * data to the new message.
01268  * @return clone of this message
01269  */
01270 Message *
01271 HumanoidMotionInterface::SetWalkParamsMessage::clone() const
01272 {
01273   return new HumanoidMotionInterface::SetWalkParamsMessage(this);
01274 }
01275 /** @class HumanoidMotionInterface::SetWalkArmsParamsMessage <interfaces/HumanoidMotionInterface.h>
01276  * SetWalkArmsParamsMessage Fawkes BlackBoard Interface Message.
01277  * 
01278     
01279  */
01280 
01281 
01282 /** Constructor with initial values.
01283  * @param ini_arms_enabled initial value for arms_enabled
01284  * @param ini_shoulder_pitch_median initial value for shoulder_pitch_median
01285  * @param ini_shoulder_pitch_amplitude initial value for shoulder_pitch_amplitude
01286  * @param ini_elbow_roll_median initial value for elbow_roll_median
01287  * @param ini_elbow_roll_amplitude initial value for elbow_roll_amplitude
01288  */
01289 HumanoidMotionInterface::SetWalkArmsParamsMessage::SetWalkArmsParamsMessage(const bool ini_arms_enabled, const float ini_shoulder_pitch_median, const float ini_shoulder_pitch_amplitude, const float ini_elbow_roll_median, const float ini_elbow_roll_amplitude) : Message("SetWalkArmsParamsMessage")
01290 {
01291   data_size = sizeof(SetWalkArmsParamsMessage_data_t);
01292   data_ptr  = malloc(data_size);
01293   memset(data_ptr, 0, data_size);
01294   data      = (SetWalkArmsParamsMessage_data_t *)data_ptr;
01295   data_ts   = (message_data_ts_t *)data_ptr;
01296   data->arms_enabled = ini_arms_enabled;
01297   data->shoulder_pitch_median = ini_shoulder_pitch_median;
01298   data->shoulder_pitch_amplitude = ini_shoulder_pitch_amplitude;
01299   data->elbow_roll_median = ini_elbow_roll_median;
01300   data->elbow_roll_amplitude = ini_elbow_roll_amplitude;
01301   add_fieldinfo(IFT_BOOL, "arms_enabled", 1, &data->arms_enabled);
01302   add_fieldinfo(IFT_FLOAT, "shoulder_pitch_median", 1, &data->shoulder_pitch_median);
01303   add_fieldinfo(IFT_FLOAT, "shoulder_pitch_amplitude", 1, &data->shoulder_pitch_amplitude);
01304   add_fieldinfo(IFT_FLOAT, "elbow_roll_median", 1, &data->elbow_roll_median);
01305   add_fieldinfo(IFT_FLOAT, "elbow_roll_amplitude", 1, &data->elbow_roll_amplitude);
01306 }
01307 /** Constructor */
01308 HumanoidMotionInterface::SetWalkArmsParamsMessage::SetWalkArmsParamsMessage() : Message("SetWalkArmsParamsMessage")
01309 {
01310   data_size = sizeof(SetWalkArmsParamsMessage_data_t);
01311   data_ptr  = malloc(data_size);
01312   memset(data_ptr, 0, data_size);
01313   data      = (SetWalkArmsParamsMessage_data_t *)data_ptr;
01314   data_ts   = (message_data_ts_t *)data_ptr;
01315   add_fieldinfo(IFT_BOOL, "arms_enabled", 1, &data->arms_enabled);
01316   add_fieldinfo(IFT_FLOAT, "shoulder_pitch_median", 1, &data->shoulder_pitch_median);
01317   add_fieldinfo(IFT_FLOAT, "shoulder_pitch_amplitude", 1, &data->shoulder_pitch_amplitude);
01318   add_fieldinfo(IFT_FLOAT, "elbow_roll_median", 1, &data->elbow_roll_median);
01319   add_fieldinfo(IFT_FLOAT, "elbow_roll_amplitude", 1, &data->elbow_roll_amplitude);
01320 }
01321 
01322 /** Destructor */
01323 HumanoidMotionInterface::SetWalkArmsParamsMessage::~SetWalkArmsParamsMessage()
01324 {
01325   free(data_ptr);
01326 }
01327 
01328 /** Copy constructor.
01329  * @param m message to copy from
01330  */
01331 HumanoidMotionInterface::SetWalkArmsParamsMessage::SetWalkArmsParamsMessage(const SetWalkArmsParamsMessage *m) : Message("SetWalkArmsParamsMessage")
01332 {
01333   data_size = m->data_size;
01334   data_ptr  = malloc(data_size);
01335   memcpy(data_ptr, m->data_ptr, data_size);
01336   data      = (SetWalkArmsParamsMessage_data_t *)data_ptr;
01337   data_ts   = (message_data_ts_t *)data_ptr;
01338 }
01339 
01340 /* Methods */
01341 /** Get arms_enabled value.
01342  * 
01343       If true the arms are controlled during walking for balancing.
01344     
01345  * @return arms_enabled value
01346  */
01347 bool
01348 HumanoidMotionInterface::SetWalkArmsParamsMessage::is_arms_enabled() const
01349 {
01350   return data->arms_enabled;
01351 }
01352 
01353 /** Get maximum length of arms_enabled value.
01354  * @return length of arms_enabled value, can be length of the array or number of 
01355  * maximum number of characters for a string
01356  */
01357 size_t
01358 HumanoidMotionInterface::SetWalkArmsParamsMessage::maxlenof_arms_enabled() const
01359 {
01360   return 1;
01361 }
01362 
01363 /** Set arms_enabled value.
01364  * 
01365       If true the arms are controlled during walking for balancing.
01366     
01367  * @param new_arms_enabled new arms_enabled value
01368  */
01369 void
01370 HumanoidMotionInterface::SetWalkArmsParamsMessage::set_arms_enabled(const bool new_arms_enabled)
01371 {
01372   data->arms_enabled = new_arms_enabled;
01373 }
01374 
01375 /** Get shoulder_pitch_median value.
01376  * 
01377       Median in radians of the shoulder pitch during walking.
01378     
01379  * @return shoulder_pitch_median value
01380  */
01381 float
01382 HumanoidMotionInterface::SetWalkArmsParamsMessage::shoulder_pitch_median() const
01383 {
01384   return data->shoulder_pitch_median;
01385 }
01386 
01387 /** Get maximum length of shoulder_pitch_median value.
01388  * @return length of shoulder_pitch_median value, can be length of the array or number of 
01389  * maximum number of characters for a string
01390  */
01391 size_t
01392 HumanoidMotionInterface::SetWalkArmsParamsMessage::maxlenof_shoulder_pitch_median() const
01393 {
01394   return 1;
01395 }
01396 
01397 /** Set shoulder_pitch_median value.
01398  * 
01399       Median in radians of the shoulder pitch during walking.
01400     
01401  * @param new_shoulder_pitch_median new shoulder_pitch_median value
01402  */
01403 void
01404 HumanoidMotionInterface::SetWalkArmsParamsMessage::set_shoulder_pitch_median(const float new_shoulder_pitch_median)
01405 {
01406   data->shoulder_pitch_median = new_shoulder_pitch_median;
01407 }
01408 
01409 /** Get shoulder_pitch_amplitude value.
01410  * 
01411       Amplitude of the shoulder pitch movement during walking.
01412     
01413  * @return shoulder_pitch_amplitude value
01414  */
01415 float
01416 HumanoidMotionInterface::SetWalkArmsParamsMessage::shoulder_pitch_amplitude() const
01417 {
01418   return data->shoulder_pitch_amplitude;
01419 }
01420 
01421 /** Get maximum length of shoulder_pitch_amplitude value.
01422  * @return length of shoulder_pitch_amplitude value, can be length of the array or number of 
01423  * maximum number of characters for a string
01424  */
01425 size_t
01426 HumanoidMotionInterface::SetWalkArmsParamsMessage::maxlenof_shoulder_pitch_amplitude() const
01427 {
01428   return 1;
01429 }
01430 
01431 /** Set shoulder_pitch_amplitude value.
01432  * 
01433       Amplitude of the shoulder pitch movement during walking.
01434     
01435  * @param new_shoulder_pitch_amplitude new shoulder_pitch_amplitude value
01436  */
01437 void
01438 HumanoidMotionInterface::SetWalkArmsParamsMessage::set_shoulder_pitch_amplitude(const float new_shoulder_pitch_amplitude)
01439 {
01440   data->shoulder_pitch_amplitude = new_shoulder_pitch_amplitude;
01441 }
01442 
01443 /** Get elbow_roll_median value.
01444  * 
01445       Median in radians of the elbow roll during walking.
01446     
01447  * @return elbow_roll_median value
01448  */
01449 float
01450 HumanoidMotionInterface::SetWalkArmsParamsMessage::elbow_roll_median() const
01451 {
01452   return data->elbow_roll_median;
01453 }
01454 
01455 /** Get maximum length of elbow_roll_median value.
01456  * @return length of elbow_roll_median value, can be length of the array or number of 
01457  * maximum number of characters for a string
01458  */
01459 size_t
01460 HumanoidMotionInterface::SetWalkArmsParamsMessage::maxlenof_elbow_roll_median() const
01461 {
01462   return 1;
01463 }
01464 
01465 /** Set elbow_roll_median value.
01466  * 
01467       Median in radians of the elbow roll during walking.
01468     
01469  * @param new_elbow_roll_median new elbow_roll_median value
01470  */
01471 void
01472 HumanoidMotionInterface::SetWalkArmsParamsMessage::set_elbow_roll_median(const float new_elbow_roll_median)
01473 {
01474   data->elbow_roll_median = new_elbow_roll_median;
01475 }
01476 
01477 /** Get elbow_roll_amplitude value.
01478  * 
01479       Amplitude of the elbow roll movement during walking.
01480     
01481  * @return elbow_roll_amplitude value
01482  */
01483 float
01484 HumanoidMotionInterface::SetWalkArmsParamsMessage::elbow_roll_amplitude() const
01485 {
01486   return data->elbow_roll_amplitude;
01487 }
01488 
01489 /** Get maximum length of elbow_roll_amplitude value.
01490  * @return length of elbow_roll_amplitude value, can be length of the array or number of 
01491  * maximum number of characters for a string
01492  */
01493 size_t
01494 HumanoidMotionInterface::SetWalkArmsParamsMessage::maxlenof_elbow_roll_amplitude() const
01495 {
01496   return 1;
01497 }
01498 
01499 /** Set elbow_roll_amplitude value.
01500  * 
01501       Amplitude of the elbow roll movement during walking.
01502     
01503  * @param new_elbow_roll_amplitude new elbow_roll_amplitude value
01504  */
01505 void
01506 HumanoidMotionInterface::SetWalkArmsParamsMessage::set_elbow_roll_amplitude(const float new_elbow_roll_amplitude)
01507 {
01508   data->elbow_roll_amplitude = new_elbow_roll_amplitude;
01509 }
01510 
01511 /** Clone this message.
01512  * Produces a message of the same type as this message and copies the
01513  * data to the new message.
01514  * @return clone of this message
01515  */
01516 Message *
01517 HumanoidMotionInterface::SetWalkArmsParamsMessage::clone() const
01518 {
01519   return new HumanoidMotionInterface::SetWalkArmsParamsMessage(this);
01520 }
01521 /** @class HumanoidMotionInterface::StopMessage <interfaces/HumanoidMotionInterface.h>
01522  * StopMessage Fawkes BlackBoard Interface Message.
01523  * 
01524     
01525  */
01526 
01527 
01528 /** Constructor */
01529 HumanoidMotionInterface::StopMessage::StopMessage() : Message("StopMessage")
01530 {
01531   data_size = sizeof(StopMessage_data_t);
01532   data_ptr  = malloc(data_size);
01533   memset(data_ptr, 0, data_size);
01534   data      = (StopMessage_data_t *)data_ptr;
01535   data_ts   = (message_data_ts_t *)data_ptr;
01536 }
01537 
01538 /** Destructor */
01539 HumanoidMotionInterface::StopMessage::~StopMessage()
01540 {
01541   free(data_ptr);
01542 }
01543 
01544 /** Copy constructor.
01545  * @param m message to copy from
01546  */
01547 HumanoidMotionInterface::StopMessage::StopMessage(const StopMessage *m) : Message("StopMessage")
01548 {
01549   data_size = m->data_size;
01550   data_ptr  = malloc(data_size);
01551   memcpy(data_ptr, m->data_ptr, data_size);
01552   data      = (StopMessage_data_t *)data_ptr;
01553   data_ts   = (message_data_ts_t *)data_ptr;
01554 }
01555 
01556 /* Methods */
01557 /** Clone this message.
01558  * Produces a message of the same type as this message and copies the
01559  * data to the new message.
01560  * @return clone of this message
01561  */
01562 Message *
01563 HumanoidMotionInterface::StopMessage::clone() const
01564 {
01565   return new HumanoidMotionInterface::StopMessage(this);
01566 }
01567 /** @class HumanoidMotionInterface::WalkStraightMessage <interfaces/HumanoidMotionInterface.h>
01568  * WalkStraightMessage Fawkes BlackBoard Interface Message.
01569  * 
01570     
01571  */
01572 
01573 
01574 /** Constructor with initial values.
01575  * @param ini_distance initial value for distance
01576  * @param ini_num_samples initial value for num_samples
01577  */
01578 HumanoidMotionInterface::WalkStraightMessage::WalkStraightMessage(const float ini_distance, const uint32_t ini_num_samples) : Message("WalkStraightMessage")
01579 {
01580   data_size = sizeof(WalkStraightMessage_data_t);
01581   data_ptr  = malloc(data_size);
01582   memset(data_ptr, 0, data_size);
01583   data      = (WalkStraightMessage_data_t *)data_ptr;
01584   data_ts   = (message_data_ts_t *)data_ptr;
01585   data->distance = ini_distance;
01586   data->num_samples = ini_num_samples;
01587   add_fieldinfo(IFT_FLOAT, "distance", 1, &data->distance);
01588   add_fieldinfo(IFT_UINT32, "num_samples", 1, &data->num_samples);
01589 }
01590 /** Constructor */
01591 HumanoidMotionInterface::WalkStraightMessage::WalkStraightMessage() : Message("WalkStraightMessage")
01592 {
01593   data_size = sizeof(WalkStraightMessage_data_t);
01594   data_ptr  = malloc(data_size);
01595   memset(data_ptr, 0, data_size);
01596   data      = (WalkStraightMessage_data_t *)data_ptr;
01597   data_ts   = (message_data_ts_t *)data_ptr;
01598   add_fieldinfo(IFT_FLOAT, "distance", 1, &data->distance);
01599   add_fieldinfo(IFT_UINT32, "num_samples", 1, &data->num_samples);
01600 }
01601 
01602 /** Destructor */
01603 HumanoidMotionInterface::WalkStraightMessage::~WalkStraightMessage()
01604 {
01605   free(data_ptr);
01606 }
01607 
01608 /** Copy constructor.
01609  * @param m message to copy from
01610  */
01611 HumanoidMotionInterface::WalkStraightMessage::WalkStraightMessage(const WalkStraightMessage *m) : Message("WalkStraightMessage")
01612 {
01613   data_size = m->data_size;
01614   data_ptr  = malloc(data_size);
01615   memcpy(data_ptr, m->data_ptr, data_size);
01616   data      = (WalkStraightMessage_data_t *)data_ptr;
01617   data_ts   = (message_data_ts_t *)data_ptr;
01618 }
01619 
01620 /* Methods */
01621 /** Get distance value.
01622  * Distance in m to walk.
01623  * @return distance value
01624  */
01625 float
01626 HumanoidMotionInterface::WalkStraightMessage::distance() const
01627 {
01628   return data->distance;
01629 }
01630 
01631 /** Get maximum length of distance value.
01632  * @return length of distance value, can be length of the array or number of 
01633  * maximum number of characters for a string
01634  */
01635 size_t
01636 HumanoidMotionInterface::WalkStraightMessage::maxlenof_distance() const
01637 {
01638   return 1;
01639 }
01640 
01641 /** Set distance value.
01642  * Distance in m to walk.
01643  * @param new_distance new distance value
01644  */
01645 void
01646 HumanoidMotionInterface::WalkStraightMessage::set_distance(const float new_distance)
01647 {
01648   data->distance = new_distance;
01649 }
01650 
01651 /** Get num_samples value.
01652  * 
01653       Number of intermediate samples to use for walking.
01654     
01655  * @return num_samples value
01656  */
01657 uint32_t
01658 HumanoidMotionInterface::WalkStraightMessage::num_samples() const
01659 {
01660   return data->num_samples;
01661 }
01662 
01663 /** Get maximum length of num_samples value.
01664  * @return length of num_samples value, can be length of the array or number of 
01665  * maximum number of characters for a string
01666  */
01667 size_t
01668 HumanoidMotionInterface::WalkStraightMessage::maxlenof_num_samples() const
01669 {
01670   return 1;
01671 }
01672 
01673 /** Set num_samples value.
01674  * 
01675       Number of intermediate samples to use for walking.
01676     
01677  * @param new_num_samples new num_samples value
01678  */
01679 void
01680 HumanoidMotionInterface::WalkStraightMessage::set_num_samples(const uint32_t new_num_samples)
01681 {
01682   data->num_samples = new_num_samples;
01683 }
01684 
01685 /** Clone this message.
01686  * Produces a message of the same type as this message and copies the
01687  * data to the new message.
01688  * @return clone of this message
01689  */
01690 Message *
01691 HumanoidMotionInterface::WalkStraightMessage::clone() const
01692 {
01693   return new HumanoidMotionInterface::WalkStraightMessage(this);
01694 }
01695 /** @class HumanoidMotionInterface::WalkSidewaysMessage <interfaces/HumanoidMotionInterface.h>
01696  * WalkSidewaysMessage Fawkes BlackBoard Interface Message.
01697  * 
01698     
01699  */
01700 
01701 
01702 /** Constructor with initial values.
01703  * @param ini_distance initial value for distance
01704  * @param ini_num_samples initial value for num_samples
01705  */
01706 HumanoidMotionInterface::WalkSidewaysMessage::WalkSidewaysMessage(const float ini_distance, const uint32_t ini_num_samples) : Message("WalkSidewaysMessage")
01707 {
01708   data_size = sizeof(WalkSidewaysMessage_data_t);
01709   data_ptr  = malloc(data_size);
01710   memset(data_ptr, 0, data_size);
01711   data      = (WalkSidewaysMessage_data_t *)data_ptr;
01712   data_ts   = (message_data_ts_t *)data_ptr;
01713   data->distance = ini_distance;
01714   data->num_samples = ini_num_samples;
01715   add_fieldinfo(IFT_FLOAT, "distance", 1, &data->distance);
01716   add_fieldinfo(IFT_UINT32, "num_samples", 1, &data->num_samples);
01717 }
01718 /** Constructor */
01719 HumanoidMotionInterface::WalkSidewaysMessage::WalkSidewaysMessage() : Message("WalkSidewaysMessage")
01720 {
01721   data_size = sizeof(WalkSidewaysMessage_data_t);
01722   data_ptr  = malloc(data_size);
01723   memset(data_ptr, 0, data_size);
01724   data      = (WalkSidewaysMessage_data_t *)data_ptr;
01725   data_ts   = (message_data_ts_t *)data_ptr;
01726   add_fieldinfo(IFT_FLOAT, "distance", 1, &data->distance);
01727   add_fieldinfo(IFT_UINT32, "num_samples", 1, &data->num_samples);
01728 }
01729 
01730 /** Destructor */
01731 HumanoidMotionInterface::WalkSidewaysMessage::~WalkSidewaysMessage()
01732 {
01733   free(data_ptr);
01734 }
01735 
01736 /** Copy constructor.
01737  * @param m message to copy from
01738  */
01739 HumanoidMotionInterface::WalkSidewaysMessage::WalkSidewaysMessage(const WalkSidewaysMessage *m) : Message("WalkSidewaysMessage")
01740 {
01741   data_size = m->data_size;
01742   data_ptr  = malloc(data_size);
01743   memcpy(data_ptr, m->data_ptr, data_size);
01744   data      = (WalkSidewaysMessage_data_t *)data_ptr;
01745   data_ts   = (message_data_ts_t *)data_ptr;
01746 }
01747 
01748 /* Methods */
01749 /** Get distance value.
01750  * Distance in m to walk.
01751  * @return distance value
01752  */
01753 float
01754 HumanoidMotionInterface::WalkSidewaysMessage::distance() const
01755 {
01756   return data->distance;
01757 }
01758 
01759 /** Get maximum length of distance value.
01760  * @return length of distance value, can be length of the array or number of 
01761  * maximum number of characters for a string
01762  */
01763 size_t
01764 HumanoidMotionInterface::WalkSidewaysMessage::maxlenof_distance() const
01765 {
01766   return 1;
01767 }
01768 
01769 /** Set distance value.
01770  * Distance in m to walk.
01771  * @param new_distance new distance value
01772  */
01773 void
01774 HumanoidMotionInterface::WalkSidewaysMessage::set_distance(const float new_distance)
01775 {
01776   data->distance = new_distance;
01777 }
01778 
01779 /** Get num_samples value.
01780  * 
01781       Number of intermediate samples to use for strafing.
01782     
01783  * @return num_samples value
01784  */
01785 uint32_t
01786 HumanoidMotionInterface::WalkSidewaysMessage::num_samples() const
01787 {
01788   return data->num_samples;
01789 }
01790 
01791 /** Get maximum length of num_samples value.
01792  * @return length of num_samples value, can be length of the array or number of 
01793  * maximum number of characters for a string
01794  */
01795 size_t
01796 HumanoidMotionInterface::WalkSidewaysMessage::maxlenof_num_samples() const
01797 {
01798   return 1;
01799 }
01800 
01801 /** Set num_samples value.
01802  * 
01803       Number of intermediate samples to use for strafing.
01804     
01805  * @param new_num_samples new num_samples value
01806  */
01807 void
01808 HumanoidMotionInterface::WalkSidewaysMessage::set_num_samples(const uint32_t new_num_samples)
01809 {
01810   data->num_samples = new_num_samples;
01811 }
01812 
01813 /** Clone this message.
01814  * Produces a message of the same type as this message and copies the
01815  * data to the new message.
01816  * @return clone of this message
01817  */
01818 Message *
01819 HumanoidMotionInterface::WalkSidewaysMessage::clone() const
01820 {
01821   return new HumanoidMotionInterface::WalkSidewaysMessage(this);
01822 }
01823 /** @class HumanoidMotionInterface::WalkArcMessage <interfaces/HumanoidMotionInterface.h>
01824  * WalkArcMessage Fawkes BlackBoard Interface Message.
01825  * 
01826     
01827  */
01828 
01829 
01830 /** Constructor with initial values.
01831  * @param ini_angle initial value for angle
01832  * @param ini_radius initial value for radius
01833  * @param ini_num_samples initial value for num_samples
01834  */
01835 HumanoidMotionInterface::WalkArcMessage::WalkArcMessage(const float ini_angle, const float ini_radius, const uint32_t ini_num_samples) : Message("WalkArcMessage")
01836 {
01837   data_size = sizeof(WalkArcMessage_data_t);
01838   data_ptr  = malloc(data_size);
01839   memset(data_ptr, 0, data_size);
01840   data      = (WalkArcMessage_data_t *)data_ptr;
01841   data_ts   = (message_data_ts_t *)data_ptr;
01842   data->angle = ini_angle;
01843   data->radius = ini_radius;
01844   data->num_samples = ini_num_samples;
01845   add_fieldinfo(IFT_FLOAT, "angle", 1, &data->angle);
01846   add_fieldinfo(IFT_FLOAT, "radius", 1, &data->radius);
01847   add_fieldinfo(IFT_UINT32, "num_samples", 1, &data->num_samples);
01848 }
01849 /** Constructor */
01850 HumanoidMotionInterface::WalkArcMessage::WalkArcMessage() : Message("WalkArcMessage")
01851 {
01852   data_size = sizeof(WalkArcMessage_data_t);
01853   data_ptr  = malloc(data_size);
01854   memset(data_ptr, 0, data_size);
01855   data      = (WalkArcMessage_data_t *)data_ptr;
01856   data_ts   = (message_data_ts_t *)data_ptr;
01857   add_fieldinfo(IFT_FLOAT, "angle", 1, &data->angle);
01858   add_fieldinfo(IFT_FLOAT, "radius", 1, &data->radius);
01859   add_fieldinfo(IFT_UINT32, "num_samples", 1, &data->num_samples);
01860 }
01861 
01862 /** Destructor */
01863 HumanoidMotionInterface::WalkArcMessage::~WalkArcMessage()
01864 {
01865   free(data_ptr);
01866 }
01867 
01868 /** Copy constructor.
01869  * @param m message to copy from
01870  */
01871 HumanoidMotionInterface::WalkArcMessage::WalkArcMessage(const WalkArcMessage *m) : Message("WalkArcMessage")
01872 {
01873   data_size = m->data_size;
01874   data_ptr  = malloc(data_size);
01875   memcpy(data_ptr, m->data_ptr, data_size);
01876   data      = (WalkArcMessage_data_t *)data_ptr;
01877   data_ts   = (message_data_ts_t *)data_ptr;
01878 }
01879 
01880 /* Methods */
01881 /** Get angle value.
01882  * Angle in radians to turn over the way.
01883  * @return angle value
01884  */
01885 float
01886 HumanoidMotionInterface::WalkArcMessage::angle() const
01887 {
01888   return data->angle;
01889 }
01890 
01891 /** Get maximum length of angle value.
01892  * @return length of angle value, can be length of the array or number of 
01893  * maximum number of characters for a string
01894  */
01895 size_t
01896 HumanoidMotionInterface::WalkArcMessage::maxlenof_angle() const
01897 {
01898   return 1;
01899 }
01900 
01901 /** Set angle value.
01902  * Angle in radians to turn over the way.
01903  * @param new_angle new angle value
01904  */
01905 void
01906 HumanoidMotionInterface::WalkArcMessage::set_angle(const float new_angle)
01907 {
01908   data->angle = new_angle;
01909 }
01910 
01911 /** Get radius value.
01912  * Radius in m of the circle in m.
01913  * @return radius value
01914  */
01915 float
01916 HumanoidMotionInterface::WalkArcMessage::radius() const
01917 {
01918   return data->radius;
01919 }
01920 
01921 /** Get maximum length of radius value.
01922  * @return length of radius value, can be length of the array or number of 
01923  * maximum number of characters for a string
01924  */
01925 size_t
01926 HumanoidMotionInterface::WalkArcMessage::maxlenof_radius() const
01927 {
01928   return 1;
01929 }
01930 
01931 /** Set radius value.
01932  * Radius in m of the circle in m.
01933  * @param new_radius new radius value
01934  */
01935 void
01936 HumanoidMotionInterface::WalkArcMessage::set_radius(const float new_radius)
01937 {
01938   data->radius = new_radius;
01939 }
01940 
01941 /** Get num_samples value.
01942  * 
01943       Number of intermediate samples to use for walking.
01944     
01945  * @return num_samples value
01946  */
01947 uint32_t
01948 HumanoidMotionInterface::WalkArcMessage::num_samples() const
01949 {
01950   return data->num_samples;
01951 }
01952 
01953 /** Get maximum length of num_samples value.
01954  * @return length of num_samples value, can be length of the array or number of 
01955  * maximum number of characters for a string
01956  */
01957 size_t
01958 HumanoidMotionInterface::WalkArcMessage::maxlenof_num_samples() const
01959 {
01960   return 1;
01961 }
01962 
01963 /** Set num_samples value.
01964  * 
01965       Number of intermediate samples to use for walking.
01966     
01967  * @param new_num_samples new num_samples value
01968  */
01969 void
01970 HumanoidMotionInterface::WalkArcMessage::set_num_samples(const uint32_t new_num_samples)
01971 {
01972   data->num_samples = new_num_samples;
01973 }
01974 
01975 /** Clone this message.
01976  * Produces a message of the same type as this message and copies the
01977  * data to the new message.
01978  * @return clone of this message
01979  */
01980 Message *
01981 HumanoidMotionInterface::WalkArcMessage::clone() const
01982 {
01983   return new HumanoidMotionInterface::WalkArcMessage(this);
01984 }
01985 /** @class HumanoidMotionInterface::TurnMessage <interfaces/HumanoidMotionInterface.h>
01986  * TurnMessage Fawkes BlackBoard Interface Message.
01987  * 
01988     
01989  */
01990 
01991 
01992 /** Constructor with initial values.
01993  * @param ini_angle initial value for angle
01994  * @param ini_num_samples initial value for num_samples
01995  */
01996 HumanoidMotionInterface::TurnMessage::TurnMessage(const float ini_angle, const uint32_t ini_num_samples) : Message("TurnMessage")
01997 {
01998   data_size = sizeof(TurnMessage_data_t);
01999   data_ptr  = malloc(data_size);
02000   memset(data_ptr, 0, data_size);
02001   data      = (TurnMessage_data_t *)data_ptr;
02002   data_ts   = (message_data_ts_t *)data_ptr;
02003   data->angle = ini_angle;
02004   data->num_samples = ini_num_samples;
02005   add_fieldinfo(IFT_FLOAT, "angle", 1, &data->angle);
02006   add_fieldinfo(IFT_UINT32, "num_samples", 1, &data->num_samples);
02007 }
02008 /** Constructor */
02009 HumanoidMotionInterface::TurnMessage::TurnMessage() : Message("TurnMessage")
02010 {
02011   data_size = sizeof(TurnMessage_data_t);
02012   data_ptr  = malloc(data_size);
02013   memset(data_ptr, 0, data_size);
02014   data      = (TurnMessage_data_t *)data_ptr;
02015   data_ts   = (message_data_ts_t *)data_ptr;
02016   add_fieldinfo(IFT_FLOAT, "angle", 1, &data->angle);
02017   add_fieldinfo(IFT_UINT32, "num_samples", 1, &data->num_samples);
02018 }
02019 
02020 /** Destructor */
02021 HumanoidMotionInterface::TurnMessage::~TurnMessage()
02022 {
02023   free(data_ptr);
02024 }
02025 
02026 /** Copy constructor.
02027  * @param m message to copy from
02028  */
02029 HumanoidMotionInterface::TurnMessage::TurnMessage(const TurnMessage *m) : Message("TurnMessage")
02030 {
02031   data_size = m->data_size;
02032   data_ptr  = malloc(data_size);
02033   memcpy(data_ptr, m->data_ptr, data_size);
02034   data      = (TurnMessage_data_t *)data_ptr;
02035   data_ts   = (message_data_ts_t *)data_ptr;
02036 }
02037 
02038 /* Methods */
02039 /** Get angle value.
02040  * Angle in radians to turn.
02041  * @return angle value
02042  */
02043 float
02044 HumanoidMotionInterface::TurnMessage::angle() const
02045 {
02046   return data->angle;
02047 }
02048 
02049 /** Get maximum length of angle value.
02050  * @return length of angle value, can be length of the array or number of 
02051  * maximum number of characters for a string
02052  */
02053 size_t
02054 HumanoidMotionInterface::TurnMessage::maxlenof_angle() const
02055 {
02056   return 1;
02057 }
02058 
02059 /** Set angle value.
02060  * Angle in radians to turn.
02061  * @param new_angle new angle value
02062  */
02063 void
02064 HumanoidMotionInterface::TurnMessage::set_angle(const float new_angle)
02065 {
02066   data->angle = new_angle;
02067 }
02068 
02069 /** Get num_samples value.
02070  * 
02071       Number of intermediate samples to use for turning.
02072     
02073  * @return num_samples value
02074  */
02075 uint32_t
02076 HumanoidMotionInterface::TurnMessage::num_samples() const
02077 {
02078   return data->num_samples;
02079 }
02080 
02081 /** Get maximum length of num_samples value.
02082  * @return length of num_samples value, can be length of the array or number of 
02083  * maximum number of characters for a string
02084  */
02085 size_t
02086 HumanoidMotionInterface::TurnMessage::maxlenof_num_samples() const
02087 {
02088   return 1;
02089 }
02090 
02091 /** Set num_samples value.
02092  * 
02093       Number of intermediate samples to use for turning.
02094     
02095  * @param new_num_samples new num_samples value
02096  */
02097 void
02098 HumanoidMotionInterface::TurnMessage::set_num_samples(const uint32_t new_num_samples)
02099 {
02100   data->num_samples = new_num_samples;
02101 }
02102 
02103 /** Clone this message.
02104  * Produces a message of the same type as this message and copies the
02105  * data to the new message.
02106  * @return clone of this message
02107  */
02108 Message *
02109 HumanoidMotionInterface::TurnMessage::clone() const
02110 {
02111   return new HumanoidMotionInterface::TurnMessage(this);
02112 }
02113 /** @class HumanoidMotionInterface::KickMessage <interfaces/HumanoidMotionInterface.h>
02114  * KickMessage Fawkes BlackBoard Interface Message.
02115  * 
02116     
02117  */
02118 
02119 
02120 /** Constructor with initial values.
02121  * @param ini_leg initial value for leg
02122  * @param ini_strength initial value for strength
02123  */
02124 HumanoidMotionInterface::KickMessage::KickMessage(const LegEnum ini_leg, const float ini_strength) : Message("KickMessage")
02125 {
02126   data_size = sizeof(KickMessage_data_t);
02127   data_ptr  = malloc(data_size);
02128   memset(data_ptr, 0, data_size);
02129   data      = (KickMessage_data_t *)data_ptr;
02130   data_ts   = (message_data_ts_t *)data_ptr;
02131   data->leg = ini_leg;
02132   data->strength = ini_strength;
02133   add_fieldinfo(IFT_ENUM, "leg", 1, &data->leg, "LegEnum");
02134   add_fieldinfo(IFT_FLOAT, "strength", 1, &data->strength);
02135 }
02136 /** Constructor */
02137 HumanoidMotionInterface::KickMessage::KickMessage() : Message("KickMessage")
02138 {
02139   data_size = sizeof(KickMessage_data_t);
02140   data_ptr  = malloc(data_size);
02141   memset(data_ptr, 0, data_size);
02142   data      = (KickMessage_data_t *)data_ptr;
02143   data_ts   = (message_data_ts_t *)data_ptr;
02144   add_fieldinfo(IFT_ENUM, "leg", 1, &data->leg, "LegEnum");
02145   add_fieldinfo(IFT_FLOAT, "strength", 1, &data->strength);
02146 }
02147 
02148 /** Destructor */
02149 HumanoidMotionInterface::KickMessage::~KickMessage()
02150 {
02151   free(data_ptr);
02152 }
02153 
02154 /** Copy constructor.
02155  * @param m message to copy from
02156  */
02157 HumanoidMotionInterface::KickMessage::KickMessage(const KickMessage *m) : Message("KickMessage")
02158 {
02159   data_size = m->data_size;
02160   data_ptr  = malloc(data_size);
02161   memcpy(data_ptr, m->data_ptr, data_size);
02162   data      = (KickMessage_data_t *)data_ptr;
02163   data_ts   = (message_data_ts_t *)data_ptr;
02164 }
02165 
02166 /* Methods */
02167 /** Get leg value.
02168  * Leg to kick with
02169  * @return leg value
02170  */
02171 HumanoidMotionInterface::LegEnum
02172 HumanoidMotionInterface::KickMessage::leg() const
02173 {
02174   return data->leg;
02175 }
02176 
02177 /** Get maximum length of leg value.
02178  * @return length of leg value, can be length of the array or number of 
02179  * maximum number of characters for a string
02180  */
02181 size_t
02182 HumanoidMotionInterface::KickMessage::maxlenof_leg() const
02183 {
02184   return 1;
02185 }
02186 
02187 /** Set leg value.
02188  * Leg to kick with
02189  * @param new_leg new leg value
02190  */
02191 void
02192 HumanoidMotionInterface::KickMessage::set_leg(const LegEnum new_leg)
02193 {
02194   data->leg = new_leg;
02195 }
02196 
02197 /** Get strength value.
02198  * Kick strength
02199  * @return strength value
02200  */
02201 float
02202 HumanoidMotionInterface::KickMessage::strength() const
02203 {
02204   return data->strength;
02205 }
02206 
02207 /** Get maximum length of strength value.
02208  * @return length of strength value, can be length of the array or number of 
02209  * maximum number of characters for a string
02210  */
02211 size_t
02212 HumanoidMotionInterface::KickMessage::maxlenof_strength() const
02213 {
02214   return 1;
02215 }
02216 
02217 /** Set strength value.
02218  * Kick strength
02219  * @param new_strength new strength value
02220  */
02221 void
02222 HumanoidMotionInterface::KickMessage::set_strength(const float new_strength)
02223 {
02224   data->strength = new_strength;
02225 }
02226 
02227 /** Clone this message.
02228  * Produces a message of the same type as this message and copies the
02229  * data to the new message.
02230  * @return clone of this message
02231  */
02232 Message *
02233 HumanoidMotionInterface::KickMessage::clone() const
02234 {
02235   return new HumanoidMotionInterface::KickMessage(this);
02236 }
02237 /** @class HumanoidMotionInterface::ParkMessage <interfaces/HumanoidMotionInterface.h>
02238  * ParkMessage Fawkes BlackBoard Interface Message.
02239  * 
02240     
02241  */
02242 
02243 
02244 /** Constructor with initial values.
02245  * @param ini_time_sec initial value for time_sec
02246  */
02247 HumanoidMotionInterface::ParkMessage::ParkMessage(const float ini_time_sec) : Message("ParkMessage")
02248 {
02249   data_size = sizeof(ParkMessage_data_t);
02250   data_ptr  = malloc(data_size);
02251   memset(data_ptr, 0, data_size);
02252   data      = (ParkMessage_data_t *)data_ptr;
02253   data_ts   = (message_data_ts_t *)data_ptr;
02254   data->time_sec = ini_time_sec;
02255   add_fieldinfo(IFT_FLOAT, "time_sec", 1, &data->time_sec);
02256 }
02257 /** Constructor */
02258 HumanoidMotionInterface::ParkMessage::ParkMessage() : Message("ParkMessage")
02259 {
02260   data_size = sizeof(ParkMessage_data_t);
02261   data_ptr  = malloc(data_size);
02262   memset(data_ptr, 0, data_size);
02263   data      = (ParkMessage_data_t *)data_ptr;
02264   data_ts   = (message_data_ts_t *)data_ptr;
02265   add_fieldinfo(IFT_FLOAT, "time_sec", 1, &data->time_sec);
02266 }
02267 
02268 /** Destructor */
02269 HumanoidMotionInterface::ParkMessage::~ParkMessage()
02270 {
02271   free(data_ptr);
02272 }
02273 
02274 /** Copy constructor.
02275  * @param m message to copy from
02276  */
02277 HumanoidMotionInterface::ParkMessage::ParkMessage(const ParkMessage *m) : Message("ParkMessage")
02278 {
02279   data_size = m->data_size;
02280   data_ptr  = malloc(data_size);
02281   memcpy(data_ptr, m->data_ptr, data_size);
02282   data      = (ParkMessage_data_t *)data_ptr;
02283   data_ts   = (message_data_ts_t *)data_ptr;
02284 }
02285 
02286 /* Methods */
02287 /** Get time_sec value.
02288  * Time in seconds when to reach the position.
02289  * @return time_sec value
02290  */
02291 float
02292 HumanoidMotionInterface::ParkMessage::time_sec() const
02293 {
02294   return data->time_sec;
02295 }
02296 
02297 /** Get maximum length of time_sec value.
02298  * @return length of time_sec value, can be length of the array or number of 
02299  * maximum number of characters for a string
02300  */
02301 size_t
02302 HumanoidMotionInterface::ParkMessage::maxlenof_time_sec() const
02303 {
02304   return 1;
02305 }
02306 
02307 /** Set time_sec value.
02308  * Time in seconds when to reach the position.
02309  * @param new_time_sec new time_sec value
02310  */
02311 void
02312 HumanoidMotionInterface::ParkMessage::set_time_sec(const float new_time_sec)
02313 {
02314   data->time_sec = new_time_sec;
02315 }
02316 
02317 /** Clone this message.
02318  * Produces a message of the same type as this message and copies the
02319  * data to the new message.
02320  * @return clone of this message
02321  */
02322 Message *
02323 HumanoidMotionInterface::ParkMessage::clone() const
02324 {
02325   return new HumanoidMotionInterface::ParkMessage(this);
02326 }
02327 /** @class HumanoidMotionInterface::GetUpMessage <interfaces/HumanoidMotionInterface.h>
02328  * GetUpMessage Fawkes BlackBoard Interface Message.
02329  * 
02330     
02331  */
02332 
02333 
02334 /** Constructor with initial values.
02335  * @param ini_time_sec initial value for time_sec
02336  */
02337 HumanoidMotionInterface::GetUpMessage::GetUpMessage(const float ini_time_sec) : Message("GetUpMessage")
02338 {
02339   data_size = sizeof(GetUpMessage_data_t);
02340   data_ptr  = malloc(data_size);
02341   memset(data_ptr, 0, data_size);
02342   data      = (GetUpMessage_data_t *)data_ptr;
02343   data_ts   = (message_data_ts_t *)data_ptr;
02344   data->time_sec = ini_time_sec;
02345   add_fieldinfo(IFT_FLOAT, "time_sec", 1, &data->time_sec);
02346 }
02347 /** Constructor */
02348 HumanoidMotionInterface::GetUpMessage::GetUpMessage() : Message("GetUpMessage")
02349 {
02350   data_size = sizeof(GetUpMessage_data_t);
02351   data_ptr  = malloc(data_size);
02352   memset(data_ptr, 0, data_size);
02353   data      = (GetUpMessage_data_t *)data_ptr;
02354   data_ts   = (message_data_ts_t *)data_ptr;
02355   add_fieldinfo(IFT_FLOAT, "time_sec", 1, &data->time_sec);
02356 }
02357 
02358 /** Destructor */
02359 HumanoidMotionInterface::GetUpMessage::~GetUpMessage()
02360 {
02361   free(data_ptr);
02362 }
02363 
02364 /** Copy constructor.
02365  * @param m message to copy from
02366  */
02367 HumanoidMotionInterface::GetUpMessage::GetUpMessage(const GetUpMessage *m) : Message("GetUpMessage")
02368 {
02369   data_size = m->data_size;
02370   data_ptr  = malloc(data_size);
02371   memcpy(data_ptr, m->data_ptr, data_size);
02372   data      = (GetUpMessage_data_t *)data_ptr;
02373   data_ts   = (message_data_ts_t *)data_ptr;
02374 }
02375 
02376 /* Methods */
02377 /** Get time_sec value.
02378  * Time in seconds when to reach the position.
02379  * @return time_sec value
02380  */
02381 float
02382 HumanoidMotionInterface::GetUpMessage::time_sec() const
02383 {
02384   return data->time_sec;
02385 }
02386 
02387 /** Get maximum length of time_sec value.
02388  * @return length of time_sec value, can be length of the array or number of 
02389  * maximum number of characters for a string
02390  */
02391 size_t
02392 HumanoidMotionInterface::GetUpMessage::maxlenof_time_sec() const
02393 {
02394   return 1;
02395 }
02396 
02397 /** Set time_sec value.
02398  * Time in seconds when to reach the position.
02399  * @param new_time_sec new time_sec value
02400  */
02401 void
02402 HumanoidMotionInterface::GetUpMessage::set_time_sec(const float new_time_sec)
02403 {
02404   data->time_sec = new_time_sec;
02405 }
02406 
02407 /** Clone this message.
02408  * Produces a message of the same type as this message and copies the
02409  * data to the new message.
02410  * @return clone of this message
02411  */
02412 Message *
02413 HumanoidMotionInterface::GetUpMessage::clone() const
02414 {
02415   return new HumanoidMotionInterface::GetUpMessage(this);
02416 }
02417 /** @class HumanoidMotionInterface::StandupMessage <interfaces/HumanoidMotionInterface.h>
02418  * StandupMessage Fawkes BlackBoard Interface Message.
02419  * 
02420     
02421  */
02422 
02423 
02424 /** Constructor with initial values.
02425  * @param ini_from_pos initial value for from_pos
02426  */
02427 HumanoidMotionInterface::StandupMessage::StandupMessage(const StandupEnum ini_from_pos) : Message("StandupMessage")
02428 {
02429   data_size = sizeof(StandupMessage_data_t);
02430   data_ptr  = malloc(data_size);
02431   memset(data_ptr, 0, data_size);
02432   data      = (StandupMessage_data_t *)data_ptr;
02433   data_ts   = (message_data_ts_t *)data_ptr;
02434   data->from_pos = ini_from_pos;
02435   add_fieldinfo(IFT_ENUM, "from_pos", 1, &data->from_pos, "StandupEnum");
02436 }
02437 /** Constructor */
02438 HumanoidMotionInterface::StandupMessage::StandupMessage() : Message("StandupMessage")
02439 {
02440   data_size = sizeof(StandupMessage_data_t);
02441   data_ptr  = malloc(data_size);
02442   memset(data_ptr, 0, data_size);
02443   data      = (StandupMessage_data_t *)data_ptr;
02444   data_ts   = (message_data_ts_t *)data_ptr;
02445   add_fieldinfo(IFT_ENUM, "from_pos", 1, &data->from_pos, "StandupEnum");
02446 }
02447 
02448 /** Destructor */
02449 HumanoidMotionInterface::StandupMessage::~StandupMessage()
02450 {
02451   free(data_ptr);
02452 }
02453 
02454 /** Copy constructor.
02455  * @param m message to copy from
02456  */
02457 HumanoidMotionInterface::StandupMessage::StandupMessage(const StandupMessage *m) : Message("StandupMessage")
02458 {
02459   data_size = m->data_size;
02460   data_ptr  = malloc(data_size);
02461   memcpy(data_ptr, m->data_ptr, data_size);
02462   data      = (StandupMessage_data_t *)data_ptr;
02463   data_ts   = (message_data_ts_t *)data_ptr;
02464 }
02465 
02466 /* Methods */
02467 /** Get from_pos value.
02468  * Position from where to standup.
02469  * @return from_pos value
02470  */
02471 HumanoidMotionInterface::StandupEnum
02472 HumanoidMotionInterface::StandupMessage::from_pos() const
02473 {
02474   return data->from_pos;
02475 }
02476 
02477 /** Get maximum length of from_pos value.
02478  * @return length of from_pos value, can be length of the array or number of 
02479  * maximum number of characters for a string
02480  */
02481 size_t
02482 HumanoidMotionInterface::StandupMessage::maxlenof_from_pos() const
02483 {
02484   return 1;
02485 }
02486 
02487 /** Set from_pos value.
02488  * Position from where to standup.
02489  * @param new_from_pos new from_pos value
02490  */
02491 void
02492 HumanoidMotionInterface::StandupMessage::set_from_pos(const StandupEnum new_from_pos)
02493 {
02494   data->from_pos = new_from_pos;
02495 }
02496 
02497 /** Clone this message.
02498  * Produces a message of the same type as this message and copies the
02499  * data to the new message.
02500  * @return clone of this message
02501  */
02502 Message *
02503 HumanoidMotionInterface::StandupMessage::clone() const
02504 {
02505   return new HumanoidMotionInterface::StandupMessage(this);
02506 }
02507 /** @class HumanoidMotionInterface::YawPitchHeadMessage <interfaces/HumanoidMotionInterface.h>
02508  * YawPitchHeadMessage Fawkes BlackBoard Interface Message.
02509  * 
02510     
02511  */
02512 
02513 
02514 /** Constructor with initial values.
02515  * @param ini_yaw initial value for yaw
02516  * @param ini_pitch initial value for pitch
02517  * @param ini_time_sec initial value for time_sec
02518  */
02519 HumanoidMotionInterface::YawPitchHeadMessage::YawPitchHeadMessage(const float ini_yaw, const float ini_pitch, const float ini_time_sec) : Message("YawPitchHeadMessage")
02520 {
02521   data_size = sizeof(YawPitchHeadMessage_data_t);
02522   data_ptr  = malloc(data_size);
02523   memset(data_ptr, 0, data_size);
02524   data      = (YawPitchHeadMessage_data_t *)data_ptr;
02525   data_ts   = (message_data_ts_t *)data_ptr;
02526   data->yaw = ini_yaw;
02527   data->pitch = ini_pitch;
02528   data->time_sec = ini_time_sec;
02529   add_fieldinfo(IFT_FLOAT, "yaw", 1, &data->yaw);
02530   add_fieldinfo(IFT_FLOAT, "pitch", 1, &data->pitch);
02531   add_fieldinfo(IFT_FLOAT, "time_sec", 1, &data->time_sec);
02532 }
02533 /** Constructor */
02534 HumanoidMotionInterface::YawPitchHeadMessage::YawPitchHeadMessage() : Message("YawPitchHeadMessage")
02535 {
02536   data_size = sizeof(YawPitchHeadMessage_data_t);
02537   data_ptr  = malloc(data_size);
02538   memset(data_ptr, 0, data_size);
02539   data      = (YawPitchHeadMessage_data_t *)data_ptr;
02540   data_ts   = (message_data_ts_t *)data_ptr;
02541   add_fieldinfo(IFT_FLOAT, "yaw", 1, &data->yaw);
02542   add_fieldinfo(IFT_FLOAT, "pitch", 1, &data->pitch);
02543   add_fieldinfo(IFT_FLOAT, "time_sec", 1, &data->time_sec);
02544 }
02545 
02546 /** Destructor */
02547 HumanoidMotionInterface::YawPitchHeadMessage::~YawPitchHeadMessage()
02548 {
02549   free(data_ptr);
02550 }
02551 
02552 /** Copy constructor.
02553  * @param m message to copy from
02554  */
02555 HumanoidMotionInterface::YawPitchHeadMessage::YawPitchHeadMessage(const YawPitchHeadMessage *m) : Message("YawPitchHeadMessage")
02556 {
02557   data_size = m->data_size;
02558   data_ptr  = malloc(data_size);
02559   memcpy(data_ptr, m->data_ptr, data_size);
02560   data      = (YawPitchHeadMessage_data_t *)data_ptr;
02561   data_ts   = (message_data_ts_t *)data_ptr;
02562 }
02563 
02564 /* Methods */
02565 /** Get yaw value.
02566  * Desired yaw (horizontal orientation).
02567  * @return yaw value
02568  */
02569 float
02570 HumanoidMotionInterface::YawPitchHeadMessage::yaw() const
02571 {
02572   return data->yaw;
02573 }
02574 
02575 /** Get maximum length of yaw value.
02576  * @return length of yaw value, can be length of the array or number of 
02577  * maximum number of characters for a string
02578  */
02579 size_t
02580 HumanoidMotionInterface::YawPitchHeadMessage::maxlenof_yaw() const
02581 {
02582   return 1;
02583 }
02584 
02585 /** Set yaw value.
02586  * Desired yaw (horizontal orientation).
02587  * @param new_yaw new yaw value
02588  */
02589 void
02590 HumanoidMotionInterface::YawPitchHeadMessage::set_yaw(const float new_yaw)
02591 {
02592   data->yaw = new_yaw;
02593 }
02594 
02595 /** Get pitch value.
02596  * Desired pitch (vertical orientation).
02597  * @return pitch value
02598  */
02599 float
02600 HumanoidMotionInterface::YawPitchHeadMessage::pitch() const
02601 {
02602   return data->pitch;
02603 }
02604 
02605 /** Get maximum length of pitch value.
02606  * @return length of pitch value, can be length of the array or number of 
02607  * maximum number of characters for a string
02608  */
02609 size_t
02610 HumanoidMotionInterface::YawPitchHeadMessage::maxlenof_pitch() const
02611 {
02612   return 1;
02613 }
02614 
02615 /** Set pitch value.
02616  * Desired pitch (vertical orientation).
02617  * @param new_pitch new pitch value
02618  */
02619 void
02620 HumanoidMotionInterface::YawPitchHeadMessage::set_pitch(const float new_pitch)
02621 {
02622   data->pitch = new_pitch;
02623 }
02624 
02625 /** Get time_sec value.
02626  * Time in seconds when to reach the target.
02627  * @return time_sec value
02628  */
02629 float
02630 HumanoidMotionInterface::YawPitchHeadMessage::time_sec() const
02631 {
02632   return data->time_sec;
02633 }
02634 
02635 /** Get maximum length of time_sec value.
02636  * @return length of time_sec value, can be length of the array or number of 
02637  * maximum number of characters for a string
02638  */
02639 size_t
02640 HumanoidMotionInterface::YawPitchHeadMessage::maxlenof_time_sec() const
02641 {
02642   return 1;
02643 }
02644 
02645 /** Set time_sec value.
02646  * Time in seconds when to reach the target.
02647  * @param new_time_sec new time_sec value
02648  */
02649 void
02650 HumanoidMotionInterface::YawPitchHeadMessage::set_time_sec(const float new_time_sec)
02651 {
02652   data->time_sec = new_time_sec;
02653 }
02654 
02655 /** Clone this message.
02656  * Produces a message of the same type as this message and copies the
02657  * data to the new message.
02658  * @return clone of this message
02659  */
02660 Message *
02661 HumanoidMotionInterface::YawPitchHeadMessage::clone() const
02662 {
02663   return new HumanoidMotionInterface::YawPitchHeadMessage(this);
02664 }
02665 /** @class HumanoidMotionInterface::SetStiffnessParamsMessage <interfaces/HumanoidMotionInterface.h>
02666  * SetStiffnessParamsMessage Fawkes BlackBoard Interface Message.
02667  * 
02668     
02669  */
02670 
02671 
02672 /** Constructor with initial values.
02673  * @param ini_motion_pattern initial value for motion_pattern
02674  * @param ini_head_yaw initial value for head_yaw
02675  * @param ini_head_pitch initial value for head_pitch
02676  * @param ini_l_shoulder_pitch initial value for l_shoulder_pitch
02677  * @param ini_l_shoulder_roll initial value for l_shoulder_roll
02678  * @param ini_l_elbow_yaw initial value for l_elbow_yaw
02679  * @param ini_l_elbow_roll initial value for l_elbow_roll
02680  * @param ini_l_hip_yaw_pitch initial value for l_hip_yaw_pitch
02681  * @param ini_l_hip_roll initial value for l_hip_roll
02682  * @param ini_l_hip_pitch initial value for l_hip_pitch
02683  * @param ini_l_knee_pitch initial value for l_knee_pitch
02684  * @param ini_l_ankle_pitch initial value for l_ankle_pitch
02685  * @param ini_l_ankle_roll initial value for l_ankle_roll
02686  * @param ini_r_hip_yaw_pitch initial value for r_hip_yaw_pitch
02687  * @param ini_r_hip_roll initial value for r_hip_roll
02688  * @param ini_r_hip_pitch initial value for r_hip_pitch
02689  * @param ini_r_knee_pitch initial value for r_knee_pitch
02690  * @param ini_r_ankle_pitch initial value for r_ankle_pitch
02691  * @param ini_r_ankle_roll initial value for r_ankle_roll
02692  * @param ini_r_shoulder_pitch initial value for r_shoulder_pitch
02693  * @param ini_r_shoulder_roll initial value for r_shoulder_roll
02694  * @param ini_r_elbow_yaw initial value for r_elbow_yaw
02695  * @param ini_r_elbow_roll initial value for r_elbow_roll
02696  */
02697 HumanoidMotionInterface::SetStiffnessParamsMessage::SetStiffnessParamsMessage(const StiffnessMotionPatternEnum ini_motion_pattern, 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_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_shoulder_pitch, const float ini_r_shoulder_roll, const float ini_r_elbow_yaw, const float ini_r_elbow_roll) : Message("SetStiffnessParamsMessage")
02698 {
02699   data_size = sizeof(SetStiffnessParamsMessage_data_t);
02700   data_ptr  = malloc(data_size);
02701   memset(data_ptr, 0, data_size);
02702   data      = (SetStiffnessParamsMessage_data_t *)data_ptr;
02703   data_ts   = (message_data_ts_t *)data_ptr;
02704   data->motion_pattern = ini_motion_pattern;
02705   data->head_yaw = ini_head_yaw;
02706   data->head_pitch = ini_head_pitch;
02707   data->l_shoulder_pitch = ini_l_shoulder_pitch;
02708   data->l_shoulder_roll = ini_l_shoulder_roll;
02709   data->l_elbow_yaw = ini_l_elbow_yaw;
02710   data->l_elbow_roll = ini_l_elbow_roll;
02711   data->l_hip_yaw_pitch = ini_l_hip_yaw_pitch;
02712   data->l_hip_roll = ini_l_hip_roll;
02713   data->l_hip_pitch = ini_l_hip_pitch;
02714   data->l_knee_pitch = ini_l_knee_pitch;
02715   data->l_ankle_pitch = ini_l_ankle_pitch;
02716   data->l_ankle_roll = ini_l_ankle_roll;
02717   data->r_hip_yaw_pitch = ini_r_hip_yaw_pitch;
02718   data->r_hip_roll = ini_r_hip_roll;
02719   data->r_hip_pitch = ini_r_hip_pitch;
02720   data->r_knee_pitch = ini_r_knee_pitch;
02721   data->r_ankle_pitch = ini_r_ankle_pitch;
02722   data->r_ankle_roll = ini_r_ankle_roll;
02723   data->r_shoulder_pitch = ini_r_shoulder_pitch;
02724   data->r_shoulder_roll = ini_r_shoulder_roll;
02725   data->r_elbow_yaw = ini_r_elbow_yaw;
02726   data->r_elbow_roll = ini_r_elbow_roll;
02727   add_fieldinfo(IFT_ENUM, "motion_pattern", 1, &data->motion_pattern, "StiffnessMotionPatternEnum");
02728   add_fieldinfo(IFT_FLOAT, "head_yaw", 1, &data->head_yaw);
02729   add_fieldinfo(IFT_FLOAT, "head_pitch", 1, &data->head_pitch);
02730   add_fieldinfo(IFT_FLOAT, "l_shoulder_pitch", 1, &data->l_shoulder_pitch);
02731   add_fieldinfo(IFT_FLOAT, "l_shoulder_roll", 1, &data->l_shoulder_roll);
02732   add_fieldinfo(IFT_FLOAT, "l_elbow_yaw", 1, &data->l_elbow_yaw);
02733   add_fieldinfo(IFT_FLOAT, "l_elbow_roll", 1, &data->l_elbow_roll);
02734   add_fieldinfo(IFT_FLOAT, "l_hip_yaw_pitch", 1, &data->l_hip_yaw_pitch);
02735   add_fieldinfo(IFT_FLOAT, "l_hip_roll", 1, &data->l_hip_roll);
02736   add_fieldinfo(IFT_FLOAT, "l_hip_pitch", 1, &data->l_hip_pitch);
02737   add_fieldinfo(IFT_FLOAT, "l_knee_pitch", 1, &data->l_knee_pitch);
02738   add_fieldinfo(IFT_FLOAT, "l_ankle_pitch", 1, &data->l_ankle_pitch);
02739   add_fieldinfo(IFT_FLOAT, "l_ankle_roll", 1, &data->l_ankle_roll);
02740   add_fieldinfo(IFT_FLOAT, "r_hip_yaw_pitch", 1, &data->r_hip_yaw_pitch);
02741   add_fieldinfo(IFT_FLOAT, "r_hip_roll", 1, &data->r_hip_roll);
02742   add_fieldinfo(IFT_FLOAT, "r_hip_pitch", 1, &data->r_hip_pitch);
02743   add_fieldinfo(IFT_FLOAT, "r_knee_pitch", 1, &data->r_knee_pitch);
02744   add_fieldinfo(IFT_FLOAT, "r_ankle_pitch", 1, &data->r_ankle_pitch);
02745   add_fieldinfo(IFT_FLOAT, "r_ankle_roll", 1, &data->r_ankle_roll);
02746   add_fieldinfo(IFT_FLOAT, "r_shoulder_pitch", 1, &data->r_shoulder_pitch);
02747   add_fieldinfo(IFT_FLOAT, "r_shoulder_roll", 1, &data->r_shoulder_roll);
02748   add_fieldinfo(IFT_FLOAT, "r_elbow_yaw", 1, &data->r_elbow_yaw);
02749   add_fieldinfo(IFT_FLOAT, "r_elbow_roll", 1, &data->r_elbow_roll);
02750 }
02751 /** Constructor */
02752 HumanoidMotionInterface::SetStiffnessParamsMessage::SetStiffnessParamsMessage() : Message("SetStiffnessParamsMessage")
02753 {
02754   data_size = sizeof(SetStiffnessParamsMessage_data_t);
02755   data_ptr  = malloc(data_size);
02756   memset(data_ptr, 0, data_size);
02757   data      = (SetStiffnessParamsMessage_data_t *)data_ptr;
02758   data_ts   = (message_data_ts_t *)data_ptr;
02759   add_fieldinfo(IFT_ENUM, "motion_pattern", 1, &data->motion_pattern, "StiffnessMotionPatternEnum");
02760   add_fieldinfo(IFT_FLOAT, "head_yaw", 1, &data->head_yaw);
02761   add_fieldinfo(IFT_FLOAT, "head_pitch", 1, &data->head_pitch);
02762   add_fieldinfo(IFT_FLOAT, "l_shoulder_pitch", 1, &data->l_shoulder_pitch);
02763   add_fieldinfo(IFT_FLOAT, "l_shoulder_roll", 1, &data->l_shoulder_roll);
02764   add_fieldinfo(IFT_FLOAT, "l_elbow_yaw", 1, &data->l_elbow_yaw);
02765   add_fieldinfo(IFT_FLOAT, "l_elbow_roll", 1, &data->l_elbow_roll);
02766   add_fieldinfo(IFT_FLOAT, "l_hip_yaw_pitch", 1, &data->l_hip_yaw_pitch);
02767   add_fieldinfo(IFT_FLOAT, "l_hip_roll", 1, &data->l_hip_roll);
02768   add_fieldinfo(IFT_FLOAT, "l_hip_pitch", 1, &data->l_hip_pitch);
02769   add_fieldinfo(IFT_FLOAT, "l_knee_pitch", 1, &data->l_knee_pitch);
02770   add_fieldinfo(IFT_FLOAT, "l_ankle_pitch", 1, &data->l_ankle_pitch);
02771   add_fieldinfo(IFT_FLOAT, "l_ankle_roll", 1, &data->l_ankle_roll);
02772   add_fieldinfo(IFT_FLOAT, "r_hip_yaw_pitch", 1, &data->r_hip_yaw_pitch);
02773   add_fieldinfo(IFT_FLOAT, "r_hip_roll", 1, &data->r_hip_roll);
02774   add_fieldinfo(IFT_FLOAT, "r_hip_pitch", 1, &data->r_hip_pitch);
02775   add_fieldinfo(IFT_FLOAT, "r_knee_pitch", 1, &data->r_knee_pitch);
02776   add_fieldinfo(IFT_FLOAT, "r_ankle_pitch", 1, &data->r_ankle_pitch);
02777   add_fieldinfo(IFT_FLOAT, "r_ankle_roll", 1, &data->r_ankle_roll);
02778   add_fieldinfo(IFT_FLOAT, "r_shoulder_pitch", 1, &data->r_shoulder_pitch);
02779   add_fieldinfo(IFT_FLOAT, "r_shoulder_roll", 1, &data->r_shoulder_roll);
02780   add_fieldinfo(IFT_FLOAT, "r_elbow_yaw", 1, &data->r_elbow_yaw);
02781   add_fieldinfo(IFT_FLOAT, "r_elbow_roll", 1, &data->r_elbow_roll);
02782 }
02783 
02784 /** Destructor */
02785 HumanoidMotionInterface::SetStiffnessParamsMessage::~SetStiffnessParamsMessage()
02786 {
02787   free(data_ptr);
02788 }
02789 
02790 /** Copy constructor.
02791  * @param m message to copy from
02792  */
02793 HumanoidMotionInterface::SetStiffnessParamsMessage::SetStiffnessParamsMessage(const SetStiffnessParamsMessage *m) : Message("SetStiffnessParamsMessage")
02794 {
02795   data_size = m->data_size;
02796   data_ptr  = malloc(data_size);
02797   memcpy(data_ptr, m->data_ptr, data_size);
02798   data      = (SetStiffnessParamsMessage_data_t *)data_ptr;
02799   data_ts   = (message_data_ts_t *)data_ptr;
02800 }
02801 
02802 /* Methods */
02803 /** Get motion_pattern value.
02804  * the motion pattern to update
02805  * @return motion_pattern value
02806  */
02807 HumanoidMotionInterface::StiffnessMotionPatternEnum
02808 HumanoidMotionInterface::SetStiffnessParamsMessage::motion_pattern() const
02809 {
02810   return data->motion_pattern;
02811 }
02812 
02813 /** Get maximum length of motion_pattern value.
02814  * @return length of motion_pattern value, can be length of the array or number of 
02815  * maximum number of characters for a string
02816  */
02817 size_t
02818 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_motion_pattern() const
02819 {
02820   return 1;
02821 }
02822 
02823 /** Set motion_pattern value.
02824  * the motion pattern to update
02825  * @param new_motion_pattern new motion_pattern value
02826  */
02827 void
02828 HumanoidMotionInterface::SetStiffnessParamsMessage::set_motion_pattern(const StiffnessMotionPatternEnum new_motion_pattern)
02829 {
02830   data->motion_pattern = new_motion_pattern;
02831 }
02832 
02833 /** Get head_yaw value.
02834  * head_yaw
02835  * @return head_yaw value
02836  */
02837 float
02838 HumanoidMotionInterface::SetStiffnessParamsMessage::head_yaw() const
02839 {
02840   return data->head_yaw;
02841 }
02842 
02843 /** Get maximum length of head_yaw value.
02844  * @return length of head_yaw value, can be length of the array or number of 
02845  * maximum number of characters for a string
02846  */
02847 size_t
02848 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_head_yaw() const
02849 {
02850   return 1;
02851 }
02852 
02853 /** Set head_yaw value.
02854  * head_yaw
02855  * @param new_head_yaw new head_yaw value
02856  */
02857 void
02858 HumanoidMotionInterface::SetStiffnessParamsMessage::set_head_yaw(const float new_head_yaw)
02859 {
02860   data->head_yaw = new_head_yaw;
02861 }
02862 
02863 /** Get head_pitch value.
02864  * head_pitch
02865  * @return head_pitch value
02866  */
02867 float
02868 HumanoidMotionInterface::SetStiffnessParamsMessage::head_pitch() const
02869 {
02870   return data->head_pitch;
02871 }
02872 
02873 /** Get maximum length of head_pitch value.
02874  * @return length of head_pitch value, can be length of the array or number of 
02875  * maximum number of characters for a string
02876  */
02877 size_t
02878 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_head_pitch() const
02879 {
02880   return 1;
02881 }
02882 
02883 /** Set head_pitch value.
02884  * head_pitch
02885  * @param new_head_pitch new head_pitch value
02886  */
02887 void
02888 HumanoidMotionInterface::SetStiffnessParamsMessage::set_head_pitch(const float new_head_pitch)
02889 {
02890   data->head_pitch = new_head_pitch;
02891 }
02892 
02893 /** Get l_shoulder_pitch value.
02894  * l_shoulder_pitch
02895  * @return l_shoulder_pitch value
02896  */
02897 float
02898 HumanoidMotionInterface::SetStiffnessParamsMessage::l_shoulder_pitch() const
02899 {
02900   return data->l_shoulder_pitch;
02901 }
02902 
02903 /** Get maximum length of l_shoulder_pitch value.
02904  * @return length of l_shoulder_pitch value, can be length of the array or number of 
02905  * maximum number of characters for a string
02906  */
02907 size_t
02908 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_l_shoulder_pitch() const
02909 {
02910   return 1;
02911 }
02912 
02913 /** Set l_shoulder_pitch value.
02914  * l_shoulder_pitch
02915  * @param new_l_shoulder_pitch new l_shoulder_pitch value
02916  */
02917 void
02918 HumanoidMotionInterface::SetStiffnessParamsMessage::set_l_shoulder_pitch(const float new_l_shoulder_pitch)
02919 {
02920   data->l_shoulder_pitch = new_l_shoulder_pitch;
02921 }
02922 
02923 /** Get l_shoulder_roll value.
02924  * l_shoulder_roll
02925  * @return l_shoulder_roll value
02926  */
02927 float
02928 HumanoidMotionInterface::SetStiffnessParamsMessage::l_shoulder_roll() const
02929 {
02930   return data->l_shoulder_roll;
02931 }
02932 
02933 /** Get maximum length of l_shoulder_roll value.
02934  * @return length of l_shoulder_roll value, can be length of the array or number of 
02935  * maximum number of characters for a string
02936  */
02937 size_t
02938 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_l_shoulder_roll() const
02939 {
02940   return 1;
02941 }
02942 
02943 /** Set l_shoulder_roll value.
02944  * l_shoulder_roll
02945  * @param new_l_shoulder_roll new l_shoulder_roll value
02946  */
02947 void
02948 HumanoidMotionInterface::SetStiffnessParamsMessage::set_l_shoulder_roll(const float new_l_shoulder_roll)
02949 {
02950   data->l_shoulder_roll = new_l_shoulder_roll;
02951 }
02952 
02953 /** Get l_elbow_yaw value.
02954  * l_elbow_yaw
02955  * @return l_elbow_yaw value
02956  */
02957 float
02958 HumanoidMotionInterface::SetStiffnessParamsMessage::l_elbow_yaw() const
02959 {
02960   return data->l_elbow_yaw;
02961 }
02962 
02963 /** Get maximum length of l_elbow_yaw value.
02964  * @return length of l_elbow_yaw value, can be length of the array or number of 
02965  * maximum number of characters for a string
02966  */
02967 size_t
02968 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_l_elbow_yaw() const
02969 {
02970   return 1;
02971 }
02972 
02973 /** Set l_elbow_yaw value.
02974  * l_elbow_yaw
02975  * @param new_l_elbow_yaw new l_elbow_yaw value
02976  */
02977 void
02978 HumanoidMotionInterface::SetStiffnessParamsMessage::set_l_elbow_yaw(const float new_l_elbow_yaw)
02979 {
02980   data->l_elbow_yaw = new_l_elbow_yaw;
02981 }
02982 
02983 /** Get l_elbow_roll value.
02984  * l_elbow_roll
02985  * @return l_elbow_roll value
02986  */
02987 float
02988 HumanoidMotionInterface::SetStiffnessParamsMessage::l_elbow_roll() const
02989 {
02990   return data->l_elbow_roll;
02991 }
02992 
02993 /** Get maximum length of l_elbow_roll value.
02994  * @return length of l_elbow_roll value, can be length of the array or number of 
02995  * maximum number of characters for a string
02996  */
02997 size_t
02998 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_l_elbow_roll() const
02999 {
03000   return 1;
03001 }
03002 
03003 /** Set l_elbow_roll value.
03004  * l_elbow_roll
03005  * @param new_l_elbow_roll new l_elbow_roll value
03006  */
03007 void
03008 HumanoidMotionInterface::SetStiffnessParamsMessage::set_l_elbow_roll(const float new_l_elbow_roll)
03009 {
03010   data->l_elbow_roll = new_l_elbow_roll;
03011 }
03012 
03013 /** Get l_hip_yaw_pitch value.
03014  * l_hip_yaw_pitch
03015  * @return l_hip_yaw_pitch value
03016  */
03017 float
03018 HumanoidMotionInterface::SetStiffnessParamsMessage::l_hip_yaw_pitch() const
03019 {
03020   return data->l_hip_yaw_pitch;
03021 }
03022 
03023 /** Get maximum length of l_hip_yaw_pitch value.
03024  * @return length of l_hip_yaw_pitch value, can be length of the array or number of 
03025  * maximum number of characters for a string
03026  */
03027 size_t
03028 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_l_hip_yaw_pitch() const
03029 {
03030   return 1;
03031 }
03032 
03033 /** Set l_hip_yaw_pitch value.
03034  * l_hip_yaw_pitch
03035  * @param new_l_hip_yaw_pitch new l_hip_yaw_pitch value
03036  */
03037 void
03038 HumanoidMotionInterface::SetStiffnessParamsMessage::set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch)
03039 {
03040   data->l_hip_yaw_pitch = new_l_hip_yaw_pitch;
03041 }
03042 
03043 /** Get l_hip_roll value.
03044  * l_hip_roll
03045  * @return l_hip_roll value
03046  */
03047 float
03048 HumanoidMotionInterface::SetStiffnessParamsMessage::l_hip_roll() const
03049 {
03050   return data->l_hip_roll;
03051 }
03052 
03053 /** Get maximum length of l_hip_roll value.
03054  * @return length of l_hip_roll value, can be length of the array or number of 
03055  * maximum number of characters for a string
03056  */
03057 size_t
03058 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_l_hip_roll() const
03059 {
03060   return 1;
03061 }
03062 
03063 /** Set l_hip_roll value.
03064  * l_hip_roll
03065  * @param new_l_hip_roll new l_hip_roll value
03066  */
03067 void
03068 HumanoidMotionInterface::SetStiffnessParamsMessage::set_l_hip_roll(const float new_l_hip_roll)
03069 {
03070   data->l_hip_roll = new_l_hip_roll;
03071 }
03072 
03073 /** Get l_hip_pitch value.
03074  * l_hip_pitch
03075  * @return l_hip_pitch value
03076  */
03077 float
03078 HumanoidMotionInterface::SetStiffnessParamsMessage::l_hip_pitch() const
03079 {
03080   return data->l_hip_pitch;
03081 }
03082 
03083 /** Get maximum length of l_hip_pitch value.
03084  * @return length of l_hip_pitch value, can be length of the array or number of 
03085  * maximum number of characters for a string
03086  */
03087 size_t
03088 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_l_hip_pitch() const
03089 {
03090   return 1;
03091 }
03092 
03093 /** Set l_hip_pitch value.
03094  * l_hip_pitch
03095  * @param new_l_hip_pitch new l_hip_pitch value
03096  */
03097 void
03098 HumanoidMotionInterface::SetStiffnessParamsMessage::set_l_hip_pitch(const float new_l_hip_pitch)
03099 {
03100   data->l_hip_pitch = new_l_hip_pitch;
03101 }
03102 
03103 /** Get l_knee_pitch value.
03104  * l_knee_pitch
03105  * @return l_knee_pitch value
03106  */
03107 float
03108 HumanoidMotionInterface::SetStiffnessParamsMessage::l_knee_pitch() const
03109 {
03110   return data->l_knee_pitch;
03111 }
03112 
03113 /** Get maximum length of l_knee_pitch value.
03114  * @return length of l_knee_pitch value, can be length of the array or number of 
03115  * maximum number of characters for a string
03116  */
03117 size_t
03118 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_l_knee_pitch() const
03119 {
03120   return 1;
03121 }
03122 
03123 /** Set l_knee_pitch value.
03124  * l_knee_pitch
03125  * @param new_l_knee_pitch new l_knee_pitch value
03126  */
03127 void
03128 HumanoidMotionInterface::SetStiffnessParamsMessage::set_l_knee_pitch(const float new_l_knee_pitch)
03129 {
03130   data->l_knee_pitch = new_l_knee_pitch;
03131 }
03132 
03133 /** Get l_ankle_pitch value.
03134  * l_ankle_pitch
03135  * @return l_ankle_pitch value
03136  */
03137 float
03138 HumanoidMotionInterface::SetStiffnessParamsMessage::l_ankle_pitch() const
03139 {
03140   return data->l_ankle_pitch;
03141 }
03142 
03143 /** Get maximum length of l_ankle_pitch value.
03144  * @return length of l_ankle_pitch value, can be length of the array or number of 
03145  * maximum number of characters for a string
03146  */
03147 size_t
03148 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_l_ankle_pitch() const
03149 {
03150   return 1;
03151 }
03152 
03153 /** Set l_ankle_pitch value.
03154  * l_ankle_pitch
03155  * @param new_l_ankle_pitch new l_ankle_pitch value
03156  */
03157 void
03158 HumanoidMotionInterface::SetStiffnessParamsMessage::set_l_ankle_pitch(const float new_l_ankle_pitch)
03159 {
03160   data->l_ankle_pitch = new_l_ankle_pitch;
03161 }
03162 
03163 /** Get l_ankle_roll value.
03164  * l_ankle_roll
03165  * @return l_ankle_roll value
03166  */
03167 float
03168 HumanoidMotionInterface::SetStiffnessParamsMessage::l_ankle_roll() const
03169 {
03170   return data->l_ankle_roll;
03171 }
03172 
03173 /** Get maximum length of l_ankle_roll value.
03174  * @return length of l_ankle_roll value, can be length of the array or number of 
03175  * maximum number of characters for a string
03176  */
03177 size_t
03178 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_l_ankle_roll() const
03179 {
03180   return 1;
03181 }
03182 
03183 /** Set l_ankle_roll value.
03184  * l_ankle_roll
03185  * @param new_l_ankle_roll new l_ankle_roll value
03186  */
03187 void
03188 HumanoidMotionInterface::SetStiffnessParamsMessage::set_l_ankle_roll(const float new_l_ankle_roll)
03189 {
03190   data->l_ankle_roll = new_l_ankle_roll;
03191 }
03192 
03193 /** Get r_hip_yaw_pitch value.
03194  * r_hip_yaw_pitch
03195  * @return r_hip_yaw_pitch value
03196  */
03197 float
03198 HumanoidMotionInterface::SetStiffnessParamsMessage::r_hip_yaw_pitch() const
03199 {
03200   return data->r_hip_yaw_pitch;
03201 }
03202 
03203 /** Get maximum length of r_hip_yaw_pitch value.
03204  * @return length of r_hip_yaw_pitch value, can be length of the array or number of 
03205  * maximum number of characters for a string
03206  */
03207 size_t
03208 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_r_hip_yaw_pitch() const
03209 {
03210   return 1;
03211 }
03212 
03213 /** Set r_hip_yaw_pitch value.
03214  * r_hip_yaw_pitch
03215  * @param new_r_hip_yaw_pitch new r_hip_yaw_pitch value
03216  */
03217 void
03218 HumanoidMotionInterface::SetStiffnessParamsMessage::set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch)
03219 {
03220   data->r_hip_yaw_pitch = new_r_hip_yaw_pitch;
03221 }
03222 
03223 /** Get r_hip_roll value.
03224  * r_hip_roll
03225  * @return r_hip_roll value
03226  */
03227 float
03228 HumanoidMotionInterface::SetStiffnessParamsMessage::r_hip_roll() const
03229 {
03230   return data->r_hip_roll;
03231 }
03232 
03233 /** Get maximum length of r_hip_roll value.
03234  * @return length of r_hip_roll value, can be length of the array or number of 
03235  * maximum number of characters for a string
03236  */
03237 size_t
03238 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_r_hip_roll() const
03239 {
03240   return 1;
03241 }
03242 
03243 /** Set r_hip_roll value.
03244  * r_hip_roll
03245  * @param new_r_hip_roll new r_hip_roll value
03246  */
03247 void
03248 HumanoidMotionInterface::SetStiffnessParamsMessage::set_r_hip_roll(const float new_r_hip_roll)
03249 {
03250   data->r_hip_roll = new_r_hip_roll;
03251 }
03252 
03253 /** Get r_hip_pitch value.
03254  * r_hip_pitch
03255  * @return r_hip_pitch value
03256  */
03257 float
03258 HumanoidMotionInterface::SetStiffnessParamsMessage::r_hip_pitch() const
03259 {
03260   return data->r_hip_pitch;
03261 }
03262 
03263 /** Get maximum length of r_hip_pitch value.
03264  * @return length of r_hip_pitch value, can be length of the array or number of 
03265  * maximum number of characters for a string
03266  */
03267 size_t
03268 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_r_hip_pitch() const
03269 {
03270   return 1;
03271 }
03272 
03273 /** Set r_hip_pitch value.
03274  * r_hip_pitch
03275  * @param new_r_hip_pitch new r_hip_pitch value
03276  */
03277 void
03278 HumanoidMotionInterface::SetStiffnessParamsMessage::set_r_hip_pitch(const float new_r_hip_pitch)
03279 {
03280   data->r_hip_pitch = new_r_hip_pitch;
03281 }
03282 
03283 /** Get r_knee_pitch value.
03284  * r_knee_pitch
03285  * @return r_knee_pitch value
03286  */
03287 float
03288 HumanoidMotionInterface::SetStiffnessParamsMessage::r_knee_pitch() const
03289 {
03290   return data->r_knee_pitch;
03291 }
03292 
03293 /** Get maximum length of r_knee_pitch value.
03294  * @return length of r_knee_pitch value, can be length of the array or number of 
03295  * maximum number of characters for a string
03296  */
03297 size_t
03298 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_r_knee_pitch() const
03299 {
03300   return 1;
03301 }
03302 
03303 /** Set r_knee_pitch value.
03304  * r_knee_pitch
03305  * @param new_r_knee_pitch new r_knee_pitch value
03306  */
03307 void
03308 HumanoidMotionInterface::SetStiffnessParamsMessage::set_r_knee_pitch(const float new_r_knee_pitch)
03309 {
03310   data->r_knee_pitch = new_r_knee_pitch;
03311 }
03312 
03313 /** Get r_ankle_pitch value.
03314  * r_ankle_pitch
03315  * @return r_ankle_pitch value
03316  */
03317 float
03318 HumanoidMotionInterface::SetStiffnessParamsMessage::r_ankle_pitch() const
03319 {
03320   return data->r_ankle_pitch;
03321 }
03322 
03323 /** Get maximum length of r_ankle_pitch value.
03324  * @return length of r_ankle_pitch value, can be length of the array or number of 
03325  * maximum number of characters for a string
03326  */
03327 size_t
03328 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_r_ankle_pitch() const
03329 {
03330   return 1;
03331 }
03332 
03333 /** Set r_ankle_pitch value.
03334  * r_ankle_pitch
03335  * @param new_r_ankle_pitch new r_ankle_pitch value
03336  */
03337 void
03338 HumanoidMotionInterface::SetStiffnessParamsMessage::set_r_ankle_pitch(const float new_r_ankle_pitch)
03339 {
03340   data->r_ankle_pitch = new_r_ankle_pitch;
03341 }
03342 
03343 /** Get r_ankle_roll value.
03344  * r_ankle_roll
03345  * @return r_ankle_roll value
03346  */
03347 float
03348 HumanoidMotionInterface::SetStiffnessParamsMessage::r_ankle_roll() const
03349 {
03350   return data->r_ankle_roll;
03351 }
03352 
03353 /** Get maximum length of r_ankle_roll value.
03354  * @return length of r_ankle_roll value, can be length of the array or number of 
03355  * maximum number of characters for a string
03356  */
03357 size_t
03358 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_r_ankle_roll() const
03359 {
03360   return 1;
03361 }
03362 
03363 /** Set r_ankle_roll value.
03364  * r_ankle_roll
03365  * @param new_r_ankle_roll new r_ankle_roll value
03366  */
03367 void
03368 HumanoidMotionInterface::SetStiffnessParamsMessage::set_r_ankle_roll(const float new_r_ankle_roll)
03369 {
03370   data->r_ankle_roll = new_r_ankle_roll;
03371 }
03372 
03373 /** Get r_shoulder_pitch value.
03374  * r_shoulder_pitch
03375  * @return r_shoulder_pitch value
03376  */
03377 float
03378 HumanoidMotionInterface::SetStiffnessParamsMessage::r_shoulder_pitch() const
03379 {
03380   return data->r_shoulder_pitch;
03381 }
03382 
03383 /** Get maximum length of r_shoulder_pitch value.
03384  * @return length of r_shoulder_pitch value, can be length of the array or number of 
03385  * maximum number of characters for a string
03386  */
03387 size_t
03388 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_r_shoulder_pitch() const
03389 {
03390   return 1;
03391 }
03392 
03393 /** Set r_shoulder_pitch value.
03394  * r_shoulder_pitch
03395  * @param new_r_shoulder_pitch new r_shoulder_pitch value
03396  */
03397 void
03398 HumanoidMotionInterface::SetStiffnessParamsMessage::set_r_shoulder_pitch(const float new_r_shoulder_pitch)
03399 {
03400   data->r_shoulder_pitch = new_r_shoulder_pitch;
03401 }
03402 
03403 /** Get r_shoulder_roll value.
03404  * r_shoulder_roll
03405  * @return r_shoulder_roll value
03406  */
03407 float
03408 HumanoidMotionInterface::SetStiffnessParamsMessage::r_shoulder_roll() const
03409 {
03410   return data->r_shoulder_roll;
03411 }
03412 
03413 /** Get maximum length of r_shoulder_roll value.
03414  * @return length of r_shoulder_roll value, can be length of the array or number of 
03415  * maximum number of characters for a string
03416  */
03417 size_t
03418 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_r_shoulder_roll() const
03419 {
03420   return 1;
03421 }
03422 
03423 /** Set r_shoulder_roll value.
03424  * r_shoulder_roll
03425  * @param new_r_shoulder_roll new r_shoulder_roll value
03426  */
03427 void
03428 HumanoidMotionInterface::SetStiffnessParamsMessage::set_r_shoulder_roll(const float new_r_shoulder_roll)
03429 {
03430   data->r_shoulder_roll = new_r_shoulder_roll;
03431 }
03432 
03433 /** Get r_elbow_yaw value.
03434  * r_elbow_yaw
03435  * @return r_elbow_yaw value
03436  */
03437 float
03438 HumanoidMotionInterface::SetStiffnessParamsMessage::r_elbow_yaw() const
03439 {
03440   return data->r_elbow_yaw;
03441 }
03442 
03443 /** Get maximum length of r_elbow_yaw value.
03444  * @return length of r_elbow_yaw value, can be length of the array or number of 
03445  * maximum number of characters for a string
03446  */
03447 size_t
03448 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_r_elbow_yaw() const
03449 {
03450   return 1;
03451 }
03452 
03453 /** Set r_elbow_yaw value.
03454  * r_elbow_yaw
03455  * @param new_r_elbow_yaw new r_elbow_yaw value
03456  */
03457 void
03458 HumanoidMotionInterface::SetStiffnessParamsMessage::set_r_elbow_yaw(const float new_r_elbow_yaw)
03459 {
03460   data->r_elbow_yaw = new_r_elbow_yaw;
03461 }
03462 
03463 /** Get r_elbow_roll value.
03464  * r_elbow_roll
03465  * @return r_elbow_roll value
03466  */
03467 float
03468 HumanoidMotionInterface::SetStiffnessParamsMessage::r_elbow_roll() const
03469 {
03470   return data->r_elbow_roll;
03471 }
03472 
03473 /** Get maximum length of r_elbow_roll value.
03474  * @return length of r_elbow_roll value, can be length of the array or number of 
03475  * maximum number of characters for a string
03476  */
03477 size_t
03478 HumanoidMotionInterface::SetStiffnessParamsMessage::maxlenof_r_elbow_roll() const
03479 {
03480   return 1;
03481 }
03482 
03483 /** Set r_elbow_roll value.
03484  * r_elbow_roll
03485  * @param new_r_elbow_roll new r_elbow_roll value
03486  */
03487 void
03488 HumanoidMotionInterface::SetStiffnessParamsMessage::set_r_elbow_roll(const float new_r_elbow_roll)
03489 {
03490   data->r_elbow_roll = new_r_elbow_roll;
03491 }
03492 
03493 /** Clone this message.
03494  * Produces a message of the same type as this message and copies the
03495  * data to the new message.
03496  * @return clone of this message
03497  */
03498 Message *
03499 HumanoidMotionInterface::SetStiffnessParamsMessage::clone() const
03500 {
03501   return new HumanoidMotionInterface::SetStiffnessParamsMessage(this);
03502 }
03503 /** Check if message is valid and can be enqueued.
03504  * @param message Message to check
03505  * @return true if the message is valid, false otherwise.
03506  */
03507 bool
03508 HumanoidMotionInterface::message_valid(const Message *message) const
03509 {
03510   const SetWalkParamsMessage *m0 = dynamic_cast<const SetWalkParamsMessage *>(message);
03511   if ( m0 != NULL ) {
03512     return true;
03513   }
03514   const SetWalkArmsParamsMessage *m1 = dynamic_cast<const SetWalkArmsParamsMessage *>(message);
03515   if ( m1 != NULL ) {
03516     return true;
03517   }
03518   const StopMessage *m2 = dynamic_cast<const StopMessage *>(message);
03519   if ( m2 != NULL ) {
03520     return true;
03521   }
03522   const WalkStraightMessage *m3 = dynamic_cast<const WalkStraightMessage *>(message);
03523   if ( m3 != NULL ) {
03524     return true;
03525   }
03526   const WalkSidewaysMessage *m4 = dynamic_cast<const WalkSidewaysMessage *>(message);
03527   if ( m4 != NULL ) {
03528     return true;
03529   }
03530   const WalkArcMessage *m5 = dynamic_cast<const WalkArcMessage *>(message);
03531   if ( m5 != NULL ) {
03532     return true;
03533   }
03534   const TurnMessage *m6 = dynamic_cast<const TurnMessage *>(message);
03535   if ( m6 != NULL ) {
03536     return true;
03537   }
03538   const KickMessage *m7 = dynamic_cast<const KickMessage *>(message);
03539   if ( m7 != NULL ) {
03540     return true;
03541   }
03542   const ParkMessage *m8 = dynamic_cast<const ParkMessage *>(message);
03543   if ( m8 != NULL ) {
03544     return true;
03545   }
03546   const GetUpMessage *m9 = dynamic_cast<const GetUpMessage *>(message);
03547   if ( m9 != NULL ) {
03548     return true;
03549   }
03550   const StandupMessage *m10 = dynamic_cast<const StandupMessage *>(message);
03551   if ( m10 != NULL ) {
03552     return true;
03553   }
03554   const YawPitchHeadMessage *m11 = dynamic_cast<const YawPitchHeadMessage *>(message);
03555   if ( m11 != NULL ) {
03556     return true;
03557   }
03558   const SetStiffnessParamsMessage *m12 = dynamic_cast<const SetStiffnessParamsMessage *>(message);
03559   if ( m12 != NULL ) {
03560     return true;
03561   }
03562   return false;
03563 }
03564 
03565 /// @cond INTERNALS
03566 EXPORT_INTERFACE(HumanoidMotionInterface)
03567 /// @endcond
03568 
03569 
03570 } // end namespace fawkes