本文整理汇总了C++中ALValue::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ ALValue::clear方法的具体用法?C++ ALValue::clear怎么用?C++ ALValue::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ALValue
的用法示例。
在下文中一共展示了ALValue::clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
/** Run the kick. */
void
NaoQiMotionKickTask::run()
{
const char *shoot_hip_roll_name = NULL;
const char *support_hip_roll_name = NULL;
const char *shoot_hip_pitch_name = NULL;
const char *support_hip_pitch_name = NULL;
const char *shoot_knee_pitch_name = NULL;
const char *shoot_ankle_pitch_name = NULL;
const char *shoot_ankle_roll_name = NULL;
const char *support_ankle_roll_name = NULL;
float shoot_hip_roll = 0;
float support_hip_roll = 0;
float shoot_hip_pitch = 0;
float support_hip_pitch = 0;
float shoot_knee_pitch = 0;
float shoot_ankle_pitch = 0;
float shoot_ankle_roll = 0;
float support_ankle_roll = 0;
float BALANCE_HIP_ROLL = 0;
float BALANCE_ANKLE_ROLL = 0;
float STRIKE_OUT_HIP_ROLL = 0;
if ( __leg == fawkes::HumanoidMotionInterface::LEG_LEFT ) {
shoot_hip_roll_name = "LHipRoll";
support_hip_roll_name = "RHipRoll";
shoot_hip_pitch_name = "LHipPitch";
support_hip_pitch_name = "RHipPitch";
shoot_knee_pitch_name = "LKneePitch";
shoot_ankle_pitch_name = "LAnklePitch";
shoot_ankle_roll_name = "LAnkleRoll";
support_ankle_roll_name = "RAnkleRoll";
BALANCE_HIP_ROLL = 20;
BALANCE_ANKLE_ROLL = -25;
STRIKE_OUT_HIP_ROLL = 30;
} else if (__leg == fawkes::HumanoidMotionInterface::LEG_RIGHT ) {
shoot_hip_roll_name = "RHipRoll";
support_hip_roll_name = "LHipRoll";
shoot_hip_pitch_name = "RHipPitch";
support_hip_pitch_name = "LHipPitch";
shoot_knee_pitch_name = "RKneePitch";
shoot_ankle_pitch_name = "RAnklePitch";
shoot_ankle_roll_name = "RAnkleRoll";
support_ankle_roll_name = "LAnkleRoll";
BALANCE_HIP_ROLL = -20;
BALANCE_ANKLE_ROLL = 25;
STRIKE_OUT_HIP_ROLL = -30;
}
if (__quit) return;
goto_start_pos(0.2);
ALValue names;
ALValue target_angles;
float speed = 0;
// Balance on supporting leg
names.arraySetSize(4);
target_angles.arraySetSize(4);
support_hip_roll = BALANCE_HIP_ROLL;
shoot_hip_roll = BALANCE_HIP_ROLL;
shoot_ankle_roll = BALANCE_ANKLE_ROLL;
support_ankle_roll = BALANCE_ANKLE_ROLL;
names = ALValue::array(support_hip_roll_name, shoot_hip_roll_name,
support_ankle_roll_name, shoot_ankle_roll_name);
target_angles = ALValue::array(deg2rad(support_hip_roll), deg2rad(shoot_hip_roll),
deg2rad(support_ankle_roll), deg2rad(shoot_ankle_roll));
speed = 0.15;
//if (__quit) return;
__almotion->angleInterpolationWithSpeed(names, target_angles, speed);
names.clear();
target_angles.clear();
// Raise shooting leg
names.arraySetSize(3);
target_angles.arraySetSize(3);
shoot_hip_roll = STRIKE_OUT_HIP_ROLL;
shoot_knee_pitch = 90;
shoot_ankle_pitch = -50;
names = ALValue::array(shoot_hip_roll_name, shoot_knee_pitch_name, shoot_ankle_pitch_name);
target_angles = ALValue::array(deg2rad(shoot_hip_roll), deg2rad(shoot_knee_pitch),
deg2rad(shoot_ankle_pitch));
speed = 0.2;
if (__quit) return;
__almotion->angleInterpolationWithSpeed(names, target_angles, speed);
names.clear();
target_angles.clear();
//.........这里部分代码省略.........