next up previous contents index
Next: Sensor Functions Up: The Robot Previous: Camera Control Functions

Execution Control Functions

Those functions allow to get information about the execution of robot's commands and to control them if necessary.



void update_robot (t_robot *r)
 

Execute all pending robot commands.



boolean blocked_leg (unsigned int leg,t_robot *r)
 

Returns TRUE if the last command received by the leg has tried to move it out of its workspace. When a new correct command is received, this function returns FALSE.



boolean all_gestures_executed (t_robot *r)
 

Returns TRUE if all the gestures commanded in the previous time slice have been correctly executed. A gesture is not executable if it tries to move any leg out of its workspace.



boolean all_executed (t_robot *r)
 

Returns TRUE if all commands send to the robot in the previous time slice have been correctly executed or, in other words, if no leg has been blocked.



boolean position_achieved (unsigned int leg,t_robot *r)
 

Returns TRUE when there is not any move_to command pending to be finished for the given leg.



void stop_leg (unsigned int leg,t_robot *r)
 

This function aborts the commands (set_leg_position, set_position, set_angle, exec_gesture) pending to be executed for a given leg.



void stop_robot (t_robot *r)
 

Avoid the execution of all pending robot commands as well as stops any on going command. This command not only step leg commands but also stops the commands send to the robot camera.


next up previous contents index
Next: Sensor Functions Up: The Robot Previous: Camera Control Functions
Josep M. Porta Pleite
8/2/2000