next up previous contents index
Next: Visualization Functions Up: The Robot Previous: Frame of Reference Conversion

Trace Functions

A trace is a polygonal line whose points can be defined by the user in successive time slices. A trace is drawn as a set of balls of the same color and size connected by lines. Traces are intended to monitor the displacement of any part of the robot. They can be used to mark the path followed by the robot, the future passing points for the robot, the turning centers of the robot path, the footholds used by a given leg,...



void start_trace (unsigned int n,char *name,double r g b,double size,t_robot *r)
 

Defines the parameters of the trace number n. In the current version of the simulator at most 10 different traces can be used. The parameters r, g, and b are doubles in the interval [0,1] that define the color of the ball of the trace. size refers to the ball radius. The name is the name that appears in the trace control window of the simulator on-line interface to refer to this trace.



void restart_trace (unsigned int n,t_robot *r)
 

Delete all the points of a trace but keeps the trace definition so that new points can be added to it.



void delete_trace (unsigned int n,t_robot *r)
 

Eliminates a given trace. Once deleted no more points can be added to a given trace.



boolean trace_defined (unsigned int n,t_robot *r)
 

Returns TRUE if trace number n is defined and point can be added to it.



void add_point (unsigned int n,double *position,t_robot *r)
 

Adds a point to a given trace. The point should be given in the world frame of reference.



void show_trace (unsigned int n,t_robot *r)
 

We can use this function to enable the visualization of the set of points of a given traces. By default traces are not shown on-line because this slows the workings of the simulator.



boolean trace_shown (unsigned int n,t_robot *r)
 

Returns TRUE if the trace is visible.



void hide_trace (unsigned int n,t_robot *r)
 

Hides the trace. It is advisable to hide traces if we want the simulator to work fast.



char * get_trace_name (unsigned int n,t_robot *r)
 

Returns the name of the trace.


next up previous contents index
Next: Visualization Functions Up: The Robot Previous: Frame of Reference Conversion
Josep M. Porta Pleite
8/2/2000