why Java is so popular is the platform independence. Programs can run on several different types of computer; as long as the computer has a Java Runtime Environment (JRE) installed, a Java program can run on it.
Java is a strongly typed programming language because every variable must be declared with a data type. A variable cannot start off life without knowing the range of values it can hold, and once it is declared, the data type of the variable cannot change
3. Programming Language
• Description
• It is a set of instructions for commanding the
computer to perform some operations.
• Programmers write various programming
languages.
• Language Categories
• Machine Language
• Assembly Languages
• High-Level Language
4. • Machine Language
– It is a numeric language specifically
understood by a computer’s processor
– Machine language is machine dependent (not
portable).
– It makes humans cumbersome, slow, and
error-prone to develop system.
5. • Assembly Languages
• Represent elementary operations of computer in
English-like abbreviations
• Assemblers are developed to convert assembly to
machine language.
• It has a one-to-one relationship with machine
language.
1 0000 E8 MOV A,R0
2 0001 FA MOV R2,A
3 0002 2D ADD A,R5
6. • High-Level Languages
– They speed up the programming process.
– Compilers convert them to machine language
– Instructions is comprehensible to humans
• Looks mostly like everyday English
• Contain common mathematical notation
1 int sum, i, j;
2 i=100;
3 j=50;
4 sum = i + j
7. What is Java?
• History
– Green Project Announced by Sun in 1991
• Motivation: intelligent consumer-electronic devices
• Creator: James Gosling
• New Language: Oak
– Announcement in 1995
• Industry Conference in May 1995
• Netscape announced an agreement to integrate Java into
its browser.
8. • Properties
• It is a high-level programming language
• It is simple and purely object-oriented.
• It is portable, that is, executable at
different kinds of platform.
• It is developed in world wide web
applications.
• Write Once Run Anywhere (WORA).
• Designed for easy Web/Internet
applications.
• Widespread acceptance.
9. Characteristics of Java
• Java is
i. simple
ii. object-oriented
iii. distributed
iv. interpreted
v. robust
vi. architecture-neutral
vii. portable
viii. performance
ix. multithreaded
x. dynamic
xi. secure
10. Features removed from c++
pointers to avoid unauthorized access of memory locations.
excluded structures, unions and enum data types.
operator over loading
Preprocessor plays less important role in C++
and so eliminated entirely in java.
It is not possible to declare unsigned integers in java.
It is not possible to declare unsigned integers in java.
In C++ objects may be passed by value or reference. In java
objects are passed by reference only.
C++ and Java
11. New features added in Java
Multithreading, that allows two or more pieces of the same
program to execute concurrently.
C++ has a set of library functions that use a common header
file. But java replaces it with its own set of API classes.
It adds packages and interfaces.
Java supports automatic garbage collection.
break and continue statements have been enhanced in java to
accept labels as targets.
The use of unicode characters ensures portability.
13. • Java Class Libraries
– Java has built huge amount of libraries,
– These libraries are is known as Java APIs
(Application Programming Interface).
– Most of them are available over the Internet
and at no charge.
14. Class loader
( put . Class file
In memory )
Verify bytecodes &
Validate for Java’s
security violations
Translate bytecodes into a machine language
Execute the program
(display or store data values)
Edit & Store a file
( Extension .
java )
Creates bytecodes &
Stores a file
( Extension .class )
15. Java Development Environment
• JDK (Java Development Kit)
Java Standard Edition (J2SE): develop client-side
standalone applications or applets.
Java Enterprise Edition (J2EE): develop server-side
applications such as Java servlets.
Java Micro Edition (J2ME): develop applications for
mobile devices such as cell phones
16. • IDE (Integrated Development Environment)
– There are number of free and commercial IDEs
17. What Is A jar File ?
• Java archive (jar) files are
compressed files that can store one
or many files.
• Jar files normally contain java or
class files, but other files may also be
included.
• Jar files can be run on any paltform
by double clicking jar files if the JVM
is installed.
18. Features of java
• Object oriented
• Platform independent
• Simple
• Robust
• Portable
• Architecturally neutral
• Multi threaded
• Distrbuted
19. A City Driving Robotic Car Named “Tommy
Jr.”
Paul J. Perrone
CEO – Perrone Robotics
Team Lead – Team Jefferson
TS-5925
20. Learn about a robotic car in a historic city driving race
and the Java™ technology that got him there
2008 JavaOneSM
Conference | java.sun.com/javaone |
21. Agenda
2008 JavaOneSM
Conference | java.sun.com/javaone |
• The challenge
• Tommy Jr’s parts
• Tommy Jr’s brains
• Tommy Jr’s journey
• Tommy Jr’s advancement
• Conclusions
22. The DARPA Grand Challenge and Tommy
2008 JavaOneSM
Conference | java.sun.com/javaone |
• 175+ mile race through desert
• No driver onboard or in remote control
• Completely Autonomous Ground Vehicles (AGVs)
• $2M prize
• Applications Video Site Visit NQEs/DGC
• “Tommy” is born and advances
• 100% Java technology based bot
• Java SE platform for navigation & obstacle avoidance
• Java ME platform for controls
23. The DARPA Urban Challenge and Tommy Jr.
• 60+ mile through a city
• AGV city driving
•Navigation & obstacle avoidance
• Plus all rules involved with city driving
$2M/$1M/$500K prizes
•$1M grants (“Track A”) & Indies (“Track B”) Applications
Video Site Visit NQEs/UCE “Tommy Jr.” is born and
advances – Track B 100% Java technology based bot
•Java SE technology & Java ME technology again
•Java technology RTS for real-time nav controls
•SunSPOT safety controller
2008 JavaOneSM
Conference | java.sun.com/javaone |
25. • Embedded x86
• All of TJr’s decision making and sensor fusion
• Java SE technology & Java RTS technology
• MAX Standard & Real-Time
• Desktop-grade x86
• Front-end UI to TJr
• Stereo camera processing
• Java SE technology
• JStamp micro-controllers
• MAX Standard
• SunSPOT
• Feedback control of motors
• Java ME technology; MAX Micro
• Misc: redundant I/O controller, motor drivers, etc…
• Safety controller
• Java ME technology; MAX Micro
Hardware: COTS & Java technology capable
30. Navigation Maneuvers
• More driving rules and complexity
• More rules for city driving (i.e. more maneuvers)
• More complex steps for maneuvers (i.e. more maneuver actions)
• Added navigation maneuver framework to MAX-UGV
• Detection of maneuvers
• Look-ahead for imminence
• Activate/de-activate, pause/resume
• Maneuver prioritization & exclusion
• Maneuver precedence/priority
• Maneuver actions
• Configurable actions
• Sequence of steps
• Navigation maneuvers
• Intersections, passing, merging, parking, zones, …
31. Parking Maneuver Sample
Copyright 2001-2008. Perrone Robotics, Inc. All rights reserved.
public class Parking extends ManeuverGeneric {
/** Detect imminence of maneuver and enter as appropriate **/ public boolean
detectIfImminent() {
…
Course course = super.getMovementPlanner().getCourse();
WaypointProximity nextSpot = course.getWaypoint(NextParkingSpotArrivalPointID);
startSpot = nextSpot.getWaypoint();
if(nextSpot.getDistance() < minDistanceForSpotApproach)
{ super.getMovementPlanner().setSpeed(spotApproachSpeed); if(!parking){
if(nextSpot.getDistance() < minDistanceForStartParking){ arrivalSpot = startSpot;
initParking(); // Starts parking maneuver (parking = true)
}
}
…
}
32. Parking Maneuver Sample – Cont’d
// Configurable parking actions
// Start approach to spot ApproachSpot
// Start slow down as approach spot (pump brakes, timeout, slow speed)
BrakePumpAction
// When within x meters of checkpoint, stop ApproachCheckpoint
// Once speed below certain mph and certain timeout, start applying reverse
WaitForCheckpointHalt
// Wait for reverse shift, then give a little gas, invert steering
WaitForReverse
// Invert steering, backup toward staging point until reached Backup
// Wait, until stop. WaitForBackupHalt
// Clear out those spot points that are part of route (i.e. make sure considered visited)
// Then proceed out of maneuver (release steering override) WaitForDrive
34. Feedback Controls
• Navigation controls
• Derived steering, speed, and shift commands
• Feedback controls
• Steering position control
• Braking level & position control
• Throttle level & position control
• Shift position control
• Closed-loop PID controls (actuator positioning)
• Speed controls (combined brake/throttle levels)
35. Obstacle Detection Maneuver
• More perspectives, obstacles, and degrees of freedom
• More sensor perspectives (front, sides, rear)
• Moving and static obstacles
• Multiple lanes and routes
• Embodied obstacle reactions as MAX-UGV maneuvers
• Obstacle detection
• Enhancements to LADAR-based detection
• Obstacle resolution
• Moving obstacle additions
• Had size, position, and confidence
• Add speed and direction
• Obstacle avoidance maneuvers
• Lane collision, zone collision, passing, backup, parking…
36. Passing Another Vehicle Sample
public class Passing extends ManeuverGeneric {
…
public boolean detectIfActive() { boolean pass = passing
|| stoppedFollowingDuringPass
|| (getMovementPlanner().getClosestUnpassableDistance() <=
closestDistanceForStopWhenUnpassable)
|| isReroutingDuringPass();
return pass;
}
public boolean detectIfImminent() { boolean immin =
(getMovementPlanner().getClosestUnpassableDistance() <=
closestDistanceForImminentPass)
|| isReroutingDuringPass();
return immin;
}
}
37. Steering Control Sample
public class SteeringControlPlan extends PlanGeneric
{
public void init()
{
commandSensor = (CommandSensor) super.getSensor(COMMAND_SENSOR_ID);
steerControl = (FeedbackControl)
super.getComponent(STEER_FEEDBACK_COMPONENT_ID);
steeringFeedbackSensor = (Sensor)
super.getSensor(STEERING_FEEDBACK_SENSOR_ID); steeringMotor = (Actuator)
super.getActuator(STEERING_MOTOR_ID);
steerControl.registerSensor(steeringFeedbackSensor);
steerControl.registerActuator(steeringMotor);
}
public void trigger()
{
// Get commanded steering value
SensorState state = commandSensor.getSensorState();
double steerValue = state.getDouble(DESIRED_STEERING_VALUE_ID);
// Set desired steering value
steerControl.setDesiredPosition(steerValue);
}
}
38. Fail-Safety
• Safety Risk = high energy + grand challenge
+ little time + little money
• Back Story
• Tommy Sr. smarting
• E-stop of little use
• Safety-critical systems knowledge
• Focus on speed controls
• Redundant speed sensing (2 speed inputs, 2 GPS speeds)
• Redundant throttle position sensing (2 inputs)
• Redundant speed calculations
• Fail-safe controls
• Watchdog safety
• Monitor processing
• Monitor sensors
• Monitor other controllers
• Cut throttle, stop car if issue
39. Passing Another Vehicle Sample – Cont’d
•// Initial passing impasse detection and beginning to slow down
InitialImpasseStopAction
•// Wait for car to slow down (may exit out of maneuver in meantime)
WaitForPassingSlowDownAction
•// Wait for car to come to complete halt (may exit out of maneuver)
WaitForPassingStopAction
•// Wait for an opening, timeout, and begin passing
WaitForOpeningAndPass
•// As pass, continue to check passage way, merging as needed, exit on
completion HandleExtendedMerge
40. Tommy
•Desert-ready robotic dune buggy
•$60K – 10 man-months software – 1 PC (Dec ’04 to Sept
’05)
•100% Java technology bot – decisions AND micro-
control
•MAX for rapid integration
•MAX-UGV for navigation & obstacle avoidance
42. Base Software Platform Configuration
• One week to fully autonomous vehicle
• (Feb ’07) Java technology & MAX installs
• Basic MAX parameter configurations
• Calibration & tuning
• Autonomous navigation & obstacle avoidance
• Proven generic UGV framework with rapid
configuration
43. Rules Creation and Evolution
• Route planning: course maps (RNDF) + mission checkpoints
(MDF)
• Passing vehicles
• Stopping at intersections & obeying precedence order
• Queuing and following behind vehicles
• 3-point U-Turns
• Proper turn signaling
• Merging
• Open zone/lot navigation
44. • Parking in parking spots Lane collision avoidance
• Ground obstacle avoidance (ditches, curbs)
• Proximity collision avoidance
• Route re-planning
• GPS outage handling
• Lane detection & road following
• Low hanging obstacle avoidance
• Eight months of rule creation and testing (Mar ’07 to
Oct ’07)
45.
46. Loose Ends
• Dashboard UI: manage & test TJr
• Simulation: test new rules
• Course maker: plot and load test courses
• Safety: fail-safe, don’t rely on E-stop (controlled by DARPA)
• People: engineering & operations
• Parts: sensors, car, hardware
• Facilities: basic testing, demos, large-scale tests, CA tests
• Travel: TJr legal to human drive in VA!, trailer to/from CA
• Finances/Marketing: sponsorship, logos, demos, TV, news
47. Applications, Sponsorships, & Kool-Aid
• March 2006: Announcement
• $2M/$1M/$500K prizes; $50K to all qualifiers, $100K to all finalists
• April 2006: Team Jefferson back
• Slam Dunk Plan ($$$): $800K
• Winning Chance Plan ($$): $400K
• Austerity Plan ($): $90K
• Summer 2006: DARPA Kick-Off
• No prize money
• Vehicles required to have stock chassis – can’t reuse Tommy Sr.
• Oct 2006: Track A awards
• $1M up front to 11 teams; mostly large teams
• Oct 2006: Track B applicants
• 89 teams total (11 Track As, 78 Track Bs)
• Interest down from 2004 & 2005
• Jan 2007: Prize adjustments
• Prize money reinstated; qualifier money not reinstated
• Jan-Feb 2007: Team Jefferson Accelerates
• Sponsorship support
• Mechanical/electrical engineering accelerates
48. Video Submission & Site Visit
• March 2007: Video Submission
• Demo safety, self-navigation, and passing
• 1 week SW configuration + few weeks new passing rules
testing
• 53 teams advance to site visit (11 Track As, 42 Track Bs)
• Tommy Jr. advances
• Targeting austerity plan
• June 2007: Site Visit Demonstration
• Demo safety, self-nav, passing, intersections, route planning,
queuing, U-turns, turn signaling
• Demo in front of 3 DARPA officials
• 35 teams advance to qualifications (10 Track As, 25 Track
Bs)
• Tommy Jr. aces & advances – projected among top ranked
visits
• Austerity plan goals close
49. Leaving for the Race
• October 2007: Leaving Virginia for California
• Tommy Jr in trailer, RV, and 3 team members
• 3 day – 2 night trip fueled by caffeine & Java technology
• Austerity goals met, partial way to winning chance target
•More testing required:
•Lane detection, route re-planning, ground obstacles
•Low-hanging obstacles?
•Completed:
• Self-navigation, route planning, lane collision avoidance,
intersections, merging, queuing, passing, zones, parking, U-
turns, signaling, proximity and zone collision avoidance, GPS
outages, fail-safety
• Development & test enhancements
• Operations & marketing enhancements
50. The National Qualifiers
• Day 1: Teams given course maps on USB stix w/their team
name
• Day 2: E-stop test
• Passed, DARPA presses wrong buttons
• Day 3: Circular loop with intersections and re-routing
• TJr. navigates intersections and U-turns, re-routes
• TJr clips low-hanging railway crossing arm, no E-stop issued
• Other teams w/issue, railway crossing arm ruled illegal for course
• Day 4: Circular loop with intersections and merging
• TJr. navigates intersections and obeys precedence and merging rules
• TJr. goes wide on a sharp turn in course map file
• Other teams w/issue, we re-plan for course
51. The National Qualifiers - Continued
Day 5: Large course representative of city
• TJr. navigates well initially
• TJr. considers re-routing, course map points clip K-barriers
• Tjr. restart, begins re-route, clips barrier, sensor damage, no E-stop
Day 6: Second run of loop w/intersections & re-routing
• Team prepared for low-hanging obstacle, but crossing arm removed
• Sensor damage causes TJr to detect ground and re-route
• Team goes off to prep for Day 7
• Gets call back early to run another course, team inquiry
• Team gets call from DARPA director that is disqualified, team appeal
Day 7: Second run of loop w/intersections & merging
• Team prepared to complete its second runs
• DARPA director denies appeal
• Urban Challenge Program Manager tries to help, decision is final
52. The Final Event
•11teams advance to final event (7 Track As, 4 Track Bs)
• DARPA director selects the teams, claims safety basis
•Six teams complete the course (5 Track As, 1 Track B)
• Prize Winners:
• 1st Place: Carnegie Mellon – General Motors team (Track A)
• 2nd Place: Stanford Univ – Volkswagen team (Track A)
• 3rd Place: Virginia Tech – CAT team (Track A)
55. Reflections on the Journey
• What worked well
• Extraordinarily large function base generated per unit time
• Building on Java technology and a framework definitely way to go
• What didn’t work well
• Gaps in lane detection & route re-planning – time runs out
• Issues with race operations
• Rules incomplete and not-specified
• Decisions made by director vs committee
• E-stop safety not employed
• Lessons learned from race
• Design for generalized vs specific rules ($$$)
• Design for dynamic vs specified rules ($$$)
• Design for more fail-safety scenarios paramount ($$)
56. Reaping the Rewards
• Designs for use beyond challenge
• High profile race & technology
• Have generalized Java technology based robotics & automation
platform
• Have generalized Java technology based UGV platform
• Awareness generated
• TV, news, trade
• Hi-profile demonstrations
• Sponsors benefit before, during, & after race
• Applying to the real-world
• Distributed sensor applications for automation
• Platform and framework licensing
• Commercial UGV applications
• Vendor/sponsor technology used and licensed
57. Tommy Junior’s Sponsors
• Sun Microsystems – Java technology, advisors, financial
Perrone Robotics – MAX, software/systems/operations,
financial
• University of Virginia – mechanical/electrical
• Northrop
• Grumman - financial
• AutoTrader - financial
• WowWee Robotics - financial, toy bots
• BDMetrics – financial
• SICK - lasers
• 45Fix - financial
• TDFund – financial