summaryrefslogtreecommitdiff
path: root/src/WalkAnimation.java
blob: 33cbce1a68be4fa10b5a27f48d6138220818d3ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

/**
 * Provides details for animating a walk.
 *
 * @author Peter Wu
 */
interface WalkAnimation {

    /**
     * Sets the new position for the robot.
     *
     * @param pos Position in meters.
     */
    void updatePosition(double pos);

    /**
     * Finds the angle between the left upper leg and the rotated upper leg. If
     * the robot does not move, the angle is probably 0. When the leg is
     * positioned behind the robot, the angle is negative. Similarly, when the
     * robot is positioned forward, the angle is positive.
     *
     * @return angle in degrees.
     */
    public double getLegAngleLeft();

    /**
     * Finds the angle between the right upper leg and the rotated upper leg. If
     * the robot does not move, the angle is probably 0. When the leg is
     * positioned behind the robot, the angle is negative. Similarly, when the
     * robot is positioned forward, the angle is positive.
     *
     * @return angle in degrees.
     */
    public double getLegAngleRight();

    /**
     * Finds the angle behind the left knee.
     *
     * @return angle in degrees.
     */
    public double getKneeAngleLeft();

    /**
     * Finds the angle behind the right knee.
     *
     * @return angle in degrees.
     */
    public double getKneeAngleRight();

    /**
     * Finds the angle between the left arm and the rotated arm. Similar to
     * <code>getLegAngleLeft()</code>.
     *
     * @return angle in degrees.
     */
    public double getArmAngleLeft();

    /**
     * Finds the angle between the right arm and the rotated arm. Similar to
     * <code>getLegAngleRight()</code>.
     *
     * @return angle in degrees.
     */
    public double getArmAngleRight();

    /**
     * Finds the distance between the floor and the bottom of the body.
     *
     * @return A distance in meters.
     */
    public double getBottomOffset();
}