next up previous contents index
Next: Positioning Functions Up: The Robot Previous: Setup Functions

Structure Functions

These are functions to get information about the robot structure.



unsigned int number_of_legs (t_robot *r)
 

Returns the number of legs of the robot.



unsigned int right_leg_of (unsigned int n,t_robot *r)
 

Returns the number of the leg that is at the right of leg n or, what is the same, the leg that is next to leg n anti-clockwise (from a top view of the robot).



unsigned int left_leg_of (unsigned int n,t_robot *r)
 

Returns the number of the leg that is at the left (i.e., next clockwise) of leg n.



Josep M. Porta Pleite
8/2/2000