Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Player Project: Open Source tools for robotics research & education Brian P. Gerkey Richard T. Vaughan Andrew Howard.

Similar presentations

Presentation on theme: "The Player Project: Open Source tools for robotics research & education Brian P. Gerkey Richard T. Vaughan Andrew Howard."— Presentation transcript:

1 The Player Project: Open Source tools for robotics research & education Brian P. Gerkey Richard T. Vaughan Andrew Howard Simon Fraser Autonomy Lab Machine Vision Group AI Center

2 2/26 Robotics research is hard l Robots embody nearly all the problems of AI l perception, control, reasoning under uncertainty, planning, scheduling, coordination l But we also get many of the problems of systems l real-time constraints, limited computation & memory, imperfect limited-bandwidth communication, distributed processing, physical dynamics

3 3/26 Tedious aspects of robotics l Wide variety of hardware, each robot a little different from the next l Code must be ported from robot to robot l Simple things, like visualizing the sensor state of the robot, require a lot of work l Interface libraries (if you’re lucky enough to have them) often restrict the choice of programming language and/or style l Well-understood algorithms get re-implemented over and over and over and over…

4 4/26 Can we make it easier? l Learn from OS design: l Identify and abstract common components l keyboards, disk drives, displays l Define a common development environment l POSIX l Create standard tools l top, bash, ls, rm, X l Support any programming language l C, C++, Java, Python, Tcl, LISP… l Implement standard algorithms and data structures l qsort(), TCP, STL linked lists l Provide access at all levels l malloc()/free() vs. brk(), printf()/scanf() vs. read()/write()

5 5/26 What do we need? l Good robotics infrastructure, just like we have good OS infrastructure l Such infrastructure should: l be agnostic about programming language, compute platform, control and coordination architecture l be portable across different robot hardware l implement standard algorithms l include development tools l support code re-use l be flexible l plausibly simulate a wide variety of robot systems l be extensible l It should also be Open Source, aka Free (free as in speech and free as in beer)

6 6/26 Improving research practice l Little shared equipment, no shared data*, no shared environments, few shared tasks, little shared code l Huge duplication of engineering effort l Systems are not directly comparable l Trial by video l Interaction between researchers is papers and meetings l Recently challenges (e.g., RoboCup, DARPA Grand Challenge) have stimulated and guided research and boosted education, but: l Competitive overhead is HUGE, as is the tendency to overfit l Goal: accelerate development by improving interaction between researchers via good infrastructure l Sharing the engineering burden l A means for comparing systems *Except for radish:

7 7/26 The Player Project l A collaborative development effort aimed at producing high-quality Open Source tools for robotics researchers l The project primarily maintains three pieces of software, all released under the GNU GPL: l Player: networked robot device interface l Stage: scalable 2-D multiple robot simulator l Gazebo: high-fidelity 3-D multiple robot simulator

8 8/26 Overview of the Player Project l 2000: Player/Stage project originated at USC l Brian Gerkey, Richard Vaughan, Andrew Howard l 2001: Project moves to (neutral territory) l 2003: Gazebo (3D simulator) released l Nate Koenig, Andrew Howard l 2002-2003: Support from DARPA/IPTO l 2005 (ongoing): Support from SRI AI Center l 2006 (ongoing): Support from NSF l Current active developers @ l SRI, USC, Stanford, Simon Fraser Univ., JPL, BBN, UMass, UPenn, WUSTL, Univ. Sherbrooke, Univ. Sydney, Simon Fraser Univ., DRDC, Univ. Auckland… l Large user community (>40,000 downloads) around the world in academic, industrial, and government labs, as well as classrooms l Free software (speech and beer)

9 9/26 Design decisions l How do you interface with a physical robot? l direct link vs. network / IPC l How do you interface with a simulated robot? l simulation-specific vs. same as physical l How do you interface with different robots? l robot-specific vs. robot-independent l How is a “robot” represented? l one entity vs. a collection of devices l How is the system structured? l microkernel (e.g., Mach) vs. monolithic kernel (e.g., Linux) l How is new functionality added? l static link vs. dynamically-loaded plugin

10 10/26 Architectural overview Player (server) Controller (client) Controller (client) Controller (client) Controller (client) Player (server) TCP/UDPRS232, USB, 1394, TCP, Shared Mem Stage (2D simulation) Gazebo (3D simulation)

11 11/26 Player abstractions Player abstract device interface (PADI) Player protocol Transport (e.g., client/server via TCP or UDP) Implementation (e.g., our C++ server and various client libs) Syntax & semantics of device data and commands Message format (header structure, field ordering) and sequence Bit-packing, message routing I/O multiplexing, device management

12 12/26 PADI: abstract device interface l Device model inspired by Unix (file-like semantics); a device is: l source of data (read) l sink for commands (write) l source/sink for configuration (ioctl) l Device model uses familiar OS abstraction: l Device = interface + driver (+ index) l Interface: generic API l Driver: hardware/software specific l Multiple drivers can support the same interface l Two drivers that support the same interface appear (almost) identical to the client

13 13/26 PADI examples l The position2d interface: l data: robot position, velocity l command: desired position and/or velocity l configurations include: enable/disable motors l Supporting drivers: l obot, p2os, rwi, stage,... l The laser interface: l data: ranges, intensities l command: none l configurations include: get/set angular/range resolution l Supporting drivers: l sicklms200, hokuyo, stage,...

14 14/26 Player’s client/server model l Player is a networked device server; control programs are clients l Clients can use any control architecture and can be written in any programming language that can control a socket (that’s pretty much any language) l Client libraries help in writing clients l Clients subscribe to one or more devices on server l Multiple clients may subscribe to the same device Controller (client) Controller (client) Player punky:6665 laser:0 sonar:0 position:0

15 15/26 Client libraries l A client library facilitates the development of control programs l Could be simple (e.g., just implement the Player transport) or sophisticated (e.g., post-process data somehow) l Should provide a language-appropriate API l Currently available for: C, C++, Python, LISP, Ruby, Java, and Octave

16 16/26 Some supported hardware/software l Robots: ActivMedia, Botrics, RWI, Erratic, Segway l Lasers: SICK, Hokuyo l Vision: ACTS, CMVision, CMUCam l Pan-tilt(-zoom): Sony, Canon, Amtec, Direct Perceptions l IMUs: Microstrain, ISense l WiFi: linuxwifi, iwspy, aodv l GPS: any NMEA-compliant (e.g., handheld) unit l Speech: Festival

17 17/26 Abstract drivers l Well-understood algorithms can be encapsulated in Player and offered as standard services for all to use l Player’s driver API provides a common implementation framework l Player becomes a community code repository for useful algorithms l Opportunity for real code reuse in robotics

18 18/26 VFH on 3 very different robots Real time (1.5mps !) Sped up 5x Sped up ~3x

19 19/26 The simulators l Stage l 2-D l sensor-based l Player interface l kinematic; good for slow, statically stable, indoor robots l algorithms: O(1)-O(n) l large teams (100s) l Gazebo l 3-D l sensor-based l Player interface l dynamic; good for fast, dynamically stable, outdoor robots l algorithms: O(n)-O(n^3) l small teams (10s)

20 20/26 Gazebo example: Segway RMP

21 21/26 Tools l playerv: sensor visualization l playernav: localization / navigation control panel (OCU) l playerjoy: joystick / keyboard teleoperation l playermap: scan-matching mapmaker l playerwritemap: retrieve map and save as bitmap file l playercam: remote display of video stream l dgps_server: differential GPS correction server

22 22/26 Portability l Player is developed primarily on x86/Linux, but builds and runs on nearly* any POSIX platform, whether conventional or embedded, e.g., l ARM/Linux (iPAQ, nanoEngine, XScale/Stayton) l PPC/Linux (ipEngine) l PPC/Darwin (OS X) l Sparc/Solaris l x86/Cygwin l Stage and Gazebo additionally require some other Open Source packages (e.g., GTK+, ODE), and are known to build and run on: l x86/Linux l PPC/Darwin (OS X) *Work is ongoing for native Windows builds

23 23/26 The beauty of Open Source l More people will try your code if it’s Open (even if they have no intention of hacking on it) l Many (most?) people who hack on your code will send you patches l And you (eventually) learn to deal with the clueless users… l More people will contribute if they feel some ownership over the result: hence the neutral territory of

24 24/26 The beauty of Open Source l If you build it, they will come: Player has become a common environment for robotic systems development and integration l Player currently contains about 90 drivers, including some for hardware that I’ve never seen, much less used l The developer / user community (sometimes) supports itself l They answer each others’ questions l A user in Pennsylvania tests a new driver written by a developer in New Zealand l It’s even possible to get government funding for Open Source! l And you can protect your IP by distributing binary-only Player plugins (like Linux kernel modules)

25 25/26 Summary l Together, Player, Stage, and Gazebo form the infrastructure necessary for any mobile robotics research program l Player imposes as few constraints as possible on the researcher (use any architecture, any language) l Player allows code reuse through its driver and device APIs, and its client/server protocol (all fully documented) l Stage and Gazebo allow for simulation of a wide variety of robot platforms, both real and imagined l Following the Open Source model, all code is freely available online, and everyone is encouraged to download, use, and modify it (please send us your patches!)

26 26/26 Resources l Player project website: l l (or just Google for “player stage”)

Download ppt "The Player Project: Open Source tools for robotics research & education Brian P. Gerkey Richard T. Vaughan Andrew Howard."

Similar presentations

Ads by Google