Anonymous Go-Kart: Specification Report
Anonymous Go-Kart: Specification Report
Anonymous Go-Kart: Specification Report
May 9, 2011
Henry Jenkins
[email protected] (83238549)
Wim Looman
[email protected] (92692734)
Simon Richards
[email protected] (84974076)
Zachary Taylor
[email protected] (76691819)
Supervisor
Dr Andrew Bainbridge-Smith
[email protected]
Department of Computer and Electrical Engineering
University of Canterbury, Christchurch, New Zealand
Abstract
This project looks at transforming an electrically powered, mechanically controlled go-kart into
an autonomous vehicle capable of driving and navigating without human assistance. We have
three main goals for this project. The first is to integrate a drive by wire system into the gokart, so that it can be easily controlled by a laptop. The second is to develop a set of libraries
and example applications that makes use of on-board sensors and the drive by wire system
to execute a simple autonomous algorithm. This algorithm will follow a marker allowing the
kart to automatically follow a person or vehicle. Finally while we wish to progress further
and develop a program that will allow the kart to detect obstacles and navigate between GPS
points we believe that we will not have sufficient time to make any significant progress towards
this final goal. To date we have developed schematics and detailed plans for the drive by wire
system. We have begun to order parts and will begin putting together the systems in the next
few weeks.
Contents
Project Overview
Requirements
2.1
Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2
Specifics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3
Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1
Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2
Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3
Braking System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4
Steering System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.5
3.6
3.7
10
11
4.1
Budget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
4.2
Timeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
13
ii
Project Overview
The aim of this project is to convert an existing electrically powered go-kart into an autonomous
vehicle with the ultimate goal of circumnavigating a campus building without human interaction.
Autonomous vehicles and more specifically driverless cars are part of a field of research that has
seen a large amount of development in the last few years. This research comes as the increasing
power of computers makes the processing of sensors and the decision making required by these
vehicles able to happen in real time even when the vehicle is travelling at high speeds.
There are many advantages to this automation. These include improved safety (annual road
deaths currently stand at 1.3 million[5]) by preventing road accidents caused by human error,
the transportation of loads in dangerous areas such as disaster zones and improving traffic flow.
For these advantages to be realized however robust programs must be developed that will allow
the vehicle to adapt to operate in a varied and continually changing environment with many
unknown variables to compensate for.
Recent projects in this area can be divided into two main areas. Vehicles for surfaced roads and
free ranging vehicles. On surfaced roads the major current project is the Google driverless car
[6]. This system combines information gathered by Google street view with information from
its on board sensor array to drive on highways with no human interaction. To date these vehicles
have driven over 200,000 km without any incidents. A second major driverless vehicle project
was the VisLab Intercontinental Autonomous Challenge which ran in 2010. In this challenge
4 autonomous vehicles were driven on a 15,000 km trip from Parma, Italy to Shanghai, China
with almost no human interaction [2].
In free ranging vehicles the DARPA grand challenge run by the US military offered contestants
a $2 million prize for the autonomous vehicle that could complete their off road coarse in the
shortest time. The winner of this race vehicle in 2007 completed the 96km course in 4 hours 10
minutes averaging 23 km/h over rough terrain [3].
All recent large projects into autonomous vehicles have made extensive use of LIDAR (light
detection and ranging) sensor that rapidly scans a laser over the environment measuring distances to create a map of the surroundings. These maps can then be used to allow the program
to make decisions about its operation based on a very accurate picture of the world. The only
disadvantage with the LIDAR is its large price tag when compared to any other form of sensors.
A low cost LIDAR that can operate in direct sunlight costs in excess of $5000.
2
2.1
Requirements
Goals
Given the continuous nature of this project the only constraint upon our progress is time. The
issue here is that we may set goals beyond what we have time to achieve, and consequently fail
those goals.
To avoid doing this we have split the projects measurable goals into two categories, those we
need to achieve to at least deliver a platform for future groups (i.e. implementing drive-by-wire);
and those we need to run the go-kart at a behavioural level. As the goals in the second category
require the completion of those in the first, they have a lower priority for us. We expect to
achieve drive-by-wire control within the deadline, however completing the behavioural control
aspect may not be a realistic goal due to the time constraints.
2.1.1
We Expect to Achieve
A fully Drive-by-Wire go-kart controllable over a USB link. Safety constraints, an interface for
sensors and low level control of braking, steering and motor power that will all be provided by
an embedded system. If this is all completed without any progress on the behavioural software
then the USB command interface will need to be documented for future groups.
2.1.2
We Hope to Achieve
The abstraction of the control of the karts systems (steering wheel angle, brake force etc.) into
higher level commands such as speed and direction. The selection and integration of an array
of sensors onto the go-kart allowing sufficient information for autonomous control.
An example application proving the go-karts autonomous-ness. This will require a software application running on a laptop, and the sensors connected to the laptop through a microcontrollers. We had originally hoped that this application would demonstrate object detection
and avoidance however due to time constraints this application will most likely be of a more
basic nature that shows off the potential of the system rather then being a solution that demonstrates what autonomous systems are capable of.
2. REQUIREMENTS
2.2
Specifics
Each set of goals mentioned above covers one of the two components we have split the project
into. They are the drive-by-wire (DbW) system and the PC-based behavioural control. The
specific requirements of each subsystem are defined below.
2.2.1
Drive-By-Wire
In order to achieve full computer control all of the go-karts mechanical control systems must
be replaced with electromechanical actuators interfaced through a micro-controller network.
Additionally, the same network must control the go-karts electric motor and gather feedback
from all systems for full, closed-loop control.
Since the go-kart has an electric motor there are two components requiring actuation, the brake
and the steering mechanism.
Braking
The braking system requires linear actuation to drive the hydraulic brake.
Steering
The existing steering system uses a rack and pinion system to steer. Converting this into a DbW
system requires a low speed, high torque motor driving the pinion. The absolute position of of
the motor needs to be tracked so the motor can be run in a closed loop.
Control
The control system requires a way to set the position of the steering and brake systems using
the actuators outlined above. Additional to this is the control of the of the accelerator. This
system requires the control system to interface directly to the microcontroller that is running
the electric motor.
2.2.2
An array of sensors must be attached to the kart that provide all the information the go-kart requires to interact with its environment and perform actions without hitting obstacles or requiring
human interaction. These sensors must be connected to the main control system.
To meet what we hope to achieve for this project we must then be able develop a program on a
laptop and attach this to the go-kart via a simple to use interface. The program must operate the
steering, brakes and accelerator to provide autonomous functions that can be carried out in an
uncontrolled environment without human interaction.
2. REQUIREMENTS
2.3
Safety
Safety is a large concern on this project. The go-kart we are provided with can reach speeds
of over 50 kmph and weighs over 100kg. This gives the system the potential to cause serious
damage and injuries if we were to lose control. Because of this all stages of design require
careful consideration of safetey aspects.
The go-kart will require an on-board kill switch to allow programs to be quickly aborted mid
test by a person in the passenger seat. The go-karts accelerator must be limited to prevent it
having the capacity to achieve high speeds. Systems must be implemented to ensure the gokart stops immediately if any of its controls fail, the laptop battery becomes low or the battery
powering the actuators starts to run out of power while the kart is traveling at speed.
The potential for harm caused by the kart is not limited to it hitting objects. The actuators for
controlling the karts mechanical systems will also be applying large amounts of force. This
means that the systems will require appropriate guards around their moving parts to prevent
fingers or other body parts being caught in the system and injured.
3
3.1
Approach
Soon after receiving this project it was decided that we would break the project up into a series
of smaller projects that we would complete in series. This decision was made after we realised
that the transformation of the provided go-kart to a fully working autonomous vehicle was a
goal that we would be unlikely to achieve in the time allotted.
If we start all of the sub-systems in parallel then it is likely that by the final deadline we would
have many incomplete subsystems putting a steep learning curve in front of any continuation of
our work.
By dividing the project into a series of modules with simple well documented interfaces between
each we will ensure that we leave a single clean interface with which any future team can build
upon with minimal repetition of work. The sub-projects we have divided this project into are
outlined below
Drive by wire This is the conversion of the go-kart from a traditional mechanical system to
something that can be controlled by a laptop.
Sensor interfacing In this module the sensors the system will use to perceive the karts state
and the world around it are chosen. After selection they will be attached to the kart and
interfaced with the control system.
High level control of systems The drive by wire module will provide kinematic control of the
karts speed and turning angle abstracting away low level control from the behavioural
layer. An example of this abstraction is using the brake, accelerator and the Hall Effect
velocity sensor to implement a closed loop controller for the karts speed.
Simple autonomous behaviour This stage is the development of a simple to implement program for autonomous control of the kart. For example using radio triangulation or computer vision to track a token so that the go-kart can autonomously follow a person or
another vehicle.
Complex autonomous behaviour This module would see the integration of reactive path finding using distance sensors and absolute positioning using GPS into the autonomous gokarts system. These will enable it to operate as a fully-fledged autonomous vehicle able
to operate without any form of human interaction or control. When completed the gokart will be capable of autonomously navigating to a GPS location whilst safely avoiding
obstacles along the way.
5
3.2
Safety
As was outlined in the goals the kart has the potential to cause serious harm if the system fails to
operate correctly. Because of this we have placed protocols in our design process to ensure that
the go-kart is a safe system. The microcontroller controlling the accelerator will be configured
so that it will never send a value to the accelerator that will allow the go-kart to travel at speeds
greater then 10 kmph.
The microcontroller controlling the brake will apply the brake unless a signal is received periodically telling it not to. This will ensure that if the CAN bus fails or the control system
computer stops responding that the brakes will immediately be applied. A similar system will
ensure the accelerator is also off in this situation. In the event that the brake microcontroller
fails to respond the control system will immediately disable the accelerator.
During initial software testing the karts motor will be disabled, followed by testing with the kart
placed on blocks so that its wheels do not touch the ground. This will allow us to thoroughly test
all systems and most combinations of inputs without the kart moving or having any potential
to lose control and crash. Once this testing is complete and during all future testing somebody
will always ride in the karts passenger seat prepared to hit the emergency motor kill switch if
the behaviour of the kart does not follow match expectations.
The linear actuator is almost entirely enclosed and moves only small distances, thus it requires
no form of guard. The gear motor while slow moving has such a high turning force it has the
ability to cause serious harm. Because of this the shaft attaching it to the pinion driving the
shaft will be encased to prevent potential harm.
3.3
Braking System
The go-karts brakes will be controlled via a linear actuator. This will be connected by removing
the brake pedal and connecting the actuator directly to the input of the hydraulic brake systems.
It was decided to use the existing hydraulic system rather than attach a controlled actuator directly to the brake disk. This was done as it allowed the system to be attached and operated with
minimal modifications to the existing kart. Another reason this decision was made is that actuators with relatively low force and large travel were much more readily available and cheaper
then those with small movement and high force and the existing hydraulic system already converted this large movement into the high force required resulting in a cheaper system. Through
rough testing it was determined that a human could apply approximately 300 N to the brake
pedal. The leverage in the brake pedal was estimated at be roughly a 2 to 1 system. This meant
the ideal actuator had to provide 600 N of force to operate the brakes. To go from full off to
fully on the actuator required 30 mm of travel.
The actuator selected to power the brake was a 24V Warner linear m-track1. Its specifications
deviated from our requirements slightly. The actuator had 100mm of travel more then three
times the required making it longer then necessary. However space was not an issue so this was
not seen as a problem. The actuator could only produce 450 N of force, it has yet to be seen how
fast a deceleration this will allow however as 600N is the maximum a human could reasonably
apply we are confident 450N will be sufficient. In the unlikely event this force proves too small
in testing the large travel of the actuator means it can instead be mounted to the brake pedal
using the leverage to give the required force. The actuator moves at 15mm per second under
load. This means that from off to full lock takes 2 seconds. This speed is a lot slower then
desired however the brake pads do not actually touch the brake during the first half of the travel.
This dead zone is there to prevent drivers accidentally applying the brakes and to accommodate
different thickness brake pads as they wear. If the servo is recalibrated on a regular bases this
dead zone can be all but removed allowing full brake control in a second. The main driving
decision in the purchase of the actuator was price. The actuator was an end of line product that
had been heavily discounted to sell this meant that it only cost $110 NZD including shipping to
New Zealand from America. An actuator of similar specification could not be located for less
then $220 in the US or within New Zealand for less then $300.
3.4
Steering System
The steering on the go-kart operates on a rack and pinion system. The steering wheel rotates
from lock to lock in 270 degrees. At rest on concrete the wheel requires 7 Nm to turn, this value
represents a worst case scenario with significantly less force required when the kart is moving
or on grass. Initially a servo was going to be used to drive the steering wheel however servos
with the ability to produce 7Nm of continuous torque at a reasonable speed were found to be
both difficult to locate and prohibitively expensive ($500+). Instead a system of a DC motor,
gearbox and encoder is to be used. For the motor to be attached the steering column will be
removed and the output of the gearbox will drive the pinion directly with the motor bolted in
the space left by the removed column.
The motor system selected for use in the go-kart is the IG52-04 52mm gear motor. It comes with
a 1:353 gearbox and a Hall Effect encoder attached to a second rear output shaft on the motor.
This motor was selected as it combined all the required system into one convenient system
which required no assembly on our part. Another major reason for its selection was the large
difficulty that was encountered in finding any reasonably priced gearbox that could sustain the
continuous torque requirements of the system. This motor produces 10 Nm of continuous torque
which will allow it to easily turn the wheel. Its gearbox output rotates at 10 RPM allowing it to
travel from lock to lock in 4.5 seconds. A concern with using this motor is that it has the ability
when stalled to produce a peak torque of up to 100 Nm. This high torque has the potential
to damage the steering system or the gearbox which is only rated for peak torques of 30 Nm.
Because of this it must be ensured that the wheel is never driven right up till the end of its travel
to prevent the motor stalling against the end and generating these forces. The encoder must be
calibrated upon each setup of the system. This is because the encoder only outputs change in
rotation and the rack may be in any position when the system is initialised. Because of this
limit switches will be placed on small plates attached to the rack shaft to indicate when it has
reached the end of its travel. On start up the motor will locate both limit switches to calibrate
its location. These limit switches will also act as kill switches during operation to prevent the
motor reaching the end of its travel.
3.5
Both systems operate on 24V. This was done as the go-kart already had a 24V rail for driving
the main motor. Using the same voltage saves money and simplifies the design as it precludes
the need for converters that would have to be capable of the 12A peak currents produced by the
system. Both systems are controlled through an H-Bridge interfaced with a SAM7 processor
connected to a can bus. These SAM7s take care of all the low level control required to operate
the drives allowing the main control computer to operate them at a high level with instructions
that corresponds to desired behaviour rather low level drive operation.
The SAM7 responsible for steering will take the desired wheel angle as an input from the can
bus. It will also track the encoders output to calculate the turning angle. Running a PID
controller between the setpoint and current value it will send the PID loops output as a PWM
signal to the H-bridge.
The design of the linear actuator is similar. The SAM7 will be passed the current and desired
speeds of the go-kart. From this and the voltage output by the potentiometer built into the linear
actuator the error in the actuators location will be found. Again a PID controller will drive a
PWM signal to the H-bridge controlling the actuator.
3.6
For high level control it was decided to design a system where the go-kart can be fully controlled
by a laptop using a simple USB interface. There are a few reasons behind this decision, the
biggest one would have to be the much nicer programming environment presented on a standard
PC. A large availability of higher level languages and better libraries for any low level stuff that
may be required means that it will be easier to design and build the control system.
This also makes it much simpler to interface to a set of more complex sensors, doing any sort
of computer vision system on an embedded system would require a lot more effort to design,
build and test than doing the same on a standard PC.
To support this simple USB interface a modular design will be employed, a general overview
of the approach can be seen in Fig. 3.1.
3.6.1
CAN bus
The first decision required for the design of the logic boards was what communication protocol
should be used between boards, it would require only a low data rate but it would have to be
able to communicate over at least 3 meters and be resistant to noise. Because the go-kart is
driven by a large electric DC motor, there is likely to be electromagnetic noise in the vicinity of
the go-kart.
Our first thoughts on this was the simple serial buses that we had used previously; Universal
Asynchronous Receiver/Transmitter (UART), Serial Peripheral Interface bus (SPI) and InterIntegrated Circuit (I2 C). Unfortunately these buses are limited in range and can be highly susceptible to noise.
Dr. Michael Hayes (personal correspondence, April 2011) suggested Controller-Area Network
(CAN-bus) or Local Interconnect Network (LIN-bus) as industry standard bus-systems used in
automotive applications. Because of their design they are very robust standards that will work
SAM7X
To control the various parts of the go-kart we have decided to use the AT91SAM7X256[1]
manufactured by Atmel. This MCU is based on the ARM7 architecture with 256 kilobytes of
flash memory. This chip has been in previous University of Canterbury assignment and can be
purchased from both Digikey and Element 14.
10
To implement the CAN bus we needed to use a MCU that supported a hardware based CAN
bus controller. The other choices of MCUs to use, that provided this functionality, are the
ATmega64C1 or AT90CAN. We chose the SAM7X over these two options mostly because we
wanted to stick with a familiar architecture. The other large consideration that influenced our
decision was that we wanted a MCU that provided a built in USB device port.
3.7
Currently we plan to develop a simple program that will allow the kart to autonomously follow
a person or other vehicle. This system was chosen as it can be quickly implemented, acts as a
demonstration of how the system will operate and can provide a useful real world application.
This program would allow the go-kart to operate as a smart trolley allowing a person to transport
equipment between two locations. While at first glance this program may seem to have limited
real world applications a robot known as big dog is currently being developed to perform the
same function carrying 100kg of equipment over rough terrain[4].
A decision as to how the marker will be tracked is still to be made, however it has been narrowed
down to one of two options. The first option is to use the marker as a ball of known shape
size and color and have this tracked by a webcam. This system would be cheap and easy to
implement but inaccurate and error prone with the ball always having to be clearly visible.
The second option is to use a marker that sends out pulses that are picked up by three RF
receivers. This option while more difficult and will take longer to get working would be far
more robust and accurate offering superior performance.
4
4.1
Budget
After building preliminary system designs, a bill of materials including parts costs has been
composed. Where possible pieces have been sourced from either Digikey, Element 14, Mouser
or estimated if the components will come from the ECE store.
Currently both the gear motor with encoder and the linear actuator have been ordered as they
have a month lead time coming from the USA. All other components will be ordered within the
next two weeks.
Steering
Part Number
IG52 04
Shipping
DRV8432
Braking
5 1752
Shipping
Accelerator
ATMEGA8L
LM317KCS
CAN Bus
PL-STP6-0
PL-STP6-1
SS60000-009G
Header 10X2
fdd8445
SW-PB
AT91SAM7X
ATA6660
AE9925-ND
MCP130T-300I
Other
Shipping
Description
24VDC 10rpm Gear Motor with Encoder
Gear Motor Shipping
Motor Driver
Mounting Bracket
4" stroke 100lb 24VDC Linear actuator
Linear actuator Shipping
Mounting Bracket
Interface to go-kart power control
IC VOLT REG POS ADJ
PCB
0.5M Cat6 STP Lead (CAN Bus)
1.0M Cat6 STP Lead (CAN Bus)
RJ45 JACK (CAN Input/output)
Header, 10-Pin, Dual row (JTAG )
MOSFET 40V, 50A, 8.7m
Switch (Reset)
Microcontroller (CAN Controller)
High Speed CAN Transceiver
USB Type B connector
Microcontroller Supervisory Circuit
PCB Manufacture and shipping
Misc Components (Diodes, Resistors, Capacitors, Wire, Headers)
Shipping from Digikey and Element14
Qty
1
1
1
1
1
1
1
1
1
1
3
1
10
5
5
5
5
5
5
5
1
1
Cost
$185.00
$75.00
$16.00
$50.00
$50.00
$50.00
$50.00
$5.16
$1.13
$20.00
$4.50
$5.70
$4.96
$1.00
$2.00
$3.00
$19.37
$2.47
$1.52
$0.76
$217.00
$60.00
Subtotal
$185.00
$75.00
$16.00
$50.00
$50.00
$50.00
$50.00
$5.16
$1.13
$20.00
$13.50
$5.70
$49.60
$5.00
$10.00
$15.00
$96.85
$12.35
$7.60
$3.80
$217.00
$60.00
$30.00
Total
$30.00
$1,030.69
11
4.2
12
Timeline
The Autonomous Go-Kart project has been broken down into small sections then time allocations have been put next to each task. Where possible we have put in dependencies between
each of the tasks. However this model of only starting one task once the previous one has been
completed is not very accurate. For example the control software has been represented as requiring the hardware to be complete. Actually the control software will be started much before
the hardware is complete.
To make sure the project deadlines are met, milestones have been added for each assessment
or deliverable. This puts the whole year in perspective, including where we are currently with
handing in the specification report. There will also be weekly milestones added that will be set
and evaluated each meeting. These weekly milestones are to ensure we keep on track with the
scheduled timeline.
The project was divided up into several modules as was outlined in the approach and preliminary
design section. The current status and discussions of our ability to complete these modules are
outlined below.
Drive by wire For this system we have already completed a fairly detailed preliminary design
on how the system will work, how the different sections will communicate and begun
ordering the required parts. We are all fairly confident that we will have this section
completed well within the allotted time for the project
Sensor interfacing While there are no concrete plans for this module as of right now the group
has began to research which sensors would best suit the application and are within our
budget. The group has also looked into the best way to interface them with the control
system. Again we are fairly confident that this section can be completed in the time
allowed
High level control of systems For this section we do not yet have detailed plans for functions
required however we have brainstormed what many of them will be and what sensors they
will require. We believe that as long as no unforeseen problems occur during earlier parts
that this is again achievable.
Simple autonomous behaviour Apart from the idea of what we wish the kart to do and a rough
idea of some of the programming that would be involved no work has been done on this
section. We currently believe that if all other sections are problem free and go smoothly
that we may have time to finish a mostly functional version of this behaviour. We do not,
however, feel we will have time to get this system working 100%.
Complex autonomous behaviour We believe that getting the vehicle to a point where this part
is operational is a pipe dream. It is our goal this year to develop the system to the point
where groups in future years will be able to start at this point allowing them more time to
develop the highly complex algorithms this step requires. If time allows we will begin on
this section however currently this appears unlikely.
13
Bibliography
[1] SAM7X512/256/128 Preliminary. Atmel Corporation, San Jose, CA, USA, 6120i edition,
April 2011.
[2] A. Broggi, P. Medici, E. Cardarelli, P. Cerri, and A. Giacomazzo. Development of the
control system for the vislab intercontinental autonomous challenge. In Annual Conference
on Intelligent Transportation Systems, Madeira Island, Portugal, September 19-22, 2010,
2010. URL http://confactsdatas.inrialpes.fr/ITSC_2010_-_International_
IEEE_Conference_on_Intelligent_ITSC_2010_-_Transportation_Systems___
conference_proceedings/data/papers/0298.pdfl.
[3] U. Ozguner, K. Redmil, and A. Broggi. Team terramax and the darpa grand challenge: a
general overview. 2004. URL http://citeseerx.ist.psu.edu/viewdoc/summary?
doi=10.1.1.158.3682.
[4] D. Raibert, M. Wooden.
Bigdog: The rough terrain robot.
Boston Dynamics, 2009.
URL http://groups.engin.umd.umich.edu/vi/TRQSep2009/
BostonDynamicsTRQ6Sep09.pdf.
[5] L. Sminkey. World unites to halt death and injury on roads. 2011. URL http://www.who.
int/mediacentre/news/releases/2011/road_safety_20110506/en/index.html.
[6] S. Thrun. What were driving at. Offical Google blog, 2010. URL http://googleblog.
blogspot.com/2010/10/what-were-driving-at.html.
14