Fawkes API  Fawkes Development Version
HumanoidMotionInterface.h
00001 
00002 /***************************************************************************
00003  *  HumanoidMotionInterface.h - 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 #ifndef __INTERFACES_HUMANOIDMOTIONINTERFACE_H_
00025 #define __INTERFACES_HUMANOIDMOTIONINTERFACE_H_
00026 
00027 #include <interface/interface.h>
00028 #include <interface/message.h>
00029 #include <interface/field_iterator.h>
00030 
00031 namespace fawkes {
00032 
00033 class HumanoidMotionInterface : public Interface
00034 {
00035  /// @cond INTERNALS
00036  INTERFACE_MGMT_FRIENDS(HumanoidMotionInterface)
00037  /// @endcond
00038  public:
00039   /* constants */
00040 
00041   /** Type to determinate leg side. */
00042   typedef enum {
00043     LEG_LEFT /**< Left leg. */,
00044     LEG_RIGHT /**< Right leg. */
00045   } LegEnum;
00046   const char * tostring_LegEnum(LegEnum value) const;
00047 
00048   /** From which position to standup. */
00049   typedef enum {
00050     STANDUP_DETECT /**< Detect via accelerometer. */,
00051     STANDUP_BACK /**< Standup from lying on the back. */,
00052     STANDUP_FRONT /**< Standup from lying on the tummy. */
00053   } StandupEnum;
00054   const char * tostring_StandupEnum(StandupEnum value) const;
00055 
00056   /** The motion patterns that need specific stiffness settings */
00057   typedef enum {
00058     WALK /**< The walk pattern */,
00059     KICK /**< The kick pattern */
00060   } StiffnessMotionPatternEnum;
00061   const char * tostring_StiffnessMotionPatternEnum(StiffnessMotionPatternEnum value) const;
00062 
00063  private:
00064 #pragma pack(push,4)
00065   /** Internal data storage, do NOT modify! */
00066   typedef struct {
00067     int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
00068     int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
00069     bool walking; /**< True if the robot is currently moving. */
00070     LegEnum supporting_leg; /**< Marks the supporting leg */
00071     float max_step_length; /**< 
00072       Maximum length of a footstep in m.
00073      */
00074     float max_step_height; /**< 
00075       Maxium height of a footstep cycloid in m.
00076      */
00077     float max_step_side; /**< 
00078       Maximum length of side step in m.
00079      */
00080     float max_step_turn; /**< 
00081       Maximum change around vertical axis on radians per footstep.
00082      */
00083     float zmp_offset_forward; /**< 
00084       Zero moment point offset in forward direction in m.
00085      */
00086     float zmp_offset_sideward; /**< 
00087       Zero moment point offset in sideward direction in m.
00088      */
00089     float l_hip_roll_compensation; /**< 
00090       Amplitude in degrees of backlash compensation for left hip roll.
00091       This is fitted to the Nao and is possibly not applicable to other robots.
00092      */
00093     float r_hip_roll_compensation; /**< 
00094       Amplitude in degrees of backlash compensation for left hip roll.
00095       This is fitted to the Nao and is possibly not applicable to other robots.
00096      */
00097     float hip_height; /**< 
00098       Height of hip during walk process.
00099       This is fitted to the Nao and is possibly not applicable to other robots.
00100      */
00101     float torso_sideward_orientation; /**< 
00102       Torso orientation in degrees in sideward direction during walking.
00103       This is fitted to the Nao and is possibly not applicable to other robots.
00104      */
00105     bool arms_enabled; /**< 
00106       If true the arms are controlled during walking for balancing.
00107      */
00108     float shoulder_pitch_median; /**< 
00109       Median in radians of the shoulder pitch during walking.
00110      */
00111     float shoulder_pitch_amplitude; /**< 
00112       Amplitude of the shoulder pitch movement during walking.
00113      */
00114     float elbow_roll_median; /**< 
00115       Median in radians of the elbow roll during walking.
00116      */
00117     float elbow_roll_amplitude; /**< 
00118       Amplitude of the elbow roll movement during walking.
00119      */
00120     uint32_t msgid; /**< 
00121       The ID of the message that is currently being
00122       processed, or 0 if no message is being processed.
00123      */
00124   } HumanoidMotionInterface_data_t;
00125 #pragma pack(pop)
00126 
00127   HumanoidMotionInterface_data_t *data;
00128 
00129  public:
00130   /* messages */
00131   class SetWalkParamsMessage : public Message
00132   {
00133    private:
00134 #pragma pack(push,4)
00135     /** Internal data storage, do NOT modify! */
00136     typedef struct {
00137       int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
00138       int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
00139       float max_step_length; /**< 
00140       Maximum length of a footstep in m.
00141      */
00142       float max_step_height; /**< 
00143       Maxium height of a footstep cycloid in m.
00144      */
00145       float max_step_side; /**< 
00146       Maximum length of side step in m.
00147      */
00148       float max_step_turn; /**< 
00149       Maximum change around vertical axis on radians per footstep.
00150      */
00151       float zmp_offset_forward; /**< 
00152       Zero moment point offset in forward direction in m.
00153      */
00154       float zmp_offset_sideward; /**< 
00155       Zero moment point offset in sideward direction in m.
00156      */
00157       float l_hip_roll_compensation; /**< 
00158       Amplitude in degrees of backlash compensation for left hip roll.
00159       This is fitted to the Nao and is possibly not applicable to other robots.
00160      */
00161       float r_hip_roll_compensation; /**< 
00162       Amplitude in degrees of backlash compensation for left hip roll.
00163       This is fitted to the Nao and is possibly not applicable to other robots.
00164      */
00165       float hip_height; /**< 
00166       Height of hip during walk process.
00167       This is fitted to the Nao and is possibly not applicable to other robots.
00168      */
00169       float torso_sideward_orientation; /**< 
00170       Torso orientation in degrees in sideward direction during walking.
00171       This is fitted to the Nao and is possibly not applicable to other robots.
00172      */
00173     } SetWalkParamsMessage_data_t;
00174 #pragma pack(pop)
00175 
00176     SetWalkParamsMessage_data_t *data;
00177 
00178    public:
00179     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);
00180     SetWalkParamsMessage();
00181     ~SetWalkParamsMessage();
00182 
00183     SetWalkParamsMessage(const SetWalkParamsMessage *m);
00184     /* Methods */
00185     float max_step_length() const;
00186     void set_max_step_length(const float new_max_step_length);
00187     size_t maxlenof_max_step_length() const;
00188     float max_step_height() const;
00189     void set_max_step_height(const float new_max_step_height);
00190     size_t maxlenof_max_step_height() const;
00191     float max_step_side() const;
00192     void set_max_step_side(const float new_max_step_side);
00193     size_t maxlenof_max_step_side() const;
00194     float max_step_turn() const;
00195     void set_max_step_turn(const float new_max_step_turn);
00196     size_t maxlenof_max_step_turn() const;
00197     float zmp_offset_forward() const;
00198     void set_zmp_offset_forward(const float new_zmp_offset_forward);
00199     size_t maxlenof_zmp_offset_forward() const;
00200     float zmp_offset_sideward() const;
00201     void set_zmp_offset_sideward(const float new_zmp_offset_sideward);
00202     size_t maxlenof_zmp_offset_sideward() const;
00203     float l_hip_roll_compensation() const;
00204     void set_l_hip_roll_compensation(const float new_l_hip_roll_compensation);
00205     size_t maxlenof_l_hip_roll_compensation() const;
00206     float r_hip_roll_compensation() const;
00207     void set_r_hip_roll_compensation(const float new_r_hip_roll_compensation);
00208     size_t maxlenof_r_hip_roll_compensation() const;
00209     float hip_height() const;
00210     void set_hip_height(const float new_hip_height);
00211     size_t maxlenof_hip_height() const;
00212     float torso_sideward_orientation() const;
00213     void set_torso_sideward_orientation(const float new_torso_sideward_orientation);
00214     size_t maxlenof_torso_sideward_orientation() const;
00215     virtual Message * clone() const;
00216   };
00217 
00218   class SetWalkArmsParamsMessage : public Message
00219   {
00220    private:
00221 #pragma pack(push,4)
00222     /** Internal data storage, do NOT modify! */
00223     typedef struct {
00224       int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
00225       int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
00226       bool arms_enabled; /**< 
00227       If true the arms are controlled during walking for balancing.
00228      */
00229       float shoulder_pitch_median; /**< 
00230       Median in radians of the shoulder pitch during walking.
00231      */
00232       float shoulder_pitch_amplitude; /**< 
00233       Amplitude of the shoulder pitch movement during walking.
00234      */
00235       float elbow_roll_median; /**< 
00236       Median in radians of the elbow roll during walking.
00237      */
00238       float elbow_roll_amplitude; /**< 
00239       Amplitude of the elbow roll movement during walking.
00240      */
00241     } SetWalkArmsParamsMessage_data_t;
00242 #pragma pack(pop)
00243 
00244     SetWalkArmsParamsMessage_data_t *data;
00245 
00246    public:
00247     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);
00248     SetWalkArmsParamsMessage();
00249     ~SetWalkArmsParamsMessage();
00250 
00251     SetWalkArmsParamsMessage(const SetWalkArmsParamsMessage *m);
00252     /* Methods */
00253     bool is_arms_enabled() const;
00254     void set_arms_enabled(const bool new_arms_enabled);
00255     size_t maxlenof_arms_enabled() const;
00256     float shoulder_pitch_median() const;
00257     void set_shoulder_pitch_median(const float new_shoulder_pitch_median);
00258     size_t maxlenof_shoulder_pitch_median() const;
00259     float shoulder_pitch_amplitude() const;
00260     void set_shoulder_pitch_amplitude(const float new_shoulder_pitch_amplitude);
00261     size_t maxlenof_shoulder_pitch_amplitude() const;
00262     float elbow_roll_median() const;
00263     void set_elbow_roll_median(const float new_elbow_roll_median);
00264     size_t maxlenof_elbow_roll_median() const;
00265     float elbow_roll_amplitude() const;
00266     void set_elbow_roll_amplitude(const float new_elbow_roll_amplitude);
00267     size_t maxlenof_elbow_roll_amplitude() const;
00268     virtual Message * clone() const;
00269   };
00270 
00271   class StopMessage : public Message
00272   {
00273    private:
00274 #pragma pack(push,4)
00275     /** Internal data storage, do NOT modify! */
00276     typedef struct {
00277       int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
00278       int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
00279     } StopMessage_data_t;
00280 #pragma pack(pop)
00281 
00282     StopMessage_data_t *data;
00283 
00284    public:
00285     StopMessage();
00286     ~StopMessage();
00287 
00288     StopMessage(const StopMessage *m);
00289     /* Methods */
00290     virtual Message * clone() const;
00291   };
00292 
00293   class WalkStraightMessage : public Message
00294   {
00295    private:
00296 #pragma pack(push,4)
00297     /** Internal data storage, do NOT modify! */
00298     typedef struct {
00299       int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
00300       int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
00301       float distance; /**< Distance in m to walk. */
00302       uint32_t num_samples; /**< 
00303       Number of intermediate samples to use for walking.
00304      */
00305     } WalkStraightMessage_data_t;
00306 #pragma pack(pop)
00307 
00308     WalkStraightMessage_data_t *data;
00309 
00310    public:
00311     WalkStraightMessage(const float ini_distance, const uint32_t ini_num_samples);
00312     WalkStraightMessage();
00313     ~WalkStraightMessage();
00314 
00315     WalkStraightMessage(const WalkStraightMessage *m);
00316     /* Methods */
00317     float distance() const;
00318     void set_distance(const float new_distance);
00319     size_t maxlenof_distance() const;
00320     uint32_t num_samples() const;
00321     void set_num_samples(const uint32_t new_num_samples);
00322     size_t maxlenof_num_samples() const;
00323     virtual Message * clone() const;
00324   };
00325 
00326   class WalkSidewaysMessage : public Message
00327   {
00328    private:
00329 #pragma pack(push,4)
00330     /** Internal data storage, do NOT modify! */
00331     typedef struct {
00332       int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
00333       int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
00334       float distance; /**< Distance in m to walk. */
00335       uint32_t num_samples; /**< 
00336       Number of intermediate samples to use for strafing.
00337      */
00338     } WalkSidewaysMessage_data_t;
00339 #pragma pack(pop)
00340 
00341     WalkSidewaysMessage_data_t *data;
00342 
00343    public:
00344     WalkSidewaysMessage(const float ini_distance, const uint32_t ini_num_samples);
00345     WalkSidewaysMessage();
00346     ~WalkSidewaysMessage();
00347 
00348     WalkSidewaysMessage(const WalkSidewaysMessage *m);
00349     /* Methods */
00350     float distance() const;
00351     void set_distance(const float new_distance);
00352     size_t maxlenof_distance() const;
00353     uint32_t num_samples() const;
00354     void set_num_samples(const uint32_t new_num_samples);
00355     size_t maxlenof_num_samples() const;
00356     virtual Message * clone() const;
00357   };
00358 
00359   class WalkArcMessage : public Message
00360   {
00361    private:
00362 #pragma pack(push,4)
00363     /** Internal data storage, do NOT modify! */
00364     typedef struct {
00365       int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
00366       int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
00367       float angle; /**< Angle in radians to turn over the way. */
00368       float radius; /**< Radius in m of the circle in m. */
00369       uint32_t num_samples; /**< 
00370       Number of intermediate samples to use for walking.
00371      */
00372     } WalkArcMessage_data_t;
00373 #pragma pack(pop)
00374 
00375     WalkArcMessage_data_t *data;
00376 
00377    public:
00378     WalkArcMessage(const float ini_angle, const float ini_radius, const uint32_t ini_num_samples);
00379     WalkArcMessage();
00380     ~WalkArcMessage();
00381 
00382     WalkArcMessage(const WalkArcMessage *m);
00383     /* Methods */
00384     float angle() const;
00385     void set_angle(const float new_angle);
00386     size_t maxlenof_angle() const;
00387     float radius() const;
00388     void set_radius(const float new_radius);
00389     size_t maxlenof_radius() const;
00390     uint32_t num_samples() const;
00391     void set_num_samples(const uint32_t new_num_samples);
00392     size_t maxlenof_num_samples() const;
00393     virtual Message * clone() const;
00394   };
00395 
00396   class WalkMessage : public Message
00397   {
00398    private:
00399 #pragma pack(push,4)
00400     /** Internal data storage, do NOT modify! */
00401     typedef struct {
00402       int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
00403       int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
00404       float x; /**< Fraction of MaxStepX. Use negative for backwards. [-1.0 to 1.0] */
00405       float y; /**< Fraction of MaxStepY. Use negative for right. [-1.0 to 1.0] */
00406       float theta; /**< Fraction of MaxStepTheta. Use negative for clockwise [-1.0 to 1.0] */
00407       float speed; /**< Fraction of MaxStepFrequency [0.0 to 1.0] */
00408     } WalkMessage_data_t;
00409 #pragma pack(pop)
00410 
00411     WalkMessage_data_t *data;
00412 
00413    public:
00414     WalkMessage(const float ini_x, const float ini_y, const float ini_theta, const float ini_speed);
00415     WalkMessage();
00416     ~WalkMessage();
00417 
00418     WalkMessage(const WalkMessage *m);
00419     /* Methods */
00420     float x() const;
00421     void set_x(const float new_x);
00422     size_t maxlenof_x() const;
00423     float y() const;
00424     void set_y(const float new_y);
00425     size_t maxlenof_y() const;
00426     float theta() const;
00427     void set_theta(const float new_theta);
00428     size_t maxlenof_theta() const;
00429     float speed() const;
00430     void set_speed(const float new_speed);
00431     size_t maxlenof_speed() const;
00432     virtual Message * clone() const;
00433   };
00434 
00435   class TurnMessage : public Message
00436   {
00437    private:
00438 #pragma pack(push,4)
00439     /** Internal data storage, do NOT modify! */
00440     typedef struct {
00441       int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
00442       int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
00443       float angle; /**< Angle in radians to turn. */
00444       uint32_t num_samples; /**< 
00445       Number of intermediate samples to use for turning.
00446      */
00447     } TurnMessage_data_t;
00448 #pragma pack(pop)
00449 
00450     TurnMessage_data_t *data;
00451 
00452    public:
00453     TurnMessage(const float ini_angle, const uint32_t ini_num_samples);
00454     TurnMessage();
00455     ~TurnMessage();
00456 
00457     TurnMessage(const TurnMessage *m);
00458     /* Methods */
00459     float angle() const;
00460     void set_angle(const float new_angle);
00461     size_t maxlenof_angle() const;
00462     uint32_t num_samples() const;
00463     void set_num_samples(const uint32_t new_num_samples);
00464     size_t maxlenof_num_samples() const;
00465     virtual Message * clone() const;
00466   };
00467 
00468   class KickMessage : public Message
00469   {
00470    private:
00471 #pragma pack(push,4)
00472     /** Internal data storage, do NOT modify! */
00473     typedef struct {
00474       int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
00475       int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
00476       LegEnum leg; /**< Leg to kick with */
00477       float strength; /**< Kick strength */
00478     } KickMessage_data_t;
00479 #pragma pack(pop)
00480 
00481     KickMessage_data_t *data;
00482 
00483    public:
00484     KickMessage(const LegEnum ini_leg, const float ini_strength);
00485     KickMessage();
00486     ~KickMessage();
00487 
00488     KickMessage(const KickMessage *m);
00489     /* Methods */
00490     LegEnum leg() const;
00491     void set_leg(const LegEnum new_leg);
00492     size_t maxlenof_leg() const;
00493     float strength() const;
00494     void set_strength(const float new_strength);
00495     size_t maxlenof_strength() const;
00496     virtual Message * clone() const;
00497   };
00498 
00499   class ParkMessage : public Message
00500   {
00501    private:
00502 #pragma pack(push,4)
00503     /** Internal data storage, do NOT modify! */
00504     typedef struct {
00505       int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
00506       int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
00507       float time_sec; /**< Time in seconds when to reach the position. */
00508     } ParkMessage_data_t;
00509 #pragma pack(pop)
00510 
00511     ParkMessage_data_t *data;
00512 
00513    public:
00514     ParkMessage(const float ini_time_sec);
00515     ParkMessage();
00516     ~ParkMessage();
00517 
00518     ParkMessage(const ParkMessage *m);
00519     /* Methods */
00520     float time_sec() const;
00521     void set_time_sec(const float new_time_sec);
00522     size_t maxlenof_time_sec() const;
00523     virtual Message * clone() const;
00524   };
00525 
00526   class GetUpMessage : public Message
00527   {
00528    private:
00529 #pragma pack(push,4)
00530     /** Internal data storage, do NOT modify! */
00531     typedef struct {
00532       int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
00533       int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
00534       float time_sec; /**< Time in seconds when to reach the position. */
00535     } GetUpMessage_data_t;
00536 #pragma pack(pop)
00537 
00538     GetUpMessage_data_t *data;
00539 
00540    public:
00541     GetUpMessage(const float ini_time_sec);
00542     GetUpMessage();
00543     ~GetUpMessage();
00544 
00545     GetUpMessage(const GetUpMessage *m);
00546     /* Methods */
00547     float time_sec() const;
00548     void set_time_sec(const float new_time_sec);
00549     size_t maxlenof_time_sec() const;
00550     virtual Message * clone() const;
00551   };
00552 
00553   class StandupMessage : public Message
00554   {
00555    private:
00556 #pragma pack(push,4)
00557     /** Internal data storage, do NOT modify! */
00558     typedef struct {
00559       int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
00560       int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
00561       StandupEnum from_pos; /**< Position from where to standup. */
00562     } StandupMessage_data_t;
00563 #pragma pack(pop)
00564 
00565     StandupMessage_data_t *data;
00566 
00567    public:
00568     StandupMessage(const StandupEnum ini_from_pos);
00569     StandupMessage();
00570     ~StandupMessage();
00571 
00572     StandupMessage(const StandupMessage *m);
00573     /* Methods */
00574     StandupEnum from_pos() const;
00575     void set_from_pos(const StandupEnum new_from_pos);
00576     size_t maxlenof_from_pos() const;
00577     virtual Message * clone() const;
00578   };
00579 
00580   class YawPitchHeadMessage : public Message
00581   {
00582    private:
00583 #pragma pack(push,4)
00584     /** Internal data storage, do NOT modify! */
00585     typedef struct {
00586       int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
00587       int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
00588       float yaw; /**< Desired yaw (horizontal orientation). */
00589       float pitch; /**< Desired pitch (vertical orientation). */
00590       float time_sec; /**< Time in seconds when to reach the target. */
00591     } YawPitchHeadMessage_data_t;
00592 #pragma pack(pop)
00593 
00594     YawPitchHeadMessage_data_t *data;
00595 
00596    public:
00597     YawPitchHeadMessage(const float ini_yaw, const float ini_pitch, const float ini_time_sec);
00598     YawPitchHeadMessage();
00599     ~YawPitchHeadMessage();
00600 
00601     YawPitchHeadMessage(const YawPitchHeadMessage *m);
00602     /* Methods */
00603     float yaw() const;
00604     void set_yaw(const float new_yaw);
00605     size_t maxlenof_yaw() const;
00606     float pitch() const;
00607     void set_pitch(const float new_pitch);
00608     size_t maxlenof_pitch() const;
00609     float time_sec() const;
00610     void set_time_sec(const float new_time_sec);
00611     size_t maxlenof_time_sec() const;
00612     virtual Message * clone() const;
00613   };
00614 
00615   class SetStiffnessParamsMessage : public Message
00616   {
00617    private:
00618 #pragma pack(push,4)
00619     /** Internal data storage, do NOT modify! */
00620     typedef struct {
00621       int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
00622       int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
00623       StiffnessMotionPatternEnum motion_pattern; /**< the motion pattern to update */
00624       float head_yaw; /**< head_yaw */
00625       float head_pitch; /**< head_pitch */
00626       float l_shoulder_pitch; /**< l_shoulder_pitch */
00627       float l_shoulder_roll; /**< l_shoulder_roll */
00628       float l_elbow_yaw; /**< l_elbow_yaw */
00629       float l_elbow_roll; /**< l_elbow_roll */
00630       float l_hip_yaw_pitch; /**< l_hip_yaw_pitch */
00631       float l_hip_roll; /**< l_hip_roll */
00632       float l_hip_pitch; /**< l_hip_pitch */
00633       float l_knee_pitch; /**< l_knee_pitch */
00634       float l_ankle_pitch; /**< l_ankle_pitch */
00635       float l_ankle_roll; /**< l_ankle_roll */
00636       float r_hip_yaw_pitch; /**< r_hip_yaw_pitch */
00637       float r_hip_roll; /**< r_hip_roll */
00638       float r_hip_pitch; /**< r_hip_pitch */
00639       float r_knee_pitch; /**< r_knee_pitch */
00640       float r_ankle_pitch; /**< r_ankle_pitch */
00641       float r_ankle_roll; /**< r_ankle_roll */
00642       float r_shoulder_pitch; /**< r_shoulder_pitch */
00643       float r_shoulder_roll; /**< r_shoulder_roll */
00644       float r_elbow_yaw; /**< r_elbow_yaw */
00645       float r_elbow_roll; /**< r_elbow_roll */
00646     } SetStiffnessParamsMessage_data_t;
00647 #pragma pack(pop)
00648 
00649     SetStiffnessParamsMessage_data_t *data;
00650 
00651    public:
00652     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);
00653     SetStiffnessParamsMessage();
00654     ~SetStiffnessParamsMessage();
00655 
00656     SetStiffnessParamsMessage(const SetStiffnessParamsMessage *m);
00657     /* Methods */
00658     StiffnessMotionPatternEnum motion_pattern() const;
00659     void set_motion_pattern(const StiffnessMotionPatternEnum new_motion_pattern);
00660     size_t maxlenof_motion_pattern() const;
00661     float head_yaw() const;
00662     void set_head_yaw(const float new_head_yaw);
00663     size_t maxlenof_head_yaw() const;
00664     float head_pitch() const;
00665     void set_head_pitch(const float new_head_pitch);
00666     size_t maxlenof_head_pitch() const;
00667     float l_shoulder_pitch() const;
00668     void set_l_shoulder_pitch(const float new_l_shoulder_pitch);
00669     size_t maxlenof_l_shoulder_pitch() const;
00670     float l_shoulder_roll() const;
00671     void set_l_shoulder_roll(const float new_l_shoulder_roll);
00672     size_t maxlenof_l_shoulder_roll() const;
00673     float l_elbow_yaw() const;
00674     void set_l_elbow_yaw(const float new_l_elbow_yaw);
00675     size_t maxlenof_l_elbow_yaw() const;
00676     float l_elbow_roll() const;
00677     void set_l_elbow_roll(const float new_l_elbow_roll);
00678     size_t maxlenof_l_elbow_roll() const;
00679     float l_hip_yaw_pitch() const;
00680     void set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch);
00681     size_t maxlenof_l_hip_yaw_pitch() const;
00682     float l_hip_roll() const;
00683     void set_l_hip_roll(const float new_l_hip_roll);
00684     size_t maxlenof_l_hip_roll() const;
00685     float l_hip_pitch() const;
00686     void set_l_hip_pitch(const float new_l_hip_pitch);
00687     size_t maxlenof_l_hip_pitch() const;
00688     float l_knee_pitch() const;
00689     void set_l_knee_pitch(const float new_l_knee_pitch);
00690     size_t maxlenof_l_knee_pitch() const;
00691     float l_ankle_pitch() const;
00692     void set_l_ankle_pitch(const float new_l_ankle_pitch);
00693     size_t maxlenof_l_ankle_pitch() const;
00694     float l_ankle_roll() const;
00695     void set_l_ankle_roll(const float new_l_ankle_roll);
00696     size_t maxlenof_l_ankle_roll() const;
00697     float r_hip_yaw_pitch() const;
00698     void set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch);
00699     size_t maxlenof_r_hip_yaw_pitch() const;
00700     float r_hip_roll() const;
00701     void set_r_hip_roll(const float new_r_hip_roll);
00702     size_t maxlenof_r_hip_roll() const;
00703     float r_hip_pitch() const;
00704     void set_r_hip_pitch(const float new_r_hip_pitch);
00705     size_t maxlenof_r_hip_pitch() const;
00706     float r_knee_pitch() const;
00707     void set_r_knee_pitch(const float new_r_knee_pitch);
00708     size_t maxlenof_r_knee_pitch() const;
00709     float r_ankle_pitch() const;
00710     void set_r_ankle_pitch(const float new_r_ankle_pitch);
00711     size_t maxlenof_r_ankle_pitch() const;
00712     float r_ankle_roll() const;
00713     void set_r_ankle_roll(const float new_r_ankle_roll);
00714     size_t maxlenof_r_ankle_roll() const;
00715     float r_shoulder_pitch() const;
00716     void set_r_shoulder_pitch(const float new_r_shoulder_pitch);
00717     size_t maxlenof_r_shoulder_pitch() const;
00718     float r_shoulder_roll() const;
00719     void set_r_shoulder_roll(const float new_r_shoulder_roll);
00720     size_t maxlenof_r_shoulder_roll() const;
00721     float r_elbow_yaw() const;
00722     void set_r_elbow_yaw(const float new_r_elbow_yaw);
00723     size_t maxlenof_r_elbow_yaw() const;
00724     float r_elbow_roll() const;
00725     void set_r_elbow_roll(const float new_r_elbow_roll);
00726     size_t maxlenof_r_elbow_roll() const;
00727     virtual Message * clone() const;
00728   };
00729 
00730   virtual bool message_valid(const Message *message) const;
00731  private:
00732   HumanoidMotionInterface();
00733   ~HumanoidMotionInterface();
00734 
00735  public:
00736   /* Methods */
00737   bool is_walking() const;
00738   void set_walking(const bool new_walking);
00739   size_t maxlenof_walking() const;
00740   LegEnum supporting_leg() const;
00741   void set_supporting_leg(const LegEnum new_supporting_leg);
00742   size_t maxlenof_supporting_leg() const;
00743   float max_step_length() const;
00744   void set_max_step_length(const float new_max_step_length);
00745   size_t maxlenof_max_step_length() const;
00746   float max_step_height() const;
00747   void set_max_step_height(const float new_max_step_height);
00748   size_t maxlenof_max_step_height() const;
00749   float max_step_side() const;
00750   void set_max_step_side(const float new_max_step_side);
00751   size_t maxlenof_max_step_side() const;
00752   float max_step_turn() const;
00753   void set_max_step_turn(const float new_max_step_turn);
00754   size_t maxlenof_max_step_turn() const;
00755   float zmp_offset_forward() const;
00756   void set_zmp_offset_forward(const float new_zmp_offset_forward);
00757   size_t maxlenof_zmp_offset_forward() const;
00758   float zmp_offset_sideward() const;
00759   void set_zmp_offset_sideward(const float new_zmp_offset_sideward);
00760   size_t maxlenof_zmp_offset_sideward() const;
00761   float l_hip_roll_compensation() const;
00762   void set_l_hip_roll_compensation(const float new_l_hip_roll_compensation);
00763   size_t maxlenof_l_hip_roll_compensation() const;
00764   float r_hip_roll_compensation() const;
00765   void set_r_hip_roll_compensation(const float new_r_hip_roll_compensation);
00766   size_t maxlenof_r_hip_roll_compensation() const;
00767   float hip_height() const;
00768   void set_hip_height(const float new_hip_height);
00769   size_t maxlenof_hip_height() const;
00770   float torso_sideward_orientation() const;
00771   void set_torso_sideward_orientation(const float new_torso_sideward_orientation);
00772   size_t maxlenof_torso_sideward_orientation() const;
00773   bool is_arms_enabled() const;
00774   void set_arms_enabled(const bool new_arms_enabled);
00775   size_t maxlenof_arms_enabled() const;
00776   float shoulder_pitch_median() const;
00777   void set_shoulder_pitch_median(const float new_shoulder_pitch_median);
00778   size_t maxlenof_shoulder_pitch_median() const;
00779   float shoulder_pitch_amplitude() const;
00780   void set_shoulder_pitch_amplitude(const float new_shoulder_pitch_amplitude);
00781   size_t maxlenof_shoulder_pitch_amplitude() const;
00782   float elbow_roll_median() const;
00783   void set_elbow_roll_median(const float new_elbow_roll_median);
00784   size_t maxlenof_elbow_roll_median() const;
00785   float elbow_roll_amplitude() const;
00786   void set_elbow_roll_amplitude(const float new_elbow_roll_amplitude);
00787   size_t maxlenof_elbow_roll_amplitude() const;
00788   uint32_t msgid() const;
00789   void set_msgid(const uint32_t new_msgid);
00790   size_t maxlenof_msgid() const;
00791   virtual Message * create_message(const char *type) const;
00792 
00793   virtual void copy_values(const Interface *other);
00794   virtual const char * enum_tostring(const char *enumtype, int val) const;
00795 
00796 };
00797 
00798 } // end namespace fawkes
00799 
00800 #endif