M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell...
-
date post
20-Dec-2015 -
Category
Documents
-
view
216 -
download
1
Transcript of M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell...
![Page 1: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/1.jpg)
MOTION PLANNING IN REAL AND VIRTUAL ENVIRONMENTSFALL 2007
Second Life: Second Life: IntroductionIntroduction
Russell GayleComp 790-058 – Robot Motion Planning
Fall 2007
September 24, 2007
04/18/23 1
![Page 2: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/2.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
What is Second Life?
• The Grid: The hardware behind the SL Metaverse
![Page 3: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/3.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
What is Second Life?
• The Grid is organized into Simulators » Single server instances
Simulators
Isle 2 Isle 3
Isle 6Isle 5Isle 4
Isle 1
Connecting to Isle 1
Side connections to adjacent simulators
![Page 4: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/4.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
What is Second Life?
• Simulators are where the real work happens» Each simulator is responsible for its avatars
Isle 1
Communications (chat/IM)Physical State, Collisions
InventoryAnimationsSL Identifier
![Page 5: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/5.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
What is Second Life?
• Simulators are where the real work happens» Each simulator stores and distributes its prims
Isle 1
TransformationsTexturesPhysics
Embedded items
![Page 6: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/6.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
What is Second Life?
• Primitives can hold any type of object» Primitives, scripts, animations, sounds, etc
• LSL makes the world interactive» Embedded into prims
LSL ScriptsChange primitive appearanceInteract with other primitives
Interact with avatarsPhysics
Query remote resourcesMany more!
![Page 7: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/7.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
What’s missing?What’s missing?
• Important features of SL that we will not cover» Economy
• Linden Dollars• Content creation • and IP rights• Land ownership
» In world attractions• Virtual sightseeing• “Live” music
04/18/23 7
![Page 8: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/8.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
The Grid
• Collectively can be considered “The World”» A large array of Debian servers
• Each server can support several simulations
» Centralized network topology• All communications goes through the Grid
» Beta Grid: A test bed for upcoming technologies
![Page 9: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/9.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
Simulators
• Also referred to as a Region» e.g. Natoma, UNC CH I, UNC CH II
• Typically has a dedicated CPU• Each region is 256 m by 256 m
» Larger islands are made by connecting several regions
• Responsibilities» Geometry / Prims
» Avatars
» Local messaging (whisper, say, shout)
» Voice-chat
» Client-server networking
![Page 10: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/10.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
SimulatorsSimulators
• SLUIDs» Every object (prims, avatars, animations,
audio, etc) has a (global) SL Unique ID number
» Each simulator also has local references to avatars and primitives
• Multi-simulator islands» In reality, connected to multiple island
simultaneously in case you cross borders
» Note: You may need to keep track of this in your work!
04/18/23 10
![Page 11: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/11.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
Avatars
• Your virtual representation (or your bot’s)» Stored in a central database
• Important features» Appearance
• How you look
(height, clothing, etc)
» Inventory• What you can use
and what you can DO
• Local animations
• Local sounds
• Other primitives or scripts
» Communication» State and Motion
• Position, orientation, velocity, colliding, physics, etc
![Page 12: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/12.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
Avatars: What they can doAvatars: What they can do
• Create primitives• Interact with (touch) primitives
» This often activates scripts
• Attach prims to themselves• Chat (whisper, say, shout)
» This can also activate scripts
• Navigate » Ground-based (walk, run)
» Air-based (fly) • Predefined animations
» Instant navigation (teleportation) • You may not always end up where you expect!
04/18/23 12
![Page 13: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/13.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
Avatars: LimitationsAvatars: Limitations
• Precision» Not easy to reach a specific location
» Occasionally collisions are missed
• Bandwidth» Not always enough to update all objects
» May cause missed collisions or stalled motion
04/18/23 13
![Page 14: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/14.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
Primitives
• Belongs to a Region (simulator)• 7 base types
» Box, cylinder, prism, sphere, torus, tube, ring
» All items built by transformations of these
• 1 special type» Sculpted prim
• Prim whose shape is determined by a “Sculpt Texture”
![Page 15: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/15.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
PrimitivesPrimitives
• Seven base material types» Stone, metal, glass, wood, flesh, plastic,
rubber
• Has several other state parameters» Physical
» Flexible (automatically non-physical)
» Texture
» Color
» Bumpiness
» Lighting
» Transparency
04/18/23 15
![Page 16: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/16.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
Linden Script Language (LSL)
• Embedded in a prim (or a group of prims)» Not in avatars
» Each prim in a group can have a script
» Scripts between linked prims are faster
» All scripts in a prim are run
• Similar to C or Java • But with an emphasis on states and events
» Events trigger behaviors (functions)
» Can also cause a change of state
• And now for a crash course in LSL!
![Page 17: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/17.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
LSL: Getting StartedLSL: Getting Started
• Creating a script1. Open the prim “Create” menu
2. Select a prim
3. Find the contents of the prim
4. Select “Create a new script”
• The default script
04/18/23 17
default {
state_entry() {
llSay(0, "Hello, Avatar!"); }
touch_start(integer total_number) {
llSay(0, "Touched."); }
}
![Page 18: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/18.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
LSL: StatesLSL: States
• State is used to determine which “behavior” should be used
04/18/23 18
default //default state is mandatory {
state_entry() {
llSay(0, "turning on!"); llSetColor(<1.0, 1.0, 1.0>, ALL_SIDES);
}
touch_start(integer total_number) {
state off;}
}
state off {
state_entry() {
llSay(0, "turning off!"); llSetColor(<0.0, 0.0, 0.0>, ALL_SIDES);
}
touch_start(integer total_number) {
state default; }
}
Triggers a change of state
A new state
![Page 19: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/19.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
LSL: EventsLSL: Events
• We’ve seen two events» state_entry - When a state is activated
» touch_start – When an object is touched
• A few others which may be usefulat_target – when a prim reaches its target
collision – when a prim collides
http_response – response to http request (used when working with remote resources)
sensor – when a sensor call returns something
» Note: Sensors are useful for tracking and following
Documentation: http://wiki.secondlife.com/wiki/LSL_Portal
04/18/23 19
![Page 20: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/20.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
Live Demo!Live Demo!
• Overview of the main features in Second Life
04/18/23 20
![Page 21: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/21.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
Introduction: Robots in SL
• Two varieties» LSL (primitives)
» Simulated network traffic (avatars)
• Tradeoffs» LSL is stored and run on the simulator (server-
side) • Only works with prims
» Network traffic is subject to missed packets and limited by client performance
• Note» Both can access remote utilities!
![Page 22: M OTION P LANNING IN R EAL AND V IRTUAL E NVIRONMENTS F ALL 2007 Second Life: Introduction Russell Gayle Comp 790-058 – Robot Motion Planning Fall 2007.](https://reader036.fdocuments.us/reader036/viewer/2022062421/56649d425503460f94a1d8b9/html5/thumbnails/22.jpg)
SL OVERVIEW
THE GRID
SIMULATORS
AVATARS
PRIMITIVES
SCRIPTING (LSL)
LIVE DEMO
INTRO: SL BOTS
LIBSecondLifeLIBSecondLife
• http://www.libsecondlife.org• Reverse engineering of SL network protocol
» Inspect, insert, or remove packets from the client
» Create your own client• We will control an autonomous avatar this way
• More of this next time
04/18/23 22