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