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