Example #1
0
    def get_walk_trajectory_three_positions(
            self, is_swing_leg_left, step_length,
            current_position_relative_to_initial_foot_position):
        """
        when ``step_length`` can be set to half step length, the robot only take half step.
        """

        ratio = step_length / self.step_length

        walk_trajectory = WalkTrajectory(self.hip_offset,
                                         self.lift_off_slope / ratio,
                                         self.step_height, step_length,
                                         self.put_down_slope / ratio)

        lift_up_front_position = walk_trajectory.get_lift_front_position(
            is_left=is_swing_leg_left,
            foot_position_relative_to=
            current_position_relative_to_initial_foot_position)

        lift_up_front_forward_position = walk_trajectory.get_lift_up_front_forward_position(
            lift_up_front_position)

        put_down_position = walk_trajectory.get_put_down_position(
            lift_up_front_forward_position)

        return lift_up_front_position, lift_up_front_forward_position, put_down_position
    def get_walk_trajectory_three_positions(self, is_swing_leg_left, step_length, current_position_relative_to_initial_foot_position):
        """
        when ``step_length`` can be set to half step length, the robot only take half step.
        """

        ratio = step_length / self.step_length

        walk_trajectory = WalkTrajectory(self.hip_offset, self.lift_off_slope / ratio, self.step_height, step_length, self.put_down_slope / ratio)

        lift_up_front_position = walk_trajectory.get_lift_front_position(is_left=is_swing_leg_left, foot_position_relative_to=current_position_relative_to_initial_foot_position)

        lift_up_front_forward_position = walk_trajectory.get_lift_up_front_forward_position(lift_up_front_position)

        put_down_position = walk_trajectory.get_put_down_position(lift_up_front_forward_position)

        return lift_up_front_position, lift_up_front_forward_position, put_down_position
Example #3
0
    def _get_support_lower_limp_angles(self, is_support_leg_left,
                                       swing_leg_foot_position):
        opposite_ground_position = WalkTrajectory.project_to_opposite_ground(
            Point(swing_leg_foot_position), is_left=is_support_leg_left)
        support_lower_limp_angles = self._get_one_lower_limp_angles__with__both_tilted_torso_and_hip_offset_effect(
            opposite_ground_position, is_left=is_support_leg_left)

        return support_lower_limp_angles
    def _get_support_lower_limp_angles(self, is_support_leg_left, swing_leg_foot_position):
        opposite_ground_position = WalkTrajectory.project_to_opposite_ground(Point(swing_leg_foot_position), is_left=is_support_leg_left)
        support_lower_limp_angles = self._get_one_lower_limp_angles__with__both_tilted_torso_and_hip_offset_effect(opposite_ground_position, is_left=is_support_leg_left)

        return support_lower_limp_angles