Black Knight - IGVC

15
Black Knight University of Central Florida 11th Annual Intelligent Ground Vehicle Competition Oakland University, Rochester, Michigan May 31, June1-2, 2003 Faculty Statement I certify that the work done by all students on this project is consistent with a senior design course and that the vehicle has been significantly modified for this year's competition. _________________________________________

Transcript of Black Knight - IGVC

Page 1: Black Knight - IGVC

Black Knight

University of Central Florida

11th Annual Intelligent Ground Vehicle CompetitionOakland University, Rochester, Michigan

May 31, June1-2, 2003

Faculty StatementI certify that the work done by all students on this project is consistent with a senior design course and that the vehicle has been significantly modified for this year's competition.

_________________________________________

Page 2: Black Knight - IGVC

1 Acknowledgments

1.1 Sponsors

Program Executive Office for Simulation, Training, and Instrumentation (PEO STRI)United States ArmyOrlando, FL, USA

http://peostri.army.mil

Computer Engineering ProgramSchool of Electrical Engineering and Computer Science

University of Central FloridaOrlando, FL, USA

http://www.cpe.ucf.edu

1.2 Donors

Advanced CircuitsDenver, CO, USA

http://www.4pcb.com

Baumer ElectricSouthington, CT, USA

http://baumerelectric.com

Microchip, Inc.Chandler, AZ, USAhttp://microchip.com

PNI CorporationSanta Rosa, CA, USA

http://www.pnicorp.com

Maiden MarinePinellas Park, FL, USA

http://blews.com/maiden/

Thales NavigationSanta Clara, CA, USA

http://www.thalesnavigation.com

1.3 Faculty

Dr. Fernando G. GonzálezProject Advisor

Computer Engineering

Dr. Christian S. BauerAdministrative Supporter

Computer Engineering

Dr. Avelino J. GonzálezFaculty Supporter

Computer Engineering

1.4 Team Members

Frank GoergenTeam Captain;Coordination & Fundraising

Computer Engineering, Senior

Richard Andres Electronics, Power System

Electrical Engineering, Senior

Matt Rhodes Chassis, Sensor Software

Computer Engineering, Senior

Tim RobertsElectronics, Power System

Electrical Engineering, GraduateStudent

Josh WilsonComputer Vision

Computer Science, Senior

Sarah WongMicrocontroller Software

Computer Engineering, Senior

Gary SteinArtificial Intelligence, Path Planning

Computer Science & Electrical Engineering, Senior

Page 3: Black Knight - IGVC

2 Introduction

The University of Central Florida (UCF) is entering into its second year of competition, and the

current entry, Black Knight, is the result of a senior design project, independent study work, and

sponsorship from the U.S. Army PEO STRI (formerly the U.S. Army STRICOM). Participation

comes from a continuing effort at UCF to make research an integral part of its undergraduate

program. Particularly, the School of Electrical Engineering and Computer Science and the Computer

Engineering Program have encouraged the team by providing support in the form of equipment to the

UCF Undergraduate Robotics Laboratory. The laboratory, which was founded last year by Dr.

Fernando Gonzalez and Frank Goergen, hosts several undergraduate thesis projects in addition to the

IGV project.

3 History

Knightrous was UCF's first entry in the Intelligent Ground Vehicle Competition. Although it

was unable to compete due to a circuit failure, its second incarnation, Black Knight, is ready after a

complete redesign of the power distribution and vehicle controller systems. Additionally, the

primary software systems, namely the navigation and computer vision systems, had solely been

tested through simulation, but are now reformed and have proven to be fully functional. The

redesign of the power system, controller circuits, controller software and vehicle body were the

responsibility of the senior design students, while the other team members were responsible for

completing the remaining portion of the vehicle.

4 Overall Design Goal

The overall goal for redesign of the vehicle was to make it more compact, stable and modular.

The vehicle is based on a Pride Mobility Celebrity electrical wheelchair. This base easily carries the

weight of all components and is capable of climbing grades well above those required by the

competition. The circuits were redesigned using two Microchip microcontroller units (MCUs) to

control speed, steering and emergency stop. This is a less complex and therefore more robust

approach than that previously used. The power system was redesigned to be lighter, more compact

and efficient. The vehicle was also redesigned to be more stable. All circuits were redesigned to

provide stability for both the vehicle and vision system. Speed and steering algorithms were

rewritten to provide better performance and an error code system. This allows the software to control

the vehicle more accurately and to stop under undesirable conditions. In addition, the approach to

Page 4: Black Knight - IGVC

sensor fusion has been reevaluated, and a separate hardware unit is no longer used for parsing and

conditioning sensor data. The new implementation uses spare CPU cycles for these functions.

Finally, the vehicle's design focuses on modularity which allows “pit crew” style repair in a matter of

minutes.

5 Electrical System

The following section explains in detail how the electrical system was redesigned. In the

previous vehicle there were five circuit boards running five separate MCUs. The new vehicle only

uses two MCUs on one circuit board to control all aspects of the vehicle's motion. This and the H-

bridge board are mounted in a metal box which slides into the vehicle like a drawer. For easy

troubleshooting, the team has two of these circuit boxes so that one can be worked on while the other

is on the vehicle. Another new feature of Black Knight is a manual control box which allows the

vehicle to be controlled with two potentiometers for easy movement from place to place. On this box

there is also a switch which selects whether a human operator or the computer is in control of the

vehicle.

Figure 5.B - View of Circuit Box MountedFigure 5.A - MCU Circuit Board

Page 5: Black Knight - IGVC

6 Steering Control

The improvements to steering control are refined

programming and a new scheme for obtaining feedback

from the steering system. Additional safety features

were added to the vehicle to ensure a smooth and stable

steering design. Software for the steering system was

completely rewritten this year, also on a PIC16F877

MCU. Steering software was rewritten from assembly

to C language for ease of implementation and

troubleshooting. The circuit was redesigned both to make it more compact and to increase its

modularity. This circuit now fits with all other circuits on one board which easily mounts in the

circuit box. Also, the H-Bridge circuit that is used to control the polarity of the steering motor was

redesigned to handle higher current. This circuit was redesigned replacing store bought Darlington

pair transistors with Darlington pairs composed of discrete power transistors. This new design

eliminates circuit failures encountered previously. New software was added which incorporates a

delay when steering motor direction is reversed. This protects the H-Bridge circuit from damage.

Error handling was added in software to limit steering travel so that the chain and motor bracket

cannot be harmed. The software was also modified to dampen oscillation and provide more accurate

control of the steering motor.

7 Speed Control

The speed control MCU of Black Knight is a Microchip PIC16F877. It has five ports for

multiple input/output lines and a 4 MHz clock for quick execution. An encoder on the left rear wheel

is used to obtain the current speed of the vehicle. The PIC controller processes the encoder values

and relates them to the main computer via RS-232. The main computer receives the current speed

and compares it to the desired speed. In response, a new desired speed value is calculated and sent to

a D/A chip on the circuit board which sends the specified voltage to the motor. This scheme provides

smooth and stable speed control of the vehicle. The software for speed control is written in the C

language, eliminating the need for assembly programming which was problematic during the

previous year. The algorithm includes a ramping method to smooth the acceleration and deceleration

of the vehicle. The vehicle itself is equipped with a potentiometer that limits the overall speed. This

potentiometer will be used to limit the speed of the vehicle to a maximum of 5 mph.

Figure 5.C- Manual Controller Box

Page 6: Black Knight - IGVC

8 Safety

The emergency stop (E-Stop) system was completely redesigned for Black Knight. In the

previous year the E-stop system was implemented in software. For this competition a hardware

solution was used to ensure E-stop capability is unaffected in the event of software failure. The

design takes advantage of the onboard Curtis speed controller embedded in the vehicle. It has two

methods of triggering an emergency stop. A Futaba RC controller and a stop button are used to break

one of the control lines to the Curtis controller which in turn causes an error condition and

completely stops the drive motor. This new design ensures that if either software or hardware

malfunction, the vehicle will stop safely. The system has been tested and brings the vehicle to a stop

in well under the specified six foot distance.

9 Sensors

The sensor suite used for this year's vehicle uses the same sensors as last year, however, the

method of sensor fusion has been completely redesigned. Provisions have also been made on the

circuit board to easily allow for the inclusion of additional sensors in the future. A TCM2-50 Digital

compass with an accuracy of ±1° RMS and a BR2G Differential GPS with a circular error probability

of 40 centimeters are used. The MDFKG2101 magnetic encoder is reused, however, its output is

now passed to the main computer by the speed MCU. To simplify the design, a separate board for

data conditioning is no longer used. GPS and compass are given individual serial ports on the main

computer so that data can be collected directly from them. The new design takes advantage of

unused computer capacity and reduces the circuitry significantly.

The Kalman Filter has been eliminated from this year's design to help simplify the vehicle and

make the design more compact and easier to troubleshoot. The Kalman Filter proved to be difficult

to work with after testing the vehicle and it was decided to eliminate it to further simplify the design.

The data conditioning and parsing are now handled by the main computer.

10 Mechanical

The steering motor is a Bodine Electric 24V motor with a 60:1 gear reduction. This motor is

linked to the steering input shaft of the vehicle via a chain and two sprockets which add a further

3.75:1 reduction. Feedback to the steering microcontroller is needed to allow accurate control of the

steering angle. Two switches and a potentiometer are included in the design to provide this feedback.

One of these switches is positioned at the front of the vehicle so that it is depressed when the steering

Page 7: Black Knight - IGVC

is within ±4° of center. The other switch is positioned so that it is depressed by the steering cross

member when the steering is at either limit of its travel. The mechanical limits of the steering system

are at ±45°. Feedback about the current angle of the steering system between center and turn limits is

also needed. Last year's

design used a belt between the

output shaft of the steering

motor and a pulley on the

shaft of a potentiometer to

provide this feedback.

Currently a ten turn

potentiometer is mounted

above the steering cross

member. A cord is attached

between the steering knuckles

and wrapped around the shaft of this potentiometer so that it rotates as the front wheels turn. The

potentiometer provides a feedback voltage to the steering microcontroller proportional to the current

steering angle. This method was chosen because it increases the feedback voltage range and limits

slippage by eliminating the pulley on the potentiometer shaft used in the previous design. Both of

these improvements increase the accuracy and stability of the feedback voltage.

11 Power System

For the 2003 IGVC the power system has been redesigned to improve efficiency, weight, and

run time. Last year's vehicle was powered by the original batteries and a UPS system. The current

system does away with the heavy and bulky UPS. Currently the vehicle is powered by a total of four

batteries. The two deep cycle batteries that were the original power source are retained. They power

the steering and drive motors in addition to the 24 V portion of the steering circuit. Two additional

55 amp hour batteries are used. One of these powers all 12 V circuits mounted in the circuit box,

vision cameras, camera multiplexer, and sensors. The final battery powers vision and main

computers through a 1200 Watt Mobile Power inverter. Separate fuses on the 12V and 24V supply

lines protect the circuits. Extensive testing has shown that this power system is capable of powering

all systems for times in excess of an hour.

Figure 10.A - Steering Feedback Potentiometer and Limit Switch

Page 8: Black Knight - IGVC

12 Chassis

The body of the Black Knight has been redesigned from that used on last year's vehicle. The

old body offered less protection for the components inside while making access difficult and

uncomfortable. The new body is a two piece design fabricated out of foam-cored fiberglass. The

rear half of the body

is permanently

attached to the

vehicle. It has a

window for the on-

board monitor as well

as two doors. The

doors provide easy

access to the interior

of the vehicle where

the inverter and

battery for the computers are located. The removable front portion of the body covers the computers.

The two parts of the body join with a seal and provide protection from the elements. This body

design allows quick and easy access to all the modular components of the vehicle.

13 Software

13.1 Main Computer

The main computer provides the majority of the computations that deal with motion planning

and control of the vehicle. A majority of the software base was constructed for the 10th Annual IGVC

competition, however, since the vehicle testbed was not fully completed it was not extensively tested.

At that point in time, all the work was purely simulation of vehicle motion with estimated movements

and artificial terrain. This year some software organization was changed and tasks were reassigned.

Because of the modular design this could be accomplished without having to rewrite any of the

subcomponents, only changing which components are used.

13.1.1 Organization

To recap the previous design, the main computer's program is broken up into many small

subprograms. Each of these does a specific task and shares results or gains input from a different

Figure 12.A - Illustration of how the two piece body fits together.

Page 9: Black Knight - IGVC

program. This can be done through the Linux operating system's inter-process communication and

shared memory. The general structure uses a maritime nomenclature that provides each subsection a

name that is descriptive of what it does. Input comes from the GPS and compass and provides

position and direction to the Coxswain program which then sends this information to the shared

memory. The Cartographer receives map updates from the vision computer and sends back position,

direction, and camera values. The Captain program determines the current challenge and controls

what relevant information is passed to the other components. The Navigator takes the digital map

from shared memory and finds a reachable node path during the navigation challenge. During the

autonomous challenge it finds the path of least resistance. Necessary information is passed back to

the shared memory where the Captain controls the Helm program which tries to physically match the

theoretical path physically by looking ahead and adjusting the vehicle's desired angle. The values are

interpreted by the Engineer which redefines the data and sends out specific information to the speed

and steering MCUs which physically control the motors at regular intervals. In addition, the Lookout

scans all incoming path data and compares it to the current position to determine any obstacles that

Figure 13.A - Computer Systems Data Flow

Legend

Page 10: Black Knight - IGVC

need to be circumvented. Then it sends a message to the Captain to stop and tells the Engineer to

turn on the obstacle light. Due to data transfer time and the way in which these messages are sent,

this process can occur approximately five times a second. All the information in shared memory is

also processed into a human readable format and sent to the on-board monitor. These programs run

simultaneously on the main computer which allows the information to be constantly updated and

shared to all programs such that the data is always current. In total, these programs provide the

intelligent control of the vehicle.

13.1.2 Major Changes

The first major change to the overall system was to add the follow-the-leader challenge which

was not part of last year's competition. This process was greatly simplified by the modular nature of

the system. The Captain was given a new function for motion control and the Cartographer takes in

some additional information from the vision computer about target position. The Captain then

determines desired direction from that information and starts the other processes. The rest of the

system remains unchanged because control of the vehicle is broken up into different subprocesses.

These subprocesses do only low-level tasks which do not change for the individual challenges.

Another major change from last year is a more complex system of path determination during

the autonomous challenge. In the new process, map data in the local area is filtered with a Gaussian

blur. This expands the obstacle positions in a normal distribution, which provides a buffer around

individual obstacles and combines closely spaced objects into one obstacle. The local map is then

processed through a system of linear traversals in the forward direction and the safest path is selected

by the degree of "obstacle" in immediate vicinity.

In response to experience gained from last year’s competition, much more emphasis was put on

slippage and error conditions due to the slick nature of the course. More vehicle correction and

correlation subroutines were added to account for these sources of error.

The most drastic change, from an organizational standpoint, is to data collection such that the

Coxswain directly communicates with the GPS and compass. In the previous year there was a high-

speed microcontroller called the Data Conditioner which took the physical information, processed it,

and passed on only what the main computer needed. After analysis of processor usage on the main

computer, this functionality was migrated to the Coxswain running on the main computer. There the

data is conditioned before being sent to shared memory. This allows a simplification of hardware

without impacting software execution, thereby decreasing complexity and increasing reliability.

Page 11: Black Knight - IGVC

13.1.3 Implementation

Software implementation for the individual challenges has been altered for this year's

competition. Depending on the current challenge, different path planning schemes are used to fit the

specified task. The modular design of the software allows the same subprograms to be used

differently to achieve individual goals. The underlying subprocesses that relate to motion control,

sensor capture, and vision processing are separate entities. The higher level abstractions calculate the

desired path of the vehicle which the rest of the system attempts to actualize.

13.1.3.a Navigation Challenge

For the Navigation challenge, a method of

abstraction is applied to the map constructed by the

vision computer. Since the GPS coordinates for the

waypoints are given, they must first be put in an

order which allows the generalized quickest

traversal. This can be done by using a Traveling

Salesman method on the points to determine the

order from start to finish. Once the points are

ordered, the program then attempts to travel the

straightest path toward the next point from the

current location. The algorithm plans the path such

that the center of the vehicle's rear axle comes within

0.25 meters of each waypoint. Initially, the map is

an empty square field. As obstacles are detected, the map is subdivided into smaller squares based on

the position of the obstacles. Of all possible paths, the algorithm then selects the appropriate one

based on these bounding squares. This implementation was chosen due to its ability to robustly track

around a large set of unknown objects and dilate them to create a safe path.

Figure 13.B - Navigation Decomposition Map

Page 12: Black Knight - IGVC

13.1.3.b Autonomous Challenge

The autonomous challenge provides different

requirements with respect to path planning. For this

challenge the algorithm must complete as much as

possible of the given track without being given prior

information. This is done by traveling the route

selected from the local map constructed in the main

computer. This map is derived from the global map

made from camera input by the vision computer. In

the event of a dead end trap, it is possible to

backtrack to the last known safe position using past

data points stored in memory. This allows the

program to reevaluate the previous branching point

if necessary. The ability to reverse out of a trap on

the course was felt to be an important innovation. Lines bordering the course are classified as

obstacles to be avoided, therefore keeping the vehicle's desired path safely away from the edge of the

course. The Gaussian blur used by the algorithm allows it to interpolate dashed lines and treat them

as solid.

13.1.3.c Follow-the-Leader

There is one main difference required by the follow-the-leader challenge. Only in this

challenge does the vehicle have to react in a positive manner to a detected object. Through the vision

computer, the leader is marked as an unique obstacle. The algorithm now plans a path toward this

obstacle while avoiding any others as they are detected. At the same time, the fact that the leader is

categorized as an obstacle keeps the vehicle from approaching closer than its three foot buffer

distance. This system was chosen to take advantage of the modular nature of the software and reuse

existing subprograms for this new goal.

13.2 Vision

The vision system is tasked with capturing real-time data and transforming it into a 2D map.

As this is the primary sensor system, it must be reliable, robust, and simple to use. Specifically, the

system gathers visual data, processes it, and develops an orthographic map based on this data, while

the main computer handles all navigation and control using the generated map. In addition to the

Figure 13.C - Display of Autonomous Mapping

Page 13: Black Knight - IGVC

data provided to the system by one of four cameras, it is also supplied with GPS and digital compass

data, which is used to correct the transformation of images into navigable obstacle information.

The main components of the vision system are the vision computer, a video digitizer, a video

multiplexer, and four externally mounted cameras. Three of these cameras face forward, and one

rearward. Of the three forward facing cameras, two are angled to the sides such that they provide a

180 degree field of view in front of the vehicle. The cameras' field of view extends approximately

nine feet in in front of them. The cameras are calibrated before use by a simple series of initialization

processes. After calibration, the system gathers video from a selected camera and processes the

video one frame at a time. Each pixel of every frame is then classified as either “Obstacle” or “Non-

obstacle” by using the statistics of previous frames and information about its color and local texture.

Next, this information is manipulated with two transformations: an orthographic projective

transformation from image space to world space, and a rigid-body transformation from world space

to 2D map space. As updates occur on the map, they are stored and sent to the navigation system

after the frame is completely processed.

The positions of the cameras give the vehicle a wide forward field of view and the option of

viewing to the rear of the vehicle, providing a versatile platform for gathering visual information

about the vehicle’s surroundings. The navigation system then selects the desired camera and notifies

the vision system of its request. At this point the vision system responds by processing data from the

Figure 13.D - Carpet for Vision System Calibration

Page 14: Black Knight - IGVC

new camera after a nominal switching delay. Therefore, the navigation system controls the direction

of the robot’s vision.

During the calibration process, the cameras are positioned and adjusted manually. The

physical calibration parameters are unknown to the user, however this extrinsic data is discovered

automatically using a

special calibration frame.

The data is then used in

the routine image

warping as previously

discussed. Color

calibration is also

automated, and is

established by placing an

object of precisely prepared color in the view of each camera. The system uses this data to better

understand global lighting conditions and eliminate the effects caused by changes in lighting, thus

finalizing the calibration process.

Visual processing is computationally expensive, so all but the most essential computations

have been eliminated from run-time processing. For example, all transformation and color

adjustment information is calculated and stored during calibration. During processing, the data is

loaded once and retrieved from active memory only as needed, allowing the classification of each

pixel of every frame to occur in the most efficient manner.

Figure 13.F - Additional Classifications

Figure 13.E - Image before and after Vision System Calibration

Page 15: Black Knight - IGVC

14 Budget

Description: Vendor: Quantity: Unit Price: Total Price:

All:Dell workstations, display, CD-RW, etc. Dell 1 $5,339.12 $5,339.12KVM and Serial PCI Dell 1 $100.00 $100.00Celebrity XL 4 wheel scooter Pride Mobility 1 $1,100.00 $1,100.00

Electronics:

SC34 DA Optima Yellow Top deep cycle Insight/Auto Zone 6 $150.00 $900.00Ashtec BR26-S DGPS Thales Navigation 1 $1,000.00 $1,000.00Electrical Components Newark $168.61 $168.61Mobile Power Inverter Mobile Power 1 $200.00 $200.00MDFKG2101 Magnetic Encoder Baumer Electronics 1 $35.00 $35.00TCM2-50 Digital Compass PNI Corp 1 $800.00 $800.00Electrical Components Skycraft Components $80.00 $80.00

Vision:PC 33C Color Camera SuperCircuits 4 $169.95 $679.80CML-4mm IF2,Cs mount lens with iris SuperCircuits 4 $24.95 $99.80DC 12/500R Power Adapter SuperCircuits 4 $14.95 $59.80AVR80000 RS-232 8:1 video multiplexer Ontrak Control Systems 1 $100.00 $100.00

Chassis:Bodine electric motor Power & Pumps Inc. 1 $469.00 $469.00Sprockets and Chain Miller Bearing 1 $150.09 $150.09Fiberglass Body Fabrication Maiden Marine 1 $780.00 $780.00

Total: $12,061.22

15 Conclusion

Black Knight is a significantly improved vehicle over that brought to last year's Intelligent

Ground Vehicle Competition. The major improvements consist of a modular approach to all aspects

of the vehicle. The modularity of the hardware design allows quick and easy repair and

troubleshooting of all components while the vehicle continues to operate. Software modularity

allows a set of individual subprograms to be reused for the various challenges with a small number of

controlling high-level algorithms. Overall, the current vehicle is a much more robust, complete, and

functional design which better meets the requirements of the competition's challenges.