Simple track generator for the UMDRacing Driverless Simulation implementation. Not complete, but proof of example works.
This is a higher level format for describing a track layout. "Higher level" in the sense that it does not describe individual cone positions.
All distances are in metres. All angles are in degrees.
Configuration Variables:
List of individual supported track parts:
Special commands:
Each line is a simple csv-like-row. <args>
is a list of comma separated
arguments. Spaces are considered.
Setting a configuration variable is done like so:
cfg,<name>,<args>
Describing a track section is done like so:
<track_section_name>,<args>
A .umdt
file is as follows:
<list_of_configuration_cmds>
<list_of_track_section_cmds>
<list_of_special_cmds>
<list_of_track_section_cmds>
The distance between every pair of cones along a track
Arguments:
- d: decimal
cfg,distance_between_cones,5
The distance between every pair of cones.
Arguments:
- d: decimal
cfg,width_of_track,1.5
Allow track sections to overlap.
Arguments:
- b: boolean
cfg,allow_overlaps,true
Represents the start cones of the track. Can only be present once in the track.
Arguments: non
start
Represents the end cones of the track. Can only be present once in the track.
Arguments: non
end
A straight stretch along a track
Arguments:
- d: decimal, the length of the straight stretch.
straight,5
This turn is achieved using BSpline magic (scipy). The curve factor is between 0 and 1, 0 being a straight line, and 1 being a max deviation of half of the distance.
Arguments:
- direction: string, 'left' or 'right'
- f: decimal, curve factor
- d: number, distance of curve
curve,left,0.5,10
A hard left 90 degree turn
Arguments: non
turn_left
A hard right 90 degree turn
Arguments: non
turn_right
A circle
Arguments:
- direction: string, 'left' or 'right'
- radius: decimal, radius of the circle
- degree: decimal, degree from the circle
circle,left,10,180
What commonly known as a 180 turn. (is also secretly used internally for half circles:D)
Arguments:
non
hairpin
Zigzags thing
Arguments:
- start_with_left: direction, whether to start by going left or right
- follow_prev_straight: boolean, whether turn the track so that the zigzag continues on the direction of the previous straight
- number_of_hcircles: int, number of half circles to create
esses,left,true,5
A 'Z' like turn with two curves of right and left.
Arguments:
- d: direction
- degree1: decimal, degree of first curve
- distance, decimal, how long the middle section is
- degree2: decimal, degree of second curve
chicane,left,45,10,45
A chicane, but same direction.
Arguments:
- d: direction
- distance, decimal, how long the middle section is
double_apex_turn,left,10
Allows the previous and the next track sections to overlap, useful for making the 8-Track. Must be between two other normal track section.
<track_section_cmd>
overlap
<track_section_cmd>