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