Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
1
Creating Robotic Creating Robotic BehavioursBehaviourswith ROBOLABwith ROBOLAB
Eric WangEric WangUniversity of Nevada, RenoUniversity of Nevada, Reno
Technology School of the FutureTechnology School of the FutureAdelaide, AustraliaAdelaide, Australia
March 25, 2004March 25, 2004
Tell me, and I’ll forget.Tell me, and I’ll forget.Show me, and I’ll remember.Show me, and I’ll remember.But involve me, and I’ll understand.But involve me, and I’ll understand.
--Chinese ProverbChinese Proverb
2
The Design ProcessThe Design Process
1.1. Identify the problem, including Identify the problem, including specifications and constraintsspecifications and constraints
2.2. Explore alternative solutionsExplore alternative solutions3.3. Design, build and test itDesign, build and test it4.4. Optimize and reOptimize and re--design the design the
solutionsolution5.5. Communicate and disseminate Communicate and disseminate
the solutionthe solution
Robotic BehaviorsRobotic Behaviors
•• BraitenbergBraitenberg Vehicles Vehicles •• Serial vs. behavioral programmingSerial vs. behavioral programming•• Schema theorySchema theory•• Knowing when you are stuckKnowing when you are stuck
3
BraitenbergBraitenberg VehiclesVehicles
•• Vehicles: Vehicles: Experiments into Experiments into Synthetic Synthetic PsychologyPsychology
•• Valentino Valentino BraitenbergBraitenberg
•• How hard is it to How hard is it to build (not build (not program) program) intelligence? intelligence?
Uphill Analysis, Downhill Uphill Analysis, Downhill InventionInvention
•• Behavioral observationsBehavioral observations•• The inferred properties are more The inferred properties are more
complicated than the known complicated than the known structurestructure
4
SimulationSimulation
QT version
SimulationSimulation
5
Vehicle 1: Getting AroundVehicle 1: Getting AroundExcitatory: motor
speed proportional to sensor output
Excitatory: motor Excitatory: motor speed proportional to speed proportional to sensor outputsensor output
Vehicle 1: Getting AroundVehicle 1: Getting Around
Is it ALIVE?Is it ALIVE?Is it ALIVE?
6
Vehicle 2: Fear & Vehicle 2: Fear & AggressionAggression
• Excitatory• 2 sensors• 2 motors• Crossed
•• ExcitatoryExcitatory•• 2 sensors2 sensors•• 2 motors2 motors•• CrossedCrossed
Vehicle 2: Fear & Vehicle 2: Fear & AggressionAggression
• “Aggression”•• ““Aggression”Aggression”
7
LEGO Vehicle 2: LEGO Vehicle 2: AggressionAggression
Vehicle 2: Fear & Vehicle 2: Fear & AggressionAggression
• Uncrossed • “Fear”•• Uncrossed Uncrossed •• “Fear”“Fear”
8
LEGO Vehicle 2: FearLEGO Vehicle 2: Fear
Vehicle 3: LoveVehicle 3: Love
• Inhibitory• Additional sensors•• InhibitoryInhibitory•• Additional sensorsAdditional sensors
9
Vehicle 3 combinationsVehicle 3 combinations
•• 2 sensor types (IR & visible)2 sensor types (IR & visible)•• 2 factors:2 factors:
–– Crossed or uncrossedCrossed or uncrossed–– Excitatory or inhibitoryExcitatory or inhibitory
•• 16 possible vehicle combinations16 possible vehicle combinations•• Still no programming!Still no programming!
LEGO sensorsLEGO sensors
CdS sensor with IR filter
LEGO light sensor with visible light filter
10
LEGO Vehicle 3: LoveLEGO Vehicle 3: Love
Advanced VehiclesAdvanced Vehicles•• 4: Value and Special Tastes4: Value and Special Tastes
–– Introduce nonlinear & discontinuous motorIntroduce nonlinear & discontinuous motor--sensor sensor relationshipsrelationships
–– e.g. saturation, e.g. saturation, hysteresishysteresis, etc., etc.–– Vehicles can make “decisions”Vehicles can make “decisions”
•• 5: Logic5: Logic–– Introduce logic gates & time delayIntroduce logic gates & time delay–– Crude memory?Crude memory?
•• 6: Selection, the Impersonal Engineer6: Selection, the Impersonal Engineer–– Introduce random perturbations in designIntroduce random perturbations in design–– Genetic algorithms?Genetic algorithms?
•• 7: Concepts7: Concepts–– Introduce “Introduce “MnemotrixMnemotrix” wire” wire–– Sensor response increases with each activationSensor response increases with each activation
11
ROBOLAB ModesROBOLAB Modes
Pilot ModePilot Mode
Inventor ModeInventor Mode
Investigator ModeInvestigator Mode
Float vs. StopFloat vs. Stop
Float StopFloat Stop(electric brake) (electric brake)
12
StructuresStructures
••JumpsJumps••LoopsLoops••ForksForks••TasksTasks
Simple loopsSimple loops
Loop 10 times (the default is to loop only twice!)Loop 10 times (the default is to loop only twice!)
13
Simple ControlSimple Control
Nested loopsNested loops
5, 10, 9, 14, 19, 18, 23, 28, 27, 32, 5, 10, 9, 14, 19, 18, 23, 28, 27, 32, 37, 36, 41, 46, 4537, 36, 41, 46, 45
14
LEGO cockroachLEGO cockroach
Basic forkBasic fork
Forks are equivalent to “If, then” Forks are equivalent to “If, then” statements (conditionals)statements (conditionals)
All forks must have a All forks must have a “merge”“merge”
15
Nested forksNested forks
Jumps & forksJumps & forks
Okay to jump between paths in a Okay to jump between paths in a forkfork
16
Containers & forksContainers & forks
Picking 2 different random Picking 2 different random numbersnumbers
17
Random ForkRandom Fork
ChallengeChallenge
Line followerLine follower1.1. Loops & wait Loops & wait forsfors2.2. Forks & loopsForks & loops3.3. Two light sensors, forks, & loopsTwo light sensors, forks, & loops•• Wall follower?Wall follower?
18
Line Follower #1Line Follower #1(start on right side of black line)(start on right side of black line)
Loops & Wait Loops & Wait ForsFors1.1. “Pivot” left until dark“Pivot” left until dark2.2. Pivot right until lightPivot right until light3.3. RepeatRepeat
Line Follower #2 Line Follower #2 (start on right side of black line)(start on right side of black line)
Forks & LoopsForks & Loops1.1. If light, pivot leftIf light, pivot left2.2. If dark, pivot rightIf dark, pivot right3.3. RepeatRepeat
19
Line Follower #3Line Follower #3(start straddling black line)(start straddling black line)
•• If left sensor dark, pivot rightIf left sensor dark, pivot right•• If right sensor dark, pivot leftIf right sensor dark, pivot left•• If neither dark, drive straight If neither dark, drive straight
Feeding FrenzyFeeding Frenzy
•• Serial vs. Behavioral ProgrammingSerial vs. Behavioral Programming•• Look for “food” with light sensorLook for “food” with light sensor
1.1. Search for food systematicallySearch for food systematically2.2. Search for food randomlySearch for food randomly
•• Beep & pause when eatingBeep & pause when eating•• Observe feeding pattern & amount Observe feeding pattern & amount
of food foundof food found
20
TasksTasks
••Task splitTask split••Stop tasksStop tasks••Start tasksStart tasks
Tasks are like Tasks are like programs.programs.
MutliMutli--tasking means tasking means you can run more you can run more than one program than one program at a time.at a time.
Task SplitTask Split
All tasks must end with their own stoplightAll tasks must end with their own stoplight
21
Resource conflictsResource conflicts
Both tasks Both tasks can access can access the sensor the sensor valuesvalues
Tasks will Tasks will conflict conflict over motor over motor controlcontrol
Sharing Control of MotorsSharing Control of Motors
Motor A goes forward for 2 sec, backwards Motor A goes forward for 2 sec, backwards for 2 sec and forward for 10 secfor 2 sec and forward for 10 sec
22
Tasks & ContainersTasks & Containers
User containers 32User containers 32--47 are “local” and are not shared between tasks47 are “local” and are not shared between tasks
Stopping tasksStopping tasks
Stopping all tasks is equivalent to ending Stopping all tasks is equivalent to ending the entire program. The sound is never the entire program. The sound is never played!played!
23
Stopping One TaskStopping One Task
Start TasksStart Tasks
The upper task can be restarted by The upper task can be restarted by the lower taskthe lower task
24
Task PriorityTask Priority
Putting it all togetherPutting it all together
25
Getting StuckGetting Stuck
Realizing You Are StuckRealizing You Are Stuck
26
Random Motion OccasionallyRandom Motion Occasionally
EventsEvents
27
What is an Event?What is an Event?
•• An An EventEvent is like a combination of a is like a combination of a Wait ForWait For and a and a JumpJump..
Types of EventsTypes of Events
•• 16 Event conditions and 3 Event 16 Event conditions and 3 Event ColorsColors
28
Setting up an EventSetting up an Event
Stopping & ReStopping & Re--starting starting EventsEvents
•• You can stop monitoring an event and You can stop monitoring an event and then restart it laterthen restart it later
29
Restarting EventsRestarting Events
•• Restarting can be after the Event Restarting can be after the Event LandingLanding
•• Program will jump backwards on the Program will jump backwards on the EventEvent
Multiple EventsMultiple Events
•• 3 standard color Events3 standard color Events•• Up to 16 EventsUp to 16 Events•• All Events share same Event LandingAll Events share same Event Landing
30
Multiple Events & TasksMultiple Events & Tasks
•• One Event Landing per TaskOne Event Landing per Task•• 16 total Events for all Tasks16 total Events for all Tasks
Obstacle avoidance using Obstacle avoidance using only the light sensoronly the light sensor
31
Communication: Communication: handshakinghandshaking
•• Cannot send & receive Mail at same Cannot send & receive Mail at same timetime
•• Need to work out handshaking Need to work out handshaking protocolprotocol
ChallengeChallenge
•• Build a robot that wanders the Build a robot that wanders the room (randomly or systematically) room (randomly or systematically) using touch and/or light sensorsusing touch and/or light sensors
•• Use Events to detect if you might Use Events to detect if you might be stuck (too much time has be stuck (too much time has elapsed since anything has elapsed since anything has happened)happened)
•• Call for help if you are stuckCall for help if you are stuck
32
CameraCamera
Vision Center
33
For More InformationFor More Information
ROBOLAB support: ROBOLAB support: •• www.ceeo.tufts.eduwww.ceeo.tufts.edu
Email: Email: •• [email protected]@unr.edu
THE ENDTHE END
34