Run main.py to control the robot using a game controller
Run joystick_test.py to test the game controller and obtain button index
Run Yuna.py to watch yuna controlled by a series of commands
Run Yuna_TrajPlanner.py to visualise thetrajectory of one foot
^^ Front ^^
1 ----- 2 +x
| ^
3 ----- 4 | <-╮+yaw
| +y <--o
5 ----- 6 +z
-
step()- parameters:
-
step_len : float
Stride length (in metre) that robot will move every step, but the robot will not always move the exact distance, it also depends on the previous commands, here are some exceptions:- When robot is in initial position, the robot will move
stride/2to start walking - When
stride==0, and robot is in the process of walking, the robot will step anotherstride/2to recover to initial position The value is clipped in[-0.2, 0.2]to avoid collision, but the positive value is encouraged for a more intuitive control
- When robot is in initial position, the robot will move
-
course : float
Moving direction (in degree) the robot will move to -
rotation : floatAngle (in degree) that robot body will rotate every step, positive for counter-clock wise and negetive for clock wise, but the robot will not always rotate the exact angle, it also depends on the previous commands, here are some exceptions:- When robot is in initial position, the robot will rotate
rotation/2to start turning - When rotation==0, and the robot is in the process of turning, the robot will turn another
rotation/2angle to recover to initial position The value is clipped in [-20, 20] to avoid collision
- When robot is in initial position, the robot will rotate
-
step : int
Steps robot will move, the step for starting is counted. If the robot directly changes the maneuvering mode (e.g. turning -> walking) without executing the stop() funtion, the robot will automatically insert the stop() in between and this step is not counted
-
- parameters:
-
stop()
By executing this, the robot will do an extra step to recover to the initial standing pose, if robot is already standing still, the robot will do nothing
The pose refers to the tripod position and orientation with respect to the robot body frame. The frame that is rigidly attached to the centre of the tripod can be called a Task Coordinate. For the tripod gait, 3 legs share the same task coordinate, but for other gait patterns, each leg may have different task coordinates.
The overall pose matrix for the robot is a 4 by 6 numpy array, with each column stores the relative pose of each leg's task coordination, and 4 rows stands for relative np.zeros((4,6)). In the process of robot motion, the origin of the task coordination does the translational movement and the frame does the rotational movement about its z-axis
