next up previous contents index
Next: Structure Functions Up: The Robot Previous: The Object

Setup Functions

These are function to set the global parameters of the robot.



void robot_load (char *filename,t_robot *r)
 

This function loads a robot definition from a file named filename. Robots are described with the syntax defined int section 2.2.3. If the file does not exists, nothing is done. If it do not correspond to a correct robot description then the simulator stop its execution. Once loaded, the robot is put in its reset position (setting all angles to zero). If necessary, the ground shape is modified so that the robot touches the ground with all legs standing in the reset position.



void set_friction (boolean friction,t_robot *r)
 

This function allow to enable (friction=TRUE) or disable (friction=FALSE) the friction of legs. Without friction the robot body can not be propelled. This mode can be useful when positioning the robot.

The type boolean and the constants TRUE and FALSE are defined in the file boolean.h provided with the simulator source.    



Josep M. Porta Pleite
8/2/2000