Make your own AWS DeepRacer track

Make your own AWS DeepRacer track

Nov 15, 2019

This weekend I wanted to test the AWS DeepRacer car on a physical track to see what the performance of my models are outside the AWS RoboMaker simulation environment. RoboCar sell a great vinyl track based on the Re:Invent 2018 layout but since this track has to fit inside my house I wanted to make it from cheap local materials, without compromising performance.

The solution I came up with met all of the above criteria for a budget <$100. It’s modular so I can make custom turns and take advantage of all the available space. Scroll down for a full description and images of the build!

Key considerations

The AWS DeepRacer car uses a 4 MP camera with MJPEG, which are the same specs as the AWS DeepLens camera. It’s capturing images at 15 fps and sending them to the on-board computer for processing and inference. Each image is first down-sampled to 160 x 120 px and converted to grayscale before processing on the Intel® Atom processor running the OpenVINO™ toolkit.

So what does all this mean when building a track?

Grayscale images

Because each image is converted to grayscale it’s important that the colours used have a wide variation in color tone. These are the colours in the AWS docs:

Material/Function DeepRacer Colour Colour In GrayScale
Off track Green: PMS 33955
Centre-line marking Orange: PMS 137C
Track Black: PMS 432C
Track Border White: CMYK 0-0-2-9

Interesting. There is sufficient variation in tone between the black (track), white (track border) and green (off-track) colours to be able to clearly distinguish, however the orange (centre marking) is almost identical to the off-track colour. Fortunately, the orange centre-line is always adjacent to black for which the tonal variation is high. I’ve included a similar table for the materials used in this project below for comparison.

Colour Code DeepRacer Colour Colour In GrayScale
Off track Blue tarp
Centre-line marking Yellow Gaffa
Track Black Corflute
Track Border White Gaffa

Downsampling

Since each image is heavily downsampled it’s important that each material is wide/thick enough to be captured in the final image. Pictured below are two images of a straight track module. The perspective of this image isn’t representative of the car’s camera, however it is close enough to compare the effect of downsampling on the track components. The first image is 400 x 300 px, the second has been downsampled to 160x120 px. For completeness there’s a third image that’s both down-sampled and in grayscale.

Materials Materials Materials

The track border clearly provides visual separatation between the track and off-track materials in the downsampled and grayscale image, but reflection from the track material reduces the difference in tonal variation between them. I expect lighting will effect the performance of this track with warm, diffuse light likely to provide better results than a concentrated light source. A more thorough investigation of the machine learning model filter activation would be required to check the performance of these materials which will have to wait for another post. For now, the above checks are enough to confirm suitability of mateirals and get started with the build!

Materials

  • 2.5mm black corflute (also known as tunnel-core) or similar thin, black material
  • 50mm White Gaffa tape
  • 50mm Yellow Gaffa tape
  • Adhesive Velcro tape
  • Scissors
  • Measuring tape
  • Sharpie (optional for marking cut locations on the corflute)

Materials

Quantities of the above will depend on how large you want the track to be, or in other words how many modules you want to make. For the build included in this guide, I used the following quantities:

  • 5 sheets of 2440mm x 1220mm x 2.5mm corflute
  • 50m of 50mm White Gaffa tape
  • 5m of 50mm Yellow Gaffa tape
  • 5m Adhesive Velcro tape

Method

Warning! AWS provides dimensions in imperial but I work in metric. I make no apologies for this.

Using the AWS provided track examples, I standardised my build on the following:

  • Track width (external border edge to edge) 600mm
  • External turn radius 1000mm

The turns in this build are slightly more aggressive than the Re:Invent 2018 track (external turn radius is approx 1120mm). However, this dimension produces bend modules that are slightly easier to store/transport and the corflute material is susceptible to damage if folded. Overall, the chosen size allows me to construct a rectangular shaped track in a 3.5m x 3.5m room with space around the track to walk.

The first step is to measure out the straight track modules. Measure and mark 600mm at both ends of one long edge on the corflute. Place the white Gaffa tape along the entire length to get a clean, continuous border and give you a clear guide for cutting. For each 2440mm x 1220mm corflute sheets, you get 2 x 2440mm x 600mm straight track lengths with a bit of waste material. You can increase the track width slightly to reduce the waste, but I like round numbers. Using the scissors, cut between the 2 track borders to separate the track.

Materials Materials Materials Materials

Next, measure and mark the track bends. Using one corner of the corflute as a pivot, trace a 400mm quarter circle; this is the inside edge of the turn. Similarly, trace a 1000mm quarter circle to mark the outer edge of the turn. Like the straight track modules, place white Gaffa tape inside the marked lines; you may need to tear the gaffa regularly to avoid the Gaffa creasing; if you do this be sure to backfill the gaps with strips of Gaffa to create an unbroken track edge. Once the Gaffa is in place, cut along the outer edges (along the previously marked lines) and you’re done! Additional modules are simpler to mark, simply place a pre-cut module over the corflute panel and trace out the track edge directly.

Materials Materials Materials Materials

To get turns other than quarter circles, take the above bend modules and cut at the desired angle to obtain 2 x 45 degrees, 60 | 30 degrees etc. Building a complicated track is simple by attaching modules just like a wooden train track.

Materials Materials

Each track module is attached to its neighbour using Velcro strips. I cut 50mm long strips of loop Velcro (the soft side) and placed them at both ends of each track module. I then made join pieces with 2 x 50mm long strips of hook Velcro connected by a 50mm x 50mm piece of white Gaffa tape. When the track modules are connected with this method, the white border appears (mostly) unbroken to the car camera.

Materials Materials

And pulling it all together, here are some snaps of the track complete with white corflute barriers:

Materials Materials Materials

Track performance and next steps

I had a great time playing with the DeepRacer car on this track and my model was able to successfully complete the track (so far at low speed… I’m not ready to compete yet!). The same DeepRacer model has much better performance with a track made from Vinyl or Carpet (preferred track material), likely due to the tonal variance mentioned above and enhanced by the high reflectivity of both the track material and field (blue tarp). When I get time I’ll use a different material for off-track and post an update.

This project was a fun exercise I completed in a weekend and my 5 y/o son had a great time helping to make the track with the Gaffa tape and Velcro. So if you want to see how your DeepRacer car performs on a physical track give this build a go!