[Music]
[Applause]
[Music]
[Applause]
[Music]
[Applause]
[Music]
[Applause]
[Music]
[Applause]
[Music]
what do you want I just need a TI launch
pad can't you see I'm busy here go to
digikey.com to find thousands of boards
and stock already for immediate shipment
hey everyone and welcome to the tenth
episode of make live for October
my name is Tyler Wong Garner and I am
joined by Kevin walseth from from
digitated hey everybody how are you
doing so we're not in our usual spot for
make live are we no we are not we are in
Denver alright we're in Denver for Maker
Faire Denver but more importantly for
the sparkfun abc27 to you so the spark
fun ABC is spark funds autonomous
vehicle competition it has everything
from your standard autonomous vehicles
that run on a track outside to some
crazy BattleBots up to 30 pounds and
I've watched some crazy destruction out
there today so it's pretty cool so we we
do this live stream with make and we
also have a great relationship with
spark fun at digi-key so that's kind of
why we thought we'd tie everyone
together we have a shirt that says
hashtag digit fun which is digit key and
sparkle I'm just kind of kind of doing
something different something fun yeah
and of course as I introduce them at
every single episode of this if you're
not familiar with Ted Yuki you should be
they are a wonderful distributor of
electronics components and on products
everything that you need to build this
project you can purchase from digi-key
including raspberry pies art we nose and
even all the discrete components like
LEDs resistors anything you need to
build your next electronics project you
can get it from them they ship fast and
they're wonderful partners to work with
to make this series possible well thank
you very much Tyler and we really do
thrive on our customer service and the
amount of products we have in stock and
we love the partnership with make and
spark fun that you guys are great to
work with we love
doing this make live series with you I
know you've had some amazing projects on
this show so thank you for what you do
and I really appreciate it yeah and
we've been having a ton of fun building
them alive for for all of you guys there
now there's a particular reason why
we're here on location for this event
and that's because if you've probably
seen in a banner below we're building an
autonomous car now it's not a full-size
autonomous car it is a 1/16 scale RC car
so we're gonna take this we're gonna
tear it apart and we're gonna give it
some new brains and hopefully we'll be
able to drive it around on a small track
in the room that we're in here we're
gonna see if we can do that by the time
we're done here
but at some point will at least be able
to show you the track where everybody's
competing on outside and while I'm here
throughout the weekend I'm gonna be
shooting more video of spark fun of the
robot combat competitions and everything
else that's here so keep an eye on the
make magazine channel and on makes ENCOM
for that coverage all right well thank
you very much for allowing me to sit in
and talk with you and I'm gonna let you
get to your build because you have some
fun work out of you yeah we certainly do
so thank you Kevin all right thank you
have fun
I want to Denver thank you and we're
gonna pull Kevin's microphone down so he
can change his microphone out for with
William who's going to be joining me in
just a moment William is the creator of
this project he contributed it to make
seem calm and this is his car so let him
get set up here shortly and then we'll
start getting into the details to this
project and of course as you're watching
this and as we're building this yeah as
we're building this we can please feel
free to ask any questions that you have
about this project about how it works
and we'll do our best to answer them
probably can't hear you just yet but now
we should probably be able to test this
is will my name is will I live in
Auckland and I co-created this car
called the donkey car with Adam Conway
and so we're gonna take this RC car and
turn it into a car you can drive with
your phone and train it on different
tracks yeah so let's talk a little bit
about how you came up with this project
and why you decided to use this car in
particular to to face it to design this
project sure so I came about it a pretty
roundabout way I was running for Bart
board director the subway in San
Francisco and I was running on the
platform of converting it to a
self-driving bus platform but no one
believed me it was possible and so I
pitched having a race to Chris Anderson
and he had the first event and I saw
some someone who's doing this Indian
neural network approach for making the
self-driving cars that worked pretty
well i sat down next to Adam Conway who
had a really have the simplest hardware
of any of the teams you know there
weren't wires going everywhere there's a
couple components and I started working
with him doing most of the software and
he was doing most of the hardware and
yeah we ultimately standardized on a
cheap car that's reliable and has decent
components yeah so let's take a look at
your build let's get it on the table
here so we can get a close look at and
see what kind of components are going
into it sure some of these are outside
or there are additions to the standard
build like the lipo battery right but I
think that's it actually but so we have
just your typical Raspberry Pi and can
you see where my yeah you can see my
fingers yeah let's swap over to that
camera
okay okay so now we can go to look let's
make sure we're focused here okay okay
so yeah you have your raspberry pie
typical raspberry pi 3 B yeah and you
have a wide angle pie camera and we
added the wide angles because when
you're driving around tracks you want to
be able to see the inside and inside
line and the outside line and it talks
to the ESC motor controller through a
board I forget the exact name PC a a
nine six eight five which just helps
handle the PWM signal set with raspberry
pi doesn't have to do it I added a
little power cord because you're
constantly having to turn on and off the
the PI and then you have your just USB
battery in the bottom zip-tied
underneath and I switched out to have a
lipo battery to have more battery life
and then you have your car
great so the so this isn't using any of
the normal autonomous vehicle stuff like
lidar or any of the the range-finding
Safford it doesn't even have a GPS on it
it's relying strictly on that camera to
navigate the course yeah we're just
using Indian neural network so what that
means is it's taking a single image
frame and it runs through four layers of
convolution and then it has a single
dense layer and then it outputs a
steering and a throttle value so when
we're collecting training data we're
just collecting a bunch of images and
steering and throttle pairs so that when
we when we train on that it'll the
neural network will be trained to do
exactly how we drove how we drove right
this is why sort of not and pretend I
understood most of what that actually
means
but without without much further delay
let's go ahead and start tearing our
original RC car apart and start building
into something we might be able to drive
around the track later
so the first thing we need to do is well
obviously we do I mean this is pretty
much fresh out of the box here and so
the first thing we need to do really is
[Music]
get the original bodywork off of there
and yeah what you'll see is you have
your receiver so you the car comes with
a controller right and most RC
controllers are the radio signals go to
this receiver and then this turns those
commands into PWM commands which then go
to your ESC which takes battery power in
and outputs values for your servo and
for your throttle okay so I guess the
first thing we'll probably need to do is
pull these out and then connect them to
at least freed them up so that we can
connect them to our servo controller
board yep
do we need to we probably need to be
mindful of which one of these is which
how we can we can look later okay yeah
although this one came out of one
channel one and an RC stuff the default
the default is channel one is throttle
and channel two is steering okay and so
then the next thing we need to do is put
our base plate on here
yes we need to feed these up through
here yeah maybe we should attach the pie
purse okay
usually haven't built one from the
ground up in a while we started this in
November and we standardized on this and
Adam Conway did a really great job just
making the hardware durable because you
know you often crash just because you're
a bad driver or because you made a bad
pilot and having these things really
well secured yeah helps you drive it
over and over again where they have one
question that maybe you might know the
answer for this is from user ninja
master any good sources for micro
hydraulics hi I have never put any micro
hydraulics on on these cars okay I'm not
even sure what that is referring to if
we're talking about using those as like
linear actuators maybe shocks yeah and
so some of the parts that you need are
these little machine machine screws
mm-hmm and the only way I found to get
them is in bulks 100 yeah when you get
them the you have enough to build many
cars yeah fortunately they're pretty
inexpensive these are our M 2.5 s this
is what we're using then screw the
Raspberry Pi down and did you print this
I did I did
and do you cleaned up sometimes I
ordered mine off of Shapeways yeah and
they come they come with a little rough
edges where you need to clean up in
order to fit the screws in handled yeah
I might I did not do any of that cleanup
yet so my guest he did
brute force this a little bit make sure
have the right driver bit here I do
and
let's just read it losers thread in
there
another question do you know where to
get our C gears with high gear reduction
are you are you pretty familiar with the
RC world or did you just I am NOT again
I don't I hardly know anything about the
hardware I did I did the software and
Adam Conway did the hardware design and
made all the key decisions okay to keep
it and our ultimate goal was just to
keep it as simple as possible we've been
to enough of these races to see that the
people who have a lot of different parts
on their cars have a lot more things
that break yeah well that's the the
basic engineering concept of just keep
it simple
yeah the pure points of failure you have
the hopefully the fewer failures you are
you will have now there's a pretty good
reason why you choose this car as a
platform but could you use any RC card
for this project yeah I definitely you
can use almost any hobby-grade RC car
anything that has the three wire
connectors coming out of the ESC I
looked at trying to use my son's RC car
but it had an integrated ESC so the the
receiver and the EC were integrated and
so you couldn't actually connect it to
the Raspberry Pi or the motor controller
mmm and the reason you don't we
the reason the hardware decision to add
the motor controller board was so that
Raspberry Pi doesn't have to use any
computational power to create the site
of PWM sine waves yeah so we can focus
on just getting a signal back to the
server so it can do all the computation
yeah actually all the computation
happens on the pide oh Willy yeah we
will normally train it on a laptop or
GPU server but then we'll move that
neural network model back to the PI and
the default model is small enough that
we can run at 30 frames a second okay
I assume this was using like a
ship-to-shore model where the the PI was
gathering the data from the camera maybe
making some rudimentary computation on
then sitting that back to the server
saying what do I do and then the server
says go go this way
yeah well it's been really fun to figure
out like what are the constraints of the
PI and what can we or what do we need to
use or what computation can be doing the
PI and what do we need to put on the
server is this the orientation I put
mine on backwards okay so either way
will work yeah I think you want them
close to the where the wires come out
yeah yes do that and there were some
questions about these parts yes of
course we did 3d print these and if you
look up the github github repo for the
instructions yeah yeah the instructions
we compiled all together on a website
donkey car right comm and we don't sell
any kits or anything but we have the
instructions and links to all the parts
yeah it near might as well be a cat I
mean there's not too many parts to it
you do need to 3d print these parts
there's one other part which is the roll
cage which is somewhere on the table
here I'll show that in a moment
oh there it is yeah it's actually my
favorite feature the whole car the
handle because you're constantly having
to pick it up whether you run it into
something or if you could hold it up a
little bit or you just need to grab it
oh yeah here we go yeah again Adam
Conway design this and so it attaches to
the car and it works as a handle also
kind of a roll cage and the camera is
offset behind the bumper so if you run
into a wall it doesn't scratch your
camera and the camera is angled down 15
degrees so that you especially if you're
working on line tracks you see much more
of the line than you do above the
horizon
even though we still train on the whole
image yeah and so is this car optimized
to work on online courses or can it run
on any course so yeah we're learning the
limitations of the car here at the ABC
course because that is designed to
accommodate that power racer colleges
actually if we should we should probably
show we have some video of that course
so we can take a look at it here this
was filmed earlier this morning by by
kevin from digi-key and so we have a
couple of different obstacles out there
we didn't get to quite see all of them
in this drone video but if you look at
this blue there's thing about the back
of the track this blue ramp there that's
a moving pedestrian that's cycling back
and forth I think it's a cardboard
cutout of Captain Kirk there's a jump
out here of course now we're flying
directly over the middle of the track
there's this sort of climbing wall on
these road cones and there's a few
different competitions that are
happening here this weekend there's one
that's strictly a race for speed to get
around the track the quickest there's
another one that's a little bit more
task focus and I think that's where a
lot of these the logistics class they're
trying to pick up those rings in the
center of the course and then take them
to the other ring or you take them to
the other side of the course okay and
then we have sort of a silly one where I
guess they make other other teams are
making cars that person can ride on and
then that rider is going to be carrying
a nerf gun and a cup of coffee in their
hand and the goal is to knock the cup of
coffee out of the other competitors
hands I don't know I think they're
calling that the car wars competition
okay I can't I can't wait to see some of
that one other question we had here this
is already out of my realm how would you
structure the ññ to do other neural
network to do things more complicated
than just follow a track like recognize
and avoid obstacles
tract yeah so this is the fun part
and when I get most excited about you
we're trying to design this neural
network to be able to do anything you
dry it you drive it somewhere and then
the car will learn how to do what you
did and so right now the neural network
is set up to just look at every frame
frame by frame and so it has no memory
and it's just trying to predict the
steering angle there yeah yeah okay oh
no so I was gonna let you talk a little
bit more while I fit these things in
here to get these get this roll cage
assembly ready to build yeah this is the
hardest part of the build of fitting the
nuts into those slots
do you have an exacto knife um I have a
little utility blade that was the
hardest part and Adam has actually made
a revision maybe last weekend on the
design that instead of using these
machine screws actually uses plastic
screws mm-hmm
so you just need to screw up from the
bottom yeah
have you guys ever used those heatset
threaded inserts no so those are
wonderfully the basically you basically
build a larger hole in your in your
printed model and then there's these
brass threaded inserts you set them in
there and they just touch a soldering
iron to them they heat up the plastic
melts around it and then you have a
threaded insert that then you can just
drive a machine screw into ah yeah that
would be great
yeah well anyway back to the network so
it's kind of like a movie memento where
you have no memory it's just every frame
you're looking at the picture and trying
to make a decision which way to steer
and so lines are the easiest because
it's essentially learns to look at the
angle of the line and sort of follow the
angle of the line but some of the things
that people have done with just a simple
this simple frame by frame
neural network is they've trained
passing behaviors so it'll stay in the
lane until it approaches another car and
then it'll pass the car and go around
also if you have a fork in the road it
can go one way until you put an object
next to next to the fork and then it'll
go another way those are those are the
type of constrained problems that the
current neural network can can figure
out but what we are experimenting with
is are some stateful models where you do
have some memory and there are different
types of stateful models recurrent Nets
or LS TMS are are the names used for
them but it gives you a memory of
several frames or even longer and so
with that you'd be able to do some some
more difficult tasks the problem I'm
having with this track is especially the
wide-angle camera you have so few
features to look at it looks like you're
just in the middle of of a parking lot
and so it's really hard to to know for
the car to know where it is
there's so it's it's like driving on a
12 lane freeway figure eight if you're
that guy in memento where you have no
memory yeah I'm getting a little bit of
notes that and people can't hear you
quite as well as they like in your
microphone position hopefully they'll be
able to hear you a little bit better all
right
I think the hard part of the drive a
screw and hear a little bit and see if I
can get these nuts set in here a little
bit better
yeah and so right right now we're just
going through the hardware design but
half of half of the build is actually
getting the software to work and on that
donkey car comm website we have a link
to the SD card image which for this
tutorial I have already burned on to
this SD card but that SD card comes with
tensorflow already loaded and caris and
all the software that you need to run in
the Raspberry Pi foundation is amazing
just how they've precompiled all those
binaries if you try any other board you
just run into a litany of errors that
you need to fix yourself but for the
Raspberry Pi it was really
straightforward to install all the
software excellent now you mentioned you
were originally coming to this project
because you're trying to adapt Bart into
a self-driving system yeah what at this
point what are your what are your
continued goals in this project yeah so
the the race ended in November and I
didn't win and so I just sort of sat a
personal goal of trying to in a year so
that's coming up in November trying to
Train trying to train some sort of
demonstration project that could drive
cars like trains so you can imagine this
is going the wrong way but two cars
driving close to each other so so that
you can fit a lot a lot of people in a
single lane but also have the
flexibility of a car being able to go on
your own routes and then the trains
wouldn't have to stop at every stop so
on a subway you have to stop at everyone
else to stop right with a with a
self-driving bus system that drove close
together yeah you know the bus who would
only stop at the stops needed for the
people on the bus yeah that that makes
sense but and we'll see the community
that's developed around this sort of
donkey car project as well as the DIY
Robo Cars events
has been really great and people that
are better at softer than me have joined
and built simulators so you can actually
use the the donkey car software with a
simulator built with unity mm-hmm and
sort of test out these different models
stateful or not and see if they work in
a simulated model before you try you
know building your own track or what not
yeah and what
so people are driving their own cars
completely in a like a Unity engine or
something like that yeah this guy Tom
Kramer down in San Diego who works with
the San Diego robotics group it's a it's
a meet-up does game development and so
he's very familiar with that world and
so it's just a unity environment let's
see if I can get this right that then
lets you communicate it it can
communicate with it with the web server
so the donkey runs a web server and
unity interacts with it and the donkey
is passing the drive commands and the
unity is passing back the images that
the donkey should see yeah cool what
other questions I felt like it was about
to have a good one
and then
oh the meantime get this roll cage
fitted on here oh wait this is still
completely free of the electronics so we
can just do what we want with it whoops
that camera went to sleep wait for it to
come back there we go
apologies for the black screen there oh
and so obviously we're doing the easy
part of this project right now which is
just assembling the hardware and and
really this is developing a platform
that later on it's kind of up to you to
help develop how it's gonna be able to
navigate and get around so what kind of
programming skillset should somebody
have to start like what kind of coding
problems are people gonna be solving
from that point sure so all of the code
is written in Python okay so it's a good
a good accessible language yeah so if
you're familiar with Python you'll be
able to contribute but to get running
you eye you need to be familiar with or
willing to learn bash and SSH because
you use your computer to control the car
right so you have to SSH into the
Raspberry Pi and all this was new to me
before I started so it's definitely
learn about and a really valuable skill
because the same same tools are used for
cloud computing you SSH into a server
and so then once your SSH into the
Raspberry Pi you're just running a
Python script to you know start the web
server on the Raspberry Pi and tell it
where to save the data and tell which
taught which model to use for its
autopilot yeah and I find that using SSH
in that manner to communicate with the
Raspberry Pi is the ideal way to use it
anyways I don't often find myself with
the spare keyboard and monitor and mouse
to set up the Raspberry Pi I'd rather
just get it on my network as quickly as
possible and then work with it remotely
from a separate computer yeah and it's
really only one command the SSH and then
then you have to find your car on the
network and then enter the password and
then the other command is SCP which is
essentially guess SSH but just lets you
transfer files between the Raspberry Pi
and the computer because Raspberry Pi
isn't quite powerful enough to train and
do the back propagation to actually
build the autopilot so you have to move
it to a laptop or for a server I've got
a couple questions here about the
programming Arduino and Arduino is one
questions where where to learn it and I
there's a million places to learn in and
the language for that is largely rooted
in C which is a course I took back in
the Community College a ways back so
when I started learning it from the
Adafruit exercises
it was pretty familiar but they also
take you through some pretty basic stuff
where you can get the sense of like what
the code is doing and how its
interacting with the hardware so it's I
imagine you will have a trickier time
learning if you didn't have that same
background but I wouldn't think it would
be terribly impossible
because now we can probably feed these
opportunity here sooner or later we'll
want to attach to the camera there's
another question can you use Python to
program Arduino and the short answer is
unfortunately no the long answer is yes
but it gets more complicated than that
so there's a number of different boards
many of them are manufactured by
Adafruit
that are there's a couple different
standards going on but there are - I
know one of them is called micro Python
and the other is called circuit Python
and those are two different frameworks
that you can use to program your
microcontroller not necessarily an
Arduino proper but a different
microcontroller that you can do all the
same kinds of circuits with and some of
them have even more functionality like
having a Wi-Fi
circuit on board or others other things
like that bluetooth so the stuff
manufactured by Arduino not at this time
all them they might be adopted in the
future I don't know I certainly hope so
because python is a really wonderful
language to work with but there are ways
that you can program microcontrollers
and microcontroller projects with Python
oh somebody else built a car like this a
while ago and I wanted to just drive it
around the house and avoid but avoid
obstacles would you recommend a neural
network system or does it really see it
what I'm trying to do to drive around
the house yeah I guess I would ask are
you trying to have it build a model
where it learns the house by yeah sort
of the way a Roomba does do you have a
knife I do
um oh I'm not sure exactly why well we
had a couple of questions about Arduino
and I think that was mostly coming off
of talking about how we're coding this
project in Python and I think people
wanted to know a little bit more about
how to work with microcontrollers like
that I mean yes this project does not
use a microcontroller like like an
Arduino it makes use of a Raspberry Pi
but there's I mean if you don't need a
Raspberry Pi from your project you've
you just need a microcontroller don't
use one just use a microcontroller yeah
and there's there's a couple so the way
we set up the code for donkey is using
templates for cars and if you look in
the code repo you'll see that someone
has built a car using teensie mm-hmm
controller oh wow okay you can see how
to sort of add those on so you can't see
what I'm doing kind of move it a little
bit here and the person who's asking
about the building the robot to navigate
his house he said yes exactly like a
Roomba so something that would build a
map of the house as it navigates right
so again we come back into the
constraints of our current model of just
going frame by frame and it wouldn't be
possible with that model because it has
no sense of orientation but I was
messing around before this weekend
trying to get it to work before the race
with visual odometry and slam so you
could build a map with images from your
camera and then navigate it but that is
certainly in the development branch of
the coder now you know what I'm doing
now is attaching the this is coming from
the servo and so I know that the default
is the servo goes on channel 1 and so
there are little channels channel
numbers next to each each of these
places to put the cords and the black is
ground
and so the ground is the pin closest to
my right hand and so that is the servo
and the other one will be the throttle
and for attaching the camera we want the
orientation with the ribbon pointing
down yeah try and keep this from this
frame being completely full of hands are
we using PWM to control speed we use it
to control throttle which in turn will
control speed but it is it's one of
those constraints that you don't think
about before you get into it or at least
I didn't I guess that that's good even
though it's tight is yeah without speed
you don't know how fast you're going and
so as the as the power of your battery
drains the different throttle values
equal different speed especially with
these nickel hydride batteries yeah and
there was a question about which
raspberry pi we're using we're using the
breast or a PI 3 and I'm assuming well
partially because has the onboard Wi-Fi
to communicate with the server but we
probably also need the CPU horsepower in
there as well so I'm just attaching the
camera here
what are you looking for the USB like a
power cord I think there should be one
in there if not you can use mine I
probably have one left one in there and
so I'm going to I'm going to take this
SD card which is needed for the
Raspberry Pi and plug it in and this is
a bit precarious but you you only need
to do it once and so can you see it okay
so you can see oh oh and while I have it
here you can see it's a skandhas
scandisk ultra and there are a bunch of
different kinds of SD cards and brands
and if you get the cheap ones they won't
work and you'll try to debug everything
else and waste a bunch of time and we
haven't had any troubles with these ones
so I'd really just save yourself the
headache and get the one that's
recommended in the instructions yeah and
we all
I also know that you recommend the 32
gig and we need that that size I yeah I
I think I think you actually probably
need the 8 or the 16 ok but if you want
to collect higher resolution image
images you'll be able to fill that up
right now in order to make the neural
network compute at 30 frames a second
we are just collecting 120 by 160 pixel
images but on this track out here it
would be helpful to have higher
resolution so you can determine which
direction you're going and where to go
yeah but for line tracks you know even
even an image down to 32 by 32 would
probably be enough to follow a line
so the SD card is in the servo and the
throttle cables are plugged in and we
just need to get the camera plugged in
the camera needs to get plugged in and
then we add the power so when I was
first installing these cameras I didn't
realize that this this little securing
tab would pop up and so I was just
jamming it in there yeah so it makes it
much easier if you lift those tabs up
and I believe the terminals are on this
side although I can never remember once
you lift it up you can generally kind of
peek down in there and see which way
they're facing right yeah so you we want
the you want the metal tabs to line up
with the little metal tabs that you see
in there and I will plug it in so for
mine and this one looks like it has a
little twist and then you lock the tabs
down
and hold this back a little bit
okay okay now we have the battery to
attach and do you have some tires I
think guys I do not have zip ties on
Mike for a moment while I could goes to
get zip ties and a power cable all right
gotta say it's awesome to see so many
people that are also invested in and
trying to build autonomous vehicles
themselves for mouths sake I mean we
mentioned that they that combat robots
are here as well I'm gonna go try and
catch up with some of those guys and
shoot a video about them later but I'm
really interested in building a
relatively lightweight combat robot
maybe like a three or a six pound you
know which have one of those classes but
I'm eager to check those out maybe just
maybe if we come back out here to do a
live build next year then we'll go fight
it it'll probably be bad
all right
got some zip ties here and the way that
I found I actually haven't attached one
these bigger batteries to one of these
smaller cars but I think we should have
you put your mic back on oh and stop
that
the second thing is on the mic sorry for
the the noise there all right I'm not
not on TV ever I'm only on TV on the
Internet yeah sorry about that guys so
now we have the zip ties and we're just
trying to find a secure place to put the
battery which will be powering the
Raspberry Pi because the car battery
only powers the car and we're
experimenting with ways to get the car
battery to power the PI so that we don't
need an extra battery but we've found
that when you use the throttle it'll
disrupt the power enough to cause
problems with the PI and then you have
one more thing to debug yeah yeah tricky
but maybe we'll just say the rear ones
are good enough for now
okay so I found that you can actually
fit these zip ties underneath the PI
like this and then we can attach another
zip tie to this side and then it'll wrap
underneath
I was a fan of good-good zip type or
origami oh man I've had my share I used
to work installing solar panels on rubes
uh-huh and half of the job it seemed
like was wire management under the solar
panels and so you're just on this hot
roof trying to reach that zip tie under
the solar panel here on this side and
say what you want the power terminal is
coming out this side just so that you're
able to plug them in yeah and you want
it pretty secure and then you can sculpt
jewel is asking what does a good place
to start if you want to get my hands a
little light trying my hands on creating
the lightweight battlebot I've seen a
handful of Instructables that share well
one is a start-to-finish instructable of
how to create a a small combat robot I
think I'd one or a three pound one and
another instructable that is more
general in knowledge talking about a
couple of different designs and how to
come up with your own design and then
afraid that make community a gentleman
by the name of zak Lydell who runs a
company called bot - party where he has
very tiny combat robots all of them are
I think in the like six ounce range and
he you can hire him to bring his combat
robots to your kids party or a corporate
event but anyhow he insists on what he
refers to as CAD or cardboard aided
design which is your chassis will be
some of the most difficult to work with
when you when designing your robot and
yeah so just first get all your
components together if designing it out
of cardboard and then work from there to
refine your design before you start
getting into a harder an order with
materials like like lexan or aluminum
this this started as a cardboard model
where the camera was a duct tape to the
to the cardboard and it worked well
until you crashed or it got wet yeah and
why are you guys still working out of
that warehouse in Oakland
yeah we'll be erased there every month
yeah well the first of course the first
one went to would just rain recently and
it was very tight at that time yeah okay
so we have the battery plugged in we can
see that the PI is on I thought this
would turn on as well but maybe that
just turns on when the car turns on oh
well we still don't have the the jumper
cables going from the PI to do right
yeah yeah so we've got a couple of
jumper cables in the box there and get
those plugged in right why did the
raspberry probably doesn't come with a
power switch I'll never know
I yeah something that even if it was a
software command that you know be like
say you know shut down now with a with
three SSH you can do sudo shutdown right
but the power is still on I don't know
it seemed like just a little button
would have saved over saved a lot of
people work yeah so I'm just gonna match
what's on my car okay that's I always go
from a working reference yeah okay so
we're just we're matching these GPIO
pins from the Raspberry Pi and get a
easier angle on that so you're gonna see
what's going on and these instructions
are in are documented online and so what
is it the first pin goes to the second
and second second pin so we are getting
pretty close to the end of the hardware
setup for this and folks are asking if
we're going to be able to show how the
software works I believe we will be able
to show how the software works I'm not
sure we'll be able to go through train
and driving model and then show it
actually driving around because we're
just in this small office we were
originally gonna be doing our broadcast
from the ABC track outside but the only
internet connection they had out there
was Wi-Fi and with everybody here in for
Maker Faire that connection wasn't good
enough for us to be able to do our
broadcast on so that's why we had to
come in here to this office where we
have a lot more limited space but what I
would like to do is get you know videos
of both Williams car out there riding on
the track and maybe ours that we've
built here today and you know we can get
that into a video later on so I
connected those cords according to how
it was connected to mine and now we're
getting that light that I expected
showing that we do have power coming to
that motor controller and so now we
could do some wire management here but
for the sake of just getting going we'll
turn on we actually don't need to turn
on the car so now all we need to find
this pie on the network and then SSH
into it and the first thing that you
have to do is is calibrate your car
since these servos that come on the cars
don't have any default values so do you
wanna try to film my computer yeah let's
do that
unfortunately we weren't able to get a
cable to get Williams computer plugged
in directly but we're gonna do this the
old
Chimay and hopefully get the best
picture we can of this I can close this
stuff isn't needed right now that's my
car
so part part of the setup when you're
creating the disk image is after you
created the disk image to go into the
files and set your net your Wi-Fi
password are we gonna be looking at this
yeah yeah okay and just okay yeah and to
name your car because you want it to be
on your network and then you want to be
able to find it so I named this car d3
okay so you just want to go SSH pi is
the name of the car at
d3 got local and it asked if I want to
permanently name added to the host and
it's asking for the password and I made
the password STF STF and so now we can
see that we're on or on the PI and this
env means that the local and virtual
environment was activated so that our
Python libraries are are being used so
then we're going to CD into the d3 file
which is what I what I created but when
you when you first when you first log in
okay are you able to when you first log
in you're going to you want to uninstall
donkey and then install it with the
commands that are in the instructions
and that'll just make sure that you're
using the most recent version of the
code because the disk image takes a
while to update and isn't updated as
frequently as the code then you're going
to run donkey as the command
create car and then you're gonna set a
path to be and this is what I did was
enter it as d3 but since I've already
done that I'm just going to go into the
d3 folder and I'm going to start the car
so it's Python managed and I took this
syntax from the Django syntax that uses
that managed up pie syntax and then
you're gonna go drive and then if you
were to load a model on there you use a
flag that's - - model and then the path
of your model so I says it's loading
tensorflow which actually isn't needed
since we're not using a model and since
the camera is not enabled which usually
means that the camera is not plugged in
correctly it could also mean because
it's usually a toggle you need to set in
R as pi config yeah
is that on the hardware I just tested
this on my car and config and somebody
was asking it's a name I won't attempt
at because it's in Cyrillic but asking
if the Raspberry Pi can run an OS like
Ubuntu and I don't believe that it can I
mean there's head version of Linux
specifically created for the Raspberry
Pi called raspbian it is a fork of
debian and I I'm sure there are some
alternate versions of Linux that can be
run on the Raspberry Pi but I don't
believe something like like a bun to
would work yeah they're getting the
really nice thing that their Raspberry
Pi foundation has done is pre compile
all these binaries for the specific
hardware so you don't have to do the
debugging that you would if you
to use a different operating system or
hardware so I just made sure that the
camera and i2c was enabled and it says
maybe I need to reboot so if this
doesn't work we're gonna check the check
the hardware yeah
all right
I think it might be backwards because
I'm looking at the one for the the
monitor output there and I'm seeing the
the metal pins that looks like they're
on the white side of the connector right
let's try it it's definitely in the
other way on my car again always good to
work from the workings that the working
model that should work okay so the pipe
was broken because we rebooted it we
should just do the same command yes yeah
yeah we're gonna CD into our factory
sorry for moving around this computer
that's alright
and they're gonna try driving again
focus in and come back to it back to the
computer there
says the camera is not enabled hmm okay
well let me try it the other way is I
just enabled it
that looked like a lot more information
was it including maybe some errands okay
and I know this error is because you
have multiple instances of the camera
trying to be used so I'll try to
this must be some difference between the
hardware that's actually on this pie
because I was able to put it on my car
and drive it yeah the same disk image
well if we futz around with this too
much and we aren't getting any result we
could accept that the car we've just
built is effectively the same as yours
and yeah we could show how they how the
software works on your car yep yep that
would work too although it's really nice
when things just build from the ground
up without problem certainly are
don't think this is the rate we're gonna
attach the camera
what else could it be
it wouldn't show the camera isn't
working just because we sell the lens
cap I don't think so
you smart camera no okay start one more
time all right give it one more go
if not we'll show the model on on
Williams competition vehicle yeah
it looks cooler anyways it's orange a
long way to go before it's competition
ready
do you like camera
and the cable on the camera side this
probably did in the same way on yours
yeah I thought for a second maybe we
shouldn't take for granted that the
camera came out of the package with the
ribbon cable attached correctly oh
that's true but yeah they do they are
connected in the exact okay we figure
out this app offline yeah we can go on
my car which is just called d2
-
and then we're just using the same
command manage drive and what this is
doing is starting up a web server and
it'll start this thing called a drive
loop and it's just looping through these
different parts one one part is the
camera we have a couple lambda parts
that adjust the steering to be
categorical and and then we have some
actuators so you actually keep it on the
screen yeah we're on the upper screen
right now so now you can look you can
see a broader view yeah get a bigger
look they're gonna come back to us while
I reposition the camera on here okay
so then you plug in your address of your
cars as d2 local and then the port that
we run the web server on is eight eight
eight seven and then it'll kick you to a
dry of URL and so what you're looking at
now is the image from the camera you can
see the car you can see Tyler and myself
and you can drive it I'm not sure if the
car is on design so you have this touch
joystick that you can steer and you
should your swing this over so we can
see the wheels turning yeah I think I
did switch I think I broke a fuse in
this oh so I moved my throttle to be on
channel three and then you can see it
also steering when you stick it'll
capture training data as soon as you as
soon as you press down and it'll start
recording the other ways to drive it are
with the keyboard you can use the
commands or I is forward and then J and
L will toggle it left and right and then
you can also if you drive it from your
phone you can use the accelerometer and
your phone to drive using just a tilt in
the car so the next steps for this the
trainer model would be to put it on a
track I don't know we want to drive
around yeah if we wanted to try and get
this thing going
on the ground here
so what do you see so maybe I could show
what do you see on the phone check the
focus here switch the camera over okay
you can't really see the phone very well
but what you would do is you press start
you press start and then you can start
driving it by tilting your totaling your
phone and then steering back and forth
one common question that we always get
is why doesn't it go backwards and
unless you've had RC cars before it's
not intuitive that you have to go
backwards twice to get the ESC to drive
backwards and I think that's just to
prevent you from going forward forward
to full reverse
and then when you're ready to drive a
track and stop the vehicle one thing one
thing remember is if you're driving with
your phone and someone calls stop your
vehicle before you answer your car
because I've had a couple times where
the car will race off when you answer
the phone so here's just continue on
with the last command that well it's
actually well with the accelerometer
it'll it'll just like drive forward or
backwards because you you picked it up
so here's an example track this is just
some white ribbon I got on Amazon and
you make a circle track and you just try
to stay on the line as try and clear up
these cables said and as much as you can
and so you'd collect training data when
you want to and if you if you mess up
and drive off track you can clean up the
data later and there's a guy Kenneth who
wrote sort of like a data annotator that
lets you clean up the data so we don't
have enough room here to really drive it
around but that's how you how you would
train your own pilot
James Edwards was just asking do you
only have to train it once to do the
line follow yeah so I on something where
you have like a clear directive for
steering so if you're following a line
and when the line turns your car turns
you can train an autopilot that works
pretty reliably in about ten laps okay
and it works even on a different colored
carpet and all that sort of stuff yeah
cuz really then all it's looking for is
the line to follow right to register
where it needs to be okay
well I'm I'm wish we could have figured
out what was going on with the camera
here and of course absolutely wish we
could get this thing out on the real
track to see how it runs but overall I'd
say we with a little bit of
troubleshooting builted a remote-control
car or not a remote-control car but an
autonomous car something that can
navigate its way around a course on its
own so where can people find out more
about your project and the work that
you're doing with with the with the
donkey robocar yeah so we posted all the
instructions for this on a website
called donkey car comm and it has a list
of all the parts you can get the
instructions and our slack channel where
someone is almost always on that can
answer questions where you can see new
features being posted about the code and
just generally get involved with the
community excellent
and once again I want to thank did Yuki
for making this series possible they're
wonderful partners to work with and you
can get all the parts that you need the
the server shield the Raspberry Pi and
the batteries everything you need except
I don't think you think you can buy the
RC car for them from them but just about
everything else and of course we want to
thank them for bringing us out here to
the spark fund ABC 2017 and we're going
to be doing more coverage from this
event both from the the autonomous
vehicle competition the robot combat and
everything else that's really cool here
at Maker Faire Denver so keep an eye on
the YouTube
and make Singh Kham for more content
from that from this weekend once again I
want to thank you William for joining us
on the stream today I want to thank
everybody in the chat for all their
great questions and all their great
comments and other than that thank you
very much for watching and we will see
you next month with the next episode of
make live thanks guys I remember what I
told you yeah don't make eye contact he
takes as a personal challenge hello Pat
yes can I get a he'll take a Raspberry
Pi 3 why for you told you hey but I did
hear this new deli I can go pick up the
sandwiches
when a new key calm to find thousands of
boards and stock already for immediate
shipment
you