robot programming with lisp · robot programming with lisp 38. artificial intelligence establishing...
TRANSCRIPT
![Page 1: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/1.jpg)
Artificial Intelligence
Robot Programming with Lisp6. Lisp Packaging andIntroduction to ROS
Gayane Kazhoyan
Institute for Artificial IntelligenceUniversity of Bremen
November 23rd, 2017
![Page 2: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/2.jpg)
Artificial Intelligence
Outline
Lisp Packages and ASDF SystemsLisp PackagesASDF Systems
Robot Operating SystemWhat is a Robot?ROS OverviewROS Communication LayerROS Build SystemProgramming with ROS
OrganizationalInfo
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp2
![Page 3: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/3.jpg)
Artificial Intelligence
Lisp PackagesLisp packages define namespaces.They are used to avoid naming clashes and control access permissions.
Lisp PackagesCL-USER> (defun lambda () #\L)Lock on package COMMON-LISP violated when proclaiming LAMBDA as ...CL-USER> (defpackage :i-want-my-own-lambda)CL-USER> (in-package :i-want-my-own-lambda)#<COMMON-LISP:PACKAGE "I-WANT-MY-OWN-LAMBDA">I-WANT-MY-OWN-LAMBDA> (common-lisp:defun lambda () #\L)LAMBDAI-WANT-MY-OWN-LAMBDA> (common-lisp:in-package :cl-user)#<PACKAGE "COMMON-LISP-USER">CL-USER> (describe *)#<PACKAGE "COMMON-LISP-USER">Documentation:public: the default package for user code and data
Nicknames: CL-USERUse-list: COMMON-LISP, SB-ALIEN, SB-DEBUG, SB-EXT, SB-GRAY, SB-PROFILELisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp3
![Page 4: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/4.jpg)
Artificial Intelligence
Lisp Packages [2]Defining a Package
defpackage defined-package-name [[option]] => package
option::= (:nicknames nickname*)* |(:documentation string) |(:use package-name*)* |(:shadow symbol-name*)* |(:shadowing-import-from package-name symbol-name*)* |(:import-from package-name symbol-name*)* |(:export symbol-name*)* |(:intern symbol-name*)* |(:size integer)
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp4
![Page 5: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/5.jpg)
Artificial Intelligence
Lisp Packages [3]
Example Package DefinitionCL-USER> (defpackage :homework
(:nicknames :hw)(:documentation "A namespace for my homework assignments")(:use :common-lisp))
#<PACKAGE "HOMEWORK">CL-USER> (in-package :homework)#<PACKAGE "HOMEWORK">HW> (defun say-hello () (print "hello"))HW> (say-hello)"hello"HW> (in-package :common-lisp-user)#<PACKAGE "COMMON-LISP-USER">CL-USER> (say-hello)The function COMMON-LISP-USER::SAY-HELLO is undefined.CL-USER> (hw:say-hello)The symbol "SAY-HELLO" is not external in the HOMEWORK package.CL-USER> (hw::say-hello)"hello"Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp5
![Page 6: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/6.jpg)
Artificial Intelligence
Symbol Namespacessymbol-packageCL-USER> (in-package "HOMEWORK")#<PACKAGE "HOMEWORK">HW> (describe 'say-hello)HOMEWORK::SAY-HELLOHW> (describe 'defun)COMMON-LISP:DEFUNHW> (describe :hello):HELLOHW> (symbol-package 'say-hello)#<PACKAGE "HOMEWORK">HW> (symbol-package :hello)#<PACKAGE "KEYWORD">HW> (eql ':hello :hello)THW> keyword:hello:HELLOHW> (eql :hello keyword:hello)TLisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp6
![Page 7: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/7.jpg)
Artificial Intelligence
Symbol Namespaces [2]
Uninterned symbols, find-package, internHW> '#:hello#:HELLOHW> (symbol-package '#:hello)NILHW> (eql '#:hello '#:hello)NILHW> (gensym)#:G1008HW> (find-package :homework)#<PACKAGE "HOMEWORK">HW> (intern "HELLO" (find-package :homework))HELLONILHW> (describe 'hello)HOMEWORK::HELLOHW> (loop for i from 1 to 5
collect (intern (format nil "NAME-~a" i)))(NAME-1 NAME-2 NAME-3 NAME-4 NAME-5)Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp7
![Page 8: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/8.jpg)
Artificial Intelligence
Outline
Lisp Packages and ASDF SystemsLisp PackagesASDF Systems
Robot Operating SystemWhat is a Robot?ROS OverviewROS Communication LayerROS Build SystemProgramming with ROS
OrganizationalInfo
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp8
![Page 9: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/9.jpg)
Artificial Intelligence
ASDF Systems
ASDF is Another System Definition Facility:• It takes care of compiling and “linking” files together in correct order.• It is also responsible for finding Lisp files across the file system.
ASDF System Definition(in-package :cl-user)(asdf:defsystem my-system:name "My Super-Duper System":description "My Super-Duper System is for doing cool stuff.":long-description "Here's how it does cool stuff: ...":version "0.1":author "First Last <[email protected]>":licence "BSD":depends-on (alexandria and-another-system):components ((:file "package")))
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp9
![Page 10: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/10.jpg)
Artificial Intelligence
ASDF Systems [2]ASDF keeps a registry of all the paths where it expects to find .asd files.A registry is a list of paths.
There are different types of registries: for users, for administrators, etc.But the simplest is to work with the *central-registry*.
Managing the RegistryCL-USER> asdf:*central-registry*(#P"/some/path/"#P"/some/other/path/")CL-USER> (push "~/path/to/dir/of/my-system/" asdf:*central-registry*)("~/path/to/dir/of/my-system/"#P"/some/path/"#P"/some/other/path/")CL-USER> (asdf:load-system :my-system)T
The trailing slash is important (“/some/path/”)!Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp10
![Page 11: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/11.jpg)
Artificial Intelligence
Outline
Lisp Packages and ASDF SystemsLisp PackagesASDF Systems
Robot Operating SystemWhat is a Robot?ROS OverviewROS Communication LayerROS Build SystemProgramming with ROS
OrganizationalInfo
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp11
![Page 12: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/12.jpg)
Artificial Intelligence
Industrial RobotsLogistics
Image courtesy: BIBA
Automotive
Image courtesy: Mercedes Benz Bremen
• Extremely heavy, precise and dangerous, not really smart• Mostly no sensors, only high-precision motor encoders• Programmable through PLCs (using block diagrams or Pascal / Basiclike languages)
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp12
![Page 13: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/13.jpg)
Artificial Intelligence
Industrial Light-weight Robots
Production:
Copyright: Universal Robots
Medicine:
Copyright: Intuitive Surgical
Automotive:
Copyright: KUKA Roboter GmbH
• Very precise, moderately dangerous, somewhat smart• High-precision motor encoders, sometimes force sensors, cameras• Native programming and simulation tools (C++, Java, Python, GUIs)
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp13
![Page 14: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/14.jpg)
Artificial Intelligence
Service Robots
Autonomous aircrafts Mobile platforms
Courtesy DJI Courtesy NASA/JPL-Caltech
Manipulation platforms Humanoids
• Usually not veryprecise
• Not really dangerous• Usuallycognition-enabled
• Equipped with lotsof sensors
• Usually running aLinux
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp14
![Page 15: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/15.jpg)
Artificial Intelligence
Service Robots with Light-weight ArmsDLR Justin
Courtesy of DLR
TUM Rosie
• Moderately precise and dangerous• Cognition-enabled• Equipped with lots of sensors• Usually running a combination of a real-time and non real-time OS.
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp15
![Page 16: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/16.jpg)
Artificial Intelligence
Outline
Lisp Packages and ASDF SystemsLisp PackagesASDF Systems
Robot Operating SystemWhat is a Robot?ROS OverviewROS Communication LayerROS Build SystemProgramming with ROS
OrganizationalInfo
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp16
![Page 17: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/17.jpg)
Artificial Intelligence
Motivation
• Numerous different robotics labs, each with their own robot platforms,different operating systems and programming languages but similarsoftware and hardware modules for most of them.
• Each lab reinventing the wheel for their platforms.• Idea: provide a unified software framework for everyone to work with.Requirements:
– Support for different programming languages– Different operating systems– Distributed processing over multiple computers / robots– Easy software sharing mechanisms
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp17
![Page 18: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/18.jpg)
Artificial Intelligence
Motivation
• Numerous different robotics labs, each with their own robot platforms,different operating systems and programming languages but similarsoftware and hardware modules for most of them.
• Each lab reinventing the wheel for their platforms.
• Idea: provide a unified software framework for everyone to work with.Requirements:
– Support for different programming languages– Different operating systems– Distributed processing over multiple computers / robots– Easy software sharing mechanisms
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp18
![Page 19: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/19.jpg)
Artificial Intelligence
Motivation
• Numerous different robotics labs, each with their own robot platforms,different operating systems and programming languages but similarsoftware and hardware modules for most of them.
• Each lab reinventing the wheel for their platforms.• Idea: provide a unified software framework for everyone to work with.Requirements:
– Support for different programming languages– Different operating systems– Distributed processing over multiple computers / robots– Easy software sharing mechanisms
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp19
![Page 20: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/20.jpg)
Artificial Intelligence
Motivation
• Numerous different robotics labs, each with their own robot platforms,different operating systems and programming languages but similarsoftware and hardware modules for most of them.
• Each lab reinventing the wheel for their platforms.• Idea: provide a unified software framework for everyone to work with.Requirements:
– Support for different programming languages
– Different operating systems– Distributed processing over multiple computers / robots– Easy software sharing mechanisms
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp20
![Page 21: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/21.jpg)
Artificial Intelligence
Motivation
• Numerous different robotics labs, each with their own robot platforms,different operating systems and programming languages but similarsoftware and hardware modules for most of them.
• Each lab reinventing the wheel for their platforms.• Idea: provide a unified software framework for everyone to work with.Requirements:
– Support for different programming languages– Different operating systems
– Distributed processing over multiple computers / robots– Easy software sharing mechanisms
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp21
![Page 22: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/22.jpg)
Artificial Intelligence
Motivation
• Numerous different robotics labs, each with their own robot platforms,different operating systems and programming languages but similarsoftware and hardware modules for most of them.
• Each lab reinventing the wheel for their platforms.• Idea: provide a unified software framework for everyone to work with.Requirements:
– Support for different programming languages– Different operating systems– Distributed processing over multiple computers / robots
– Easy software sharing mechanisms
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp22
![Page 23: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/23.jpg)
Artificial Intelligence
Motivation
• Numerous different robotics labs, each with their own robot platforms,different operating systems and programming languages but similarsoftware and hardware modules for most of them.
• Each lab reinventing the wheel for their platforms.• Idea: provide a unified software framework for everyone to work with.Requirements:
– Support for different programming languages– Different operating systems– Distributed processing over multiple computers / robots– Easy software sharing mechanisms
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp23
![Page 24: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/24.jpg)
Artificial Intelligence
Robot Operating System
At 2007 Willow Garage, a company founded by anearly Google employee Scott Hassan at 2006 in theSilicon Valley, starts working on their Personal Roboticsproject and ROS.
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp24
![Page 25: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/25.jpg)
Artificial Intelligence
Robot Operating System [2]
ROS core components:• Meta-Operating System for programming robotics software(configuring, starting / stopping, logging etc. software components)
• Middleware for communication of the components of a roboticsystem (distributed inter-process / inter-machine communication)
• A collection of packaging / build system tools with a strong focus onintegration and documentation
• Language-independent architecture (C++, Python, Lisp, Java,JavaScript, ...)
ROS core software developed and maintained by OSRF and someexternals.
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp25
![Page 26: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/26.jpg)
Artificial Intelligence
Robot Operating System [3]
In addition, developed by the ROS community:• hardware drivers• libraries (PCL, OpenCV, TF, ...)• capabilities (navigation, manipulation, control, ...)• applications (fetching beer, making popcorn, ...)
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp26
![Page 27: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/27.jpg)
Artificial Intelligence
ROS CommunityFrom the community report:
wiki.ros.org visitor locations:
Source: Google AnalyticsSite: wiki.ros.org in July 2015
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp27
![Page 28: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/28.jpg)
Artificial Intelligence
ROS Community [2]Some robots supporting ROS (data from November 2014):
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp28
![Page 29: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/29.jpg)
Artificial Intelligence
Outline
Lisp Packages and ASDF SystemsLisp PackagesASDF Systems
Robot Operating SystemWhat is a Robot?ROS OverviewROS Communication LayerROS Build SystemProgramming with ROS
OrganizationalInfo
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp29
![Page 30: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/30.jpg)
Artificial Intelligence
Robotic software components
Robot PCs
AI PC
Vision PC
→ Processes distributed all over the place.
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp30
![Page 31: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/31.jpg)
Artificial Intelligence
Robotic software components
Robot PCs
AI PC
Vision PC
→ Processes distributed all over the place.Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp31
![Page 32: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/32.jpg)
Artificial Intelligence
Connecting Pieces Together
Robot PCs
AI PC
Vision PC
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp32
![Page 33: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/33.jpg)
Artificial Intelligence
Connecting Pieces Together [2]
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp33
![Page 34: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/34.jpg)
Artificial Intelligence
Connecting Pieces Together [2]
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp34
![Page 35: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/35.jpg)
Artificial Intelligence
Connecting Pieces Together [2]
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp35
![Page 36: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/36.jpg)
Artificial Intelligence
Distributed Hosts
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp36
![Page 37: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/37.jpg)
Artificial Intelligence
roscore
• ROS master– A centralized XML-RPC server– Negotiates communication connections– Registers and looks up names of participant components
• Parameter Server– Stores persistent configuration parameters and other arbitrary data
• rosout– Distributed stdout
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp37
![Page 38: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/38.jpg)
Artificial Intelligence
Terminology
• Nodes are processes that produce and consume data• Parameters are persistent data stored on parameter server, e.g.configuration and initialization settings
Node communication means:• Topics: asynchronous many-to-many “streams-like”
– Strongly-typed (ROS .msg spec)– Can have one or more publishers– Can have one or more subscribers
• Services: synchronous blocking one-to-many “function-call-like”– Strongly-typed (ROS .srv spec)– Can have only one server– Can have one or more clients
• Actions: asynchronous non-blocking one-to-many “function-call-like”– Built on top of topics but can be canceled
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp38
![Page 39: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/39.jpg)
Artificial Intelligence
Establishing Communication
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp39
![Page 40: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/40.jpg)
Artificial Intelligence
Establishing Communication
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp40
![Page 41: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/41.jpg)
Artificial Intelligence
Establishing Communication
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp41
![Page 42: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/42.jpg)
Artificial Intelligence
Establishing Communication
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp42
![Page 43: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/43.jpg)
Artificial Intelligence
Establishing Communication
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp43
![Page 44: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/44.jpg)
Artificial Intelligence
Establishing Communication
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp44
![Page 45: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/45.jpg)
Artificial Intelligence
Establishing Communication
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp45
![Page 46: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/46.jpg)
Artificial Intelligence
Establishing Communication
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp46
![Page 47: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/47.jpg)
Artificial Intelligence
Establishing Communication
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp47
![Page 48: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/48.jpg)
Artificial Intelligence
Establishing Communication
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp48
![Page 49: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/49.jpg)
Artificial Intelligence
Establishing Communication
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp49
![Page 50: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/50.jpg)
Artificial Intelligence
ROS Graph
• Starting the core:$ roscore
• Starting a node:$ rosrun turtlesim turtlesim_node
• Starting another node:$ rosrun turtlesim turtle_teleop_key
• Examining the ROS Graph:$ rqt_graph
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp50
![Page 51: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/51.jpg)
Artificial Intelligence
Tools• rosnode: gives the user information about a node
$ rosnode -h
cleanup, info, kill, list, machine, ping
• rostopic: gives publishers, subscribes to the topic, datarate, theactual databw, echo, find, hz, info, list, pub, type
• rosservice: enables a user to call a ROS Service from thecommand linecall, find, list, type, uri
• rosmsg: gives information about message typeslist, md5, package, packages, show
• rossrv: same as above for service typeslist, md5, package, packages, show
• roswtf: diagnoses problems with a ROS networkLisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp51
![Page 52: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/52.jpg)
Artificial Intelligence
Outline
Lisp Packages and ASDF SystemsLisp PackagesASDF Systems
Robot Operating SystemWhat is a Robot?ROS OverviewROS Communication LayerROS Build SystemProgramming with ROS
OrganizationalInfo
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp52
![Page 53: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/53.jpg)
Artificial Intelligence
Packages and Metapackages
• Packages are a named collection of software that is built and treated asan atomic dependency in the ROS build system.
• Metapackages are dummy “virtual” packages that reference one ofrmore related packages which are loosely grouped together
Similar to Debian packages.Actually released through the Debian packaging system.
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp53
![Page 54: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/54.jpg)
Artificial Intelligence
ROS WorkspacePackages are stored in ROS workspaces:$ roscd
Workspaces have a specific structurebuilddevelinstallsrc
CMakeLists.txtros_package_1metapack_repo_1
metapackage_1ros_package_2ros_package_3
CMakeLists.txtpackage.xmlasdf-system.asdsrc
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp54
![Page 55: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/55.jpg)
Artificial Intelligence
Managing Packages
• Creating a package:$ roscd && cd src/lisp_course_material
$ catkin_create_pkg assignment_6 roslisp turtlesim geometry_msgs
• Compiling a package:$ roscd && catkin_make
• Moving through ROS workspaces:$ roscd assignment_6
Naming convention: underscores (no CamelCase, no-dashes)!
All the packages in your workspace are one huge CMake project.
→ Multiple workspaces chained together.
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp55
![Page 56: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/56.jpg)
Artificial Intelligence
Package.xml
assignment_6/package.xml<?xml version="1.0"?><package><name>assignment_6</name><version>0.0.0</version><description>The assignment_6 package</description><maintainer email="[email protected]">Gaya</maintainer><license>Public domain</license><buildtool_depend>catkin</buildtool_depend><build_depend>geometry_msgs</build_depend><build_depend>roslisp</build_depend><build_depend>turtlesim</build_depend><run_depend>geometry_msgs</run_depend><run_depend>roslisp</run_depend><run_depend>turtlesim</run_depend>
</package>
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp56
![Page 57: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/57.jpg)
Artificial Intelligence
CMakeLists
assignment_6/CMakeLists.txtcmake_minimum_required(VERSION 2.8.3)project(assignment_6)find_package(catkin REQUIRED COMPONENTSroslispgeometry_msgs
)catkin_package(CATKIN_DEPENDS roslisp geometry_msgs
)
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp57
![Page 58: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/58.jpg)
Artificial Intelligence
Launch FilesAutomated Starting, Stopping and Configuring the Nodes
XML files for launching nodes:• automatically set parameters and start nodes with a single file• hierarchically compose collections of launch files• automatically re-spawn nodes if they crash• change node names, namespaces, topics, and other resource names• without recompiling• easily distribute nodes across multiple machines
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp58
![Page 59: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/59.jpg)
Artificial Intelligence
Launch Files [2]Automated Starting, Stopping and Configuring the Nodes
Example<launch><!-- Starting nodes--><node pkg="turtlesim" type="turtlesim_node" name="sim"/><node pkg="turtlesim" type="turtle_teleop_key" name="teleop"
output="screen"/>
<!-- Setting parameters --><param name="some_value" type="double" value="2.0"/>
</launch>
Using the launch file:$ roslaunch package_name launch_file_name
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp59
![Page 60: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/60.jpg)
Artificial Intelligence
Outline
Lisp Packages and ASDF SystemsLisp PackagesASDF Systems
Robot Operating SystemWhat is a Robot?ROS OverviewROS Communication LayerROS Build SystemProgramming with ROS
OrganizationalInfo
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp60
![Page 61: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/61.jpg)
Artificial Intelligence
ROS API
ROS API provides the programmer with means to• start ROS node processes• generate messages• publish and subscribe to topics• start service servers• send service requests• provide and query action services• find ROS packages• ...
ROS APIs: roscpp, rospy, rosjava, rosjs, roslisp
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp61
![Page 62: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/62.jpg)
Artificial Intelligence
Links
• ROS documentationhttp://wiki.ros.org/
• ROS community supporthttp://answers.ros.org/questions/
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp62
![Page 63: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/63.jpg)
Artificial Intelligence
Outline
Lisp Packages and ASDF SystemsLisp PackagesASDF Systems
Robot Operating SystemWhat is a Robot?ROS OverviewROS Communication LayerROS Build SystemProgramming with ROS
OrganizationalInfo
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp63
![Page 64: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/64.jpg)
Artificial Intelligence
Organizational Info
• Assignment:lisp_course_material/assignment_6_README.md
• Tutorial link:http://wiki.ros.org/roslisp/Tutorials/OverviewVersion
• Grades: 5 points for this assignment• Due: 29.11, 23:59 AM German time• Next class: 30.11, 14:15
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp64
![Page 65: Robot Programming with Lisp · Robot Programming with Lisp 38. Artificial Intelligence Establishing Communication Lisp Packages and ASDF SystemsRobot Operating SystemOrganizational](https://reader035.vdocument.in/reader035/viewer/2022062610/61239501df2dc512cb76109a/html5/thumbnails/65.jpg)
Artificial Intelligence
Q & A
Thanks for your attention!
Special thanks to Lorenz Mösenlechner and Jan Winkler for providing illustrations!
Lisp Packages and ASDF Systems Robot Operating System Organizational
Gayane Kazhoyan
November 23rd , 2017
Robot Programming with Lisp65