Visualizing AWS DeepRacer Waypoints

ARCC
3 min readJul 26, 2019

--

Some of the fastest algorithms that race in the AWS DeepRacer league make use of waypoints, pre-establish points on the track that can be used for navigating. There are three sets of waypoints, one set on the outer edge, one on the inner edge, and one in the center of the track.

Unfortunately, the DeepRacer console doesn’t show these waypoints for you by default, but there is a way to use some of the resources they provide to display them on the track using a simple python script. All of these resources are pulled from the AWS DeepRacer Workshops.

Waypoint map of the DeepRacer New York Track

All that’s required is this python code:

import matplotlib.pyplot as plt
import numpy as np
# Track Name from Tracks List
track_name = "New_York_Track"
# Location of tracks folder
absolute_path = "."
# Get waypoints from numpy file
waypoints = np.load("%s/tracks/%s.npy" % (absolute_path, track_name))
# Get number of waypoints
print("Number of waypoints = " + str(waypoints.shape[0]))
# Plot waypoints
for i, point in enumerate(waypoints):
waypoint = (point[2], point[3])
plt.scatter(waypoint[0], waypoint[1])
print("Waypoint " + str(i) + ": " + str(waypoint))

plt.show

We already have a repo set up to run it from, all you have to do is copy the following commands:

git clone https://github.com/ARCC-RACE/waypoint-visualization
cd waypoint-visualization
py plot_track_waypoints.py

Change the track you’re visualizing by editing plot_track_waypoints.py and swapping out the name of the track with another one from the list of NumPy files.

Every track AWS makes has a NumPy file associated with it, which can all be found here.

In the NumPy array, the points are formatted in a 3 column array.

[[x1, y1, x2, y2, x3, y3], [x1, y1, x2, y2, x3, y3], ...]

The first set of coordinates is the outer waypoints, the second set is the center waypoints, and the last set is the inner waypoints on the track.

Track Waypoint Maps (Outer Waypoints)

AWS Track, H Track
New York Track, New York Eval Track, Oval Track
Re:Invent Base, Straight Track
Tokyo Training Track, Virtual May 19 Track

Let us know if you have any questions about the process or join the DeepRacing Slack.

--

--

ARCC

Organization founded to inspire and teach people about AI and Machine Learning (ML) through the application of autonomous race cars. See arcc.ai