Route Network Definition File (RNDF) for Self Driving Car

One of the 4 core parts of a self Driving Car Software stack is Planning. And RNDF or Route Network Definition File is the first thing PLANNING uses.

An RNDF is a tab-delimited ASCII file. It basically defines the Roadsegments and Zones.

The typical format of an RNDF file looks like the following.

RNDF_name filename (string)

num_segments number_of_segments (integer>0)

num_zones number_of_zones (integer≥ 0)

format_version format_version (string)

creation_date creation_date (string)

<segment 1>



<segment M>

<zone M+1>



<zone M+N>


Just looking at the format, we can clearly see that the RNDF file contains details about segments and zones. Here is an example of the road segment

Fig 1: A road segment (Segment M) comprised of two lanes. Lanes do not necessarily have the same number of waypoints. (

Now let’s look at the format of each segment. It should start making sense now

segment segment_id (integer>0)

num_lanes number_of_lanes (integer>0)

segment_name segment_name (string)

<lane 1>



<lane n>


But it is not complete Just looking at Figure 1, we see that more information need to be defined. Like the lane_width provides the width of the lane in feet. We also need to define the number of waypoints and their location. We need checkpoint which indicates that the waypoint is a named checkpoint. The keyword stop indicates a waypoint associated with a stop sign. The keyword exit is followed by the name of the exit_waypoint and related entry_waypoint or entry_perimeterpoint associated with the lane. A lane may have multiple checkpoints, stop signs, entry waypoints, entry perimeter points, or exit waypoints. Here you go:

lane lane_id (x.y; x,y∈ integer>0)

num_waypoints number_of_waypoints (integer>0)

lane_width lane_width (integer≥ 0)

left_boundary left_boundary (string ∈ {double_yellow, solid_yellow, solid_white, broken_white})

right_boundary right_boundary (string∈ {double_yellow, solid_yellow, solid_white, broken_white})

checkpoint waypoint_id (x.y.z; x,y,z∈ integer>0) checkpoint_id (integer>0) stop waypoint_id (x.y.z; x,y,z∈ integer>0)

exit exit_waypoint (waypoint_id) entry_waypoint (waypoint_id)

exit exit_waypoint (waypoint_id)

entry_perimeterpoint (perimeterpoint_id)

<waypoint 1>



<waypoint n>


Under the <waypoint > tab, the waypoint is defined as the following. The latitude and longitude fields are fixed points with six decimal places and express the waypoint locations in decimal degrees,

waypoint_id (x.y.z; x,y,z∈ integer>0) latitude (fixed) longitude (fixed)

Now you can tell why so many entries, exit and stop waypoint. Because one segment can merge with another or one lane in one road segment can have a dead end. We need to know that to plan for an U-turn and other special manoeuvres

Here is an example of a complete segment

Fig 2 : Stop sign intersection of Segment 2 and Segment 1. Red dots are exit waypoints, blue dots are entry waypoints, and green dots are other waypoints. (

Again going back to the original file, we can see that there is another segment for Zone.

But what is a zone. Here is an example of a Zone.

Fig 3 : Zone M contains obstacles that may be moving or stationary, but whose locations are unspecified. The yellow, blue, and red dots that create the polygonal zone are perimeter points, some of which are also entry and exit points to adjacent segments. The dotted line shows one of many possible travel paths.(

A zone can parking spot or construction zone or even a dessert. Let’s have a look into the Parking spot zone and how different segments can be connected to it.

Fig 5: Parking Spot as Zone. (

zone zone_id (integer>0)

num_spots number_of_parking spots (integer≥0)

zone_name zone_name (string)


<optional spot 1>



<optional spot N>


Now probably you are getting an idea how the whole RNDF file is formatted. So lets analyze the last part.

perimeter perimeter_id (x.0; x∈ integer>0)

num_perimeterpoints number_of_perimeterpoints (integer>0)

exit exit_perimeterpoint (perimeterpoint_id) entry_waypoint (waypoint_id)


perimeterpoint_id (x.0.z; x,z∈ integer>0) latitude (fixed) longitude (fixed)

And also the spot part

spot spot_id (x.y; x,y∈ integer>0)

spot_width spot_width (integer>0)

checkpoint waypoint_id (x.y.z; x,y,z∈ integer>0) checkpoint_id (integer>0)


Hopefully, it is now clear how can we even write our own RNDF file and put it into our car for successfully navigating.

Want to understand society, technology, politics and life at different stages.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store