“AWS DeepRacer is the fastest way to get rolling with machine learning, literally. Get hands-on with a fully autonomous 1/18th scale race car driven by reinforcement learning, 3D racing simulator, and global racing league.” 

AWS Deepracer

Ok OK this is taken from the AWS, but really this is the best intro I could come up with.  Getting started with Machine Leaning can be a difficult task, code is code we can read that, and machine learning we “kinda get it” but stitching this all together for an outcome is another story.

AWS Provide a DeepRacer console, that being said the console is still in preview ( you can apply here ) and it looks like: ( best image I could find )

Now most us wont get access but that wont stop us as we can still get going and train our model I’ll walk you through the steps and at the end you’ll be able to watch your simulated DeepRacer drive around a virtual track.

Log in to your AWS Console, we will be using SageMaker to setup a jupyter notebook.  If this is new to you thats OK it wont take you long to be comfortable, in essence what we are setting up is a pre-configured machine with all the libraries we need access to.  AWS Provide 250 hours of t2.medium hours per-month if you are on the free tier.

Click “Create Notebook Instance”, Provide a name for the SageMaker instance. We don’t need to change anything here other then to select . “Create a new role” you do not need to change anything here simply click “Create Role” This role allows SageMaker to interact with S3.

The form should look as below. When it does click “Create Notebook Instance”

This will begin the provision of the SageMaker instance and enable you to interact with you jupyter notebook(s) It will take a minute or 2.

One the Status is InService click on “Open Jupyter”.

From here select the tab “SageMaker Examples”, collapse the rom and look for “Reinforcement Learning” and expand that row. Click on “Use” on “rl_deepracer_coach_robomaker.ipynb”

We will be making a copy of the example, simply follow the steps and click “Create Copy”

This will load the notebook we will work from. It can take a minute or 2 to start up fully. Wait till you see the track image as below:

At this point we can start executing the steps, the jupyter notbook allows us to easily execute python code in small segemnts called cells. We can click “Run” to run a cell one at a time. Give that a go.

We should have no issue executing the next set of steps, you can tell that a step in “executing” as there will be * in between [ ] and a number ( the execution order of cells you clicked ) once it’s completed. eg [1]

Once your at the Permissions section make sure you follow this step exactly.

Continue clicking run ( be patient some steps can take 1-2 minutes ) until this step.

At this point you have kicked off a simulation run. Ie the little car will be driving around the track. You can right click on the link on open in a new tab. Again the instance of robomaker will take a minute or so to startup.

Now, we are so close to what we all want to see the little car on the track.

As mentioned: “You can connect to your simulation with Gazebo, rqt, rviz, and terminal (below) when the status is “Running”. Just click “Gazebo” and enjoy.


Now that was a-lot of clicking, but you now know where to go, what template to select, how to kickoff the training job, have created the right roles and have watched the simulation. It’s a good start.

Next post I’ll explain a little more about each step and where the reward function is and how you might want to start modifying it.

Leave a Reply

Your email address will not be published. Required fields are marked *