14     min_step_theta = -max_step_theta
    17     foot_box_r_fl = almath.Pose2D(0.11, 0.038, 0.0)
    18     foot_box_r_fr = almath.Pose2D(0.11, -0.050, 0.0)
    19     foot_box_r_rr = almath.Pose2D(-0.047, -0.050, 0.0)
    20     foot_box_r_rl = almath.Pose2D(-0.047, 0.038, 0.0)
    21     foot_box_r = almath.vectorPose2D([foot_box_r_fl, foot_box_r_fr,
    22                                       foot_box_r_rr, foot_box_r_rl])
    24     foot_box_l_fl = almath.Pose2D(0.11, 0.050, 0.0)
    25     foot_box_l_fr = almath.Pose2D(0.11, -0.038, 0.0)
    26     foot_box_l_rr = almath.Pose2D(-0.047, -0.038, 0.0)
    27     foot_box_l_rl = almath.Pose2D(-0.047,  0.050, 0.0)
    28     foot_box_l = almath.vectorPose2D([foot_box_l_fl, foot_box_l_fr,
    29                                       foot_box_l_rr, foot_box_l_rl])
    33     ''' Clip value between two extremes. '''    45     ''' Clip the foot move so that it does not exceed the maximum    47         foot is an almath.Pose2D (x, y, theta position).    48         is_left_support must be set to True if the move is on the right leg    49         (the robot is supporting itself on the left leg).    53     clipped_x = 
clip_data(Params.min_step_x, Params.max_step_x, foot.x)
    57     if not is_left_support:
    58         clipped_y = 
clip_data(Params.min_step_y, Params.max_step_y, foot.y)
    60         clipped_y = 
clip_data(-Params.max_step_y, -Params.min_step_y, foot.y)
    64     clipped_theta = 
clip_data(Params.min_step_theta, Params.max_step_theta, foot.theta)
    65     foot.theta = clipped_theta
    69     ''' Clip the foot move inside an ellipse defined by the foot's dimansions.    70         foot is an almath.Pose2D (x, y, theta position).    74     if (foot.y < -Params.min_step_y):
    75         foot.y = foot.y + Params.min_step_y
    76     elif (foot.y > Params.min_step_y):
    77         foot.y = foot.y - Params.min_step_y
    83         almath.clipFootWithEllipse(Params.max_step_x, Params.max_step_y - Params.min_step_y, foot)
    85         almath.clipFootWithEllipse(Params.min_step_x, Params.max_step_y - Params.min_step_y, foot)
    89         foot.y  = foot.y + Params.min_step_y
    91         foot.y = foot.y - Params.min_step_y
    95     ''' Clip the foot move to avoid collision with the other foot.    96         foot is an almath.Pose2D (x, y, theta position).    97         is_left_support must be set to True if the move is on the right leg    98         (the robot is supporting itself on the left leg).   102     almath.avoidFootCollision(Params.foot_box_l, Params.foot_box_r, is_left_support, foot)
   106     ''' Clipping functions to avoid any warnings and undesired effects   107         when sending the footsteps to ALMotion.   108         foot is an almath.Pose2D (x, y, theta position)   109         is_left_support must be set to True if the move is on the right leg   110         (the robot is supporting itself on the left leg).   123     Wrapper of clip_footstep to handle 'foot' as geometry_msgs.Pose2D.   124     'foot' is a tuple (x, y, theta). A tuple (x_clip, y_clip, theta_clip) is   128     foot = almath.Pose2D(*foot)
   130     return foot.x, foot.y, foot.theta