Application specific programming languages and tools for robotics · 2006-10-12 · Application...

37
The University of Auckland New Zealand Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald Robotics Research Group Department of Electrical and Computer Engineering http://robotics.ece.auckland.ac.nz

Transcript of Application specific programming languages and tools for robotics · 2006-10-12 · Application...

Page 1: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd

Application specific programming languages and tools for robotics

Geoffrey Biggs and Bruce MacDonald

Robotics Research GroupDepartment of Electrical and Computer Engineeringhttp://robotics.ece.auckland.ac.nz

Page 2: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Outline

Problem descriptionLiterature surveyTools standardisationConclusions

Robotics Lab

Page 3: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Problem Description

How to describe Robot behaviour?Robot programming is not identical to programming in other domainsMany tools involved in the programming process

Integrated Development EnvironmentsDebuggersProgramming languagesLibrariesSoftware architecturesHuman Robot Interaction tools...

Page 4: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Problem Description ...

Goal: useful robotic assistants for humansPreviously:

Some work on CORBA frameworks for RoboticsDynamic software reconfiguration for robot softwareContributions to Player 2

Today: programming language and tools

Page 5: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Existing RobotProgramming Systems

Manual and automatic programming distinguished by the method usedSoftware architectures provide the underlying support and access to the hardware

Page 6: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Manual Methods

Program is created by handText or graphical methods of inputFinished program loaded onto robot (or simulation) for testing

Page 7: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Controller-SpecificLanguages

e.g. ABB, KUKACommon on industrial robotsProprietaryMost advances in design focussed on the programing environment

Page 8: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Generic Languages

Generic language extended with robot-specific capabilities

e.g. C++, Java, PythonOften used in research environmentsRobot abstractions common

e.g. Player, CARMEN, OrcaObject oriented concepts popular

Page 9: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Behaviour-BasedLanguages

Reactive rather than deliberativeSubsumption's Behaviour LanguageFunctional Reactive Programming

e.g. Yampa, FrobrcFollowLeftWall :: Velocity->Distance->SimbotControllerrcFollowLeftWall v d _ = proc sbi -> do

let r = rfLeft sbidr <- derivative -< rlet omega = kp*(r-d) + kd*dr

kd = 5kp = v*(kd^2)/4

returnA -< mrFinalize (ddVelTR v (lim 0.2 omega))

Yampa [Hudak et al., 2003]

Page 10: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Graphical Programming

Uses a GUI with icons, flow charts, ...e.g. LabVIEW, LEGO Mindstorms

Easy to useNot very flexibleRapid construction of small programsDoes not scale up well

Page 11: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Graphical Programming

LEGO Mindstorms Programming Environment [Lego, 2003]

Page 12: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Automatic Methods

Program code generated from information supplied

eg part dimensions, demonstrationsGenerally requires a robot to be running at the time of program generationTraditionally referred to as “online”programming systems

Page 13: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Automatic Methods

Page 14: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Programming by Demonstration

Commonly used in industrial robots to set joint positions, path nodes, etcOriginally pure imitationCommon research directions include

Determining programmer intentGenerating plans from demonstrated dataNew input methods, e.g. voice, vision, gesturesSensor data interpretation

Page 15: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Instructive Systems

Provide control over robots with existing behavioursMulti-modal inputHuman as an instructor (robot as pupil)Great potential for high-level, natural control

Page 16: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Standardising the Tools

Standardising robot programming tools is as important as standardising APIs and safety aspectsCannot create a single standard tool that everyone uses

Variations in programmer needs, project needs, etcInstead: standardise important features and interfaces

Page 17: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Standardising the Tools

Mainstream programming languages developed common features over time

VariablesFunctions, methodsCommon numeric types (int, float, string, ...)Object orientationPatternsArchitecturesTechnologies

Page 18: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Standardising the Tools

Programming environments also developed common features over time

Graphical debuggers• Watch points, break points, variable views, etc

Intelligent code completionCode refactoringGraphical layout tools for designing GUIs

Page 19: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Standardising the Tools

Robot programming tools must similarly develop common featuresAlready some common features are appearing

Modular architecturesCompatible interfaces for components with similar functionality

Page 20: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Standardising the Tools

What common features should we expect to find in a robot programming environment?

Suitable programming language constructs that do not rely on a particular architectureLibraries of common functionalityRobotics support in IDEs

• Including Visualisation & InteractionSimulatorModular architectureCommon component interfaces...

Page 21: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Eg: Dimensioned Data Support (Biggs)

Dimensioned data found everywhere in roboticsUse a new data type to manage dimensioned dataLinks data values to real world values that are important in roboticsProvide support for dimensional analysis

Allows mixing of units

3 m 5 rad 2 m/s^2

Page 22: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Example: Dimensioned Data Support

Page 23: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Reactivity Management Constructs (Biggs)

Allow programmers to specify reactive and deliberative components with one languageProvide direct syntax for the unique semantics of specifying reactivity

Specifying events and responsesSpecifying connections between them

Remove the barrier between reactive and deliberative components of robot softwareIncrease readability, writability; ease maintenance

Page 24: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6 event NearWall (sonar):for range in sonar.ranges:

if range < 0.25~m:returnVal = range.indextrigger

event HitWall (bumpers):for bumper in bumpers:

if bumper == 1:trigger

Page 25: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6 response UpdatePlayer (setSpeedFunc, speed):while True:setSpeedFunc (speed.getval ()[0],

speed.getval ()[1])sleep (0.05~s)

response Drive (speed):speed.setval (0.5~m/s, 0~rad/s)while True:sleep (0.5~s)interrupt

Page 26: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Robotic IDE (Gumbley, et al)

Eclipse plugin for robotic programmingSpys on Player client communicationsDisplays visualisations inside IDE

Page 27: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Example: Robot IDE Features

Page 28: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Robot Debugging Tools(Collett)

Augmented reality for interacting with robotsTargeted at developersDebugging space with tracking, plus Head mounted display OR large plasma display

Page 29: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Page 30: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Page 31: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Page 32: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Page 33: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Page 34: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Page 35: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Page 36: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Page 37: Application specific programming languages and tools for robotics · 2006-10-12 · Application specific programming languages and tools for robotics Geoffrey Biggs and Bruce MacDonald

The

Uni

vers

ity o

f Auc

klan

dN

ew Z

eala

nd10

Oct

ober

200

6

Conclusions

Robot programming tools should have common, important features

Should expect to find them in any good robot programming environment

Common features must support the unique nature of robot programmingDimensions, visualisations, real world geometry, robot algorithms and estimates, ...

Focus on enabling humans to describe robot behaviour