12
ROS - Robot Operating System Brian Gerkey Willow Garage, Inc http://www.willowgarage.com March 17, 2011

ROS - Robot Operating System€¦ · ROS Tutorial Packages and Stacks I Packages : directories with a certain structure, can contain anything: nodes, messages, tools I in their most

  • Upload
    others

  • View
    16

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ROS - Robot Operating System€¦ · ROS Tutorial Packages and Stacks I Packages : directories with a certain structure, can contain anything: nodes, messages, tools I in their most

ROS - Robot Operating System

Brian Gerkey

Willow Garage, Inchttp://www.willowgarage.com

March 17, 2011

Page 2: ROS - Robot Operating System€¦ · ROS Tutorial Packages and Stacks I Packages : directories with a certain structure, can contain anything: nodes, messages, tools I in their most

ROS Tutorial

Page 3: ROS - Robot Operating System€¦ · ROS Tutorial Packages and Stacks I Packages : directories with a certain structure, can contain anything: nodes, messages, tools I in their most

ROS TutorialTopics

I nodes connect via topicsI the discovery of who publishes on what topic is done via a

ROS master0)

adv

ertis

e(“b

ar”,f

oo:1

234)

1) subscribe (“bar”)

2) {foo:1234}

3) connect (“scan”, TCP)

4) TCP server: foo:2345

5) connect (foo:2345)

6) data messages TCP

TalkerXML/RPC: foo: 1234TCP data: foo: 2345

TalkerXML/RPC: foo: 1234TCP data: foo: 2345

ListenerListener

ROS MasterROS Master

XML/RPC

Page 4: ROS - Robot Operating System€¦ · ROS Tutorial Packages and Stacks I Packages : directories with a certain structure, can contain anything: nodes, messages, tools I in their most

ROS TutorialServices

I synchronous services

ListenerListener

0) a

dver

tiseS

ervi

ce (“

bar”

,foo:

1234

)1) lookupS

ervice (“bar”)

2) {foo:3456}

4) request data (args)

5) reply data

TCP

TalkerXML/RPC: foo: 1234ROSRPC: foo: 3456

TalkerXML/RPC: foo: 1234ROSRPC: foo: 3456

ROS MasterROS Master

XML/RPC

Page 5: ROS - Robot Operating System€¦ · ROS Tutorial Packages and Stacks I Packages : directories with a certain structure, can contain anything: nodes, messages, tools I in their most

ROS TutorialActions (1/2)

Using function calls and callbacksI request goals (client side)I execute goals (server side)

Page 6: ROS - Robot Operating System€¦ · ROS Tutorial Packages and Stacks I Packages : directories with a certain structure, can contain anything: nodes, messages, tools I in their most

ROS TutorialActions (2/2)

I action protocol relies on ROS topics to transport messages

Page 7: ROS - Robot Operating System€¦ · ROS Tutorial Packages and Stacks I Packages : directories with a certain structure, can contain anything: nodes, messages, tools I in their most

ROS TutorialMessages

I defined in package-name/msg/*.msg files, sent over topicsI basic data types:

I int{8,16,32,64}I float{32,64}I stringI timeI durationI array[]

I Example: Point .msgfloat64 xfloat64 yfloat64 z

I used in ROS services, defined in package-name/srv/*.srvService = Request msg + Response msg

Page 8: ROS - Robot Operating System€¦ · ROS Tutorial Packages and Stacks I Packages : directories with a certain structure, can contain anything: nodes, messages, tools I in their most

ROS TutorialParameters (1/2)

I nodes can set parameters on the serverI any other nodes can read them

1) s

etP

aram

(“fo

o”,1

) 2) getParam

(“foo”)

TalkerTalker ListenerListener

ROS MasterROS Master

3) {foo: 1}

Page 9: ROS - Robot Operating System€¦ · ROS Tutorial Packages and Stacks I Packages : directories with a certain structure, can contain anything: nodes, messages, tools I in their most

ROS TutorialParameters (2/2)

I have unique namesI can represent primitive data types:

I integersI floatsI booleanI dictionariesI maps, etc

I can be set and remapped at runtimeI stored on the parameter server

Page 10: ROS - Robot Operating System€¦ · ROS Tutorial Packages and Stacks I Packages : directories with a certain structure, can contain anything: nodes, messages, tools I in their most

ROS TutorialPackages and Stacks

I Packages : directories with a certain structure, can containanything: nodes, messages, tools

I in their most basic form:I package_nameI package_name/MakefileI package_name/CMakeLists.txtI package_name/manifest .xml

I ROS core = small, but ROS universe = many packages !!!I Stacks : collection of packagesI in their most basic form:

I stack_name/I stack_name/package_name_1I stack_name/package_name_NI stack_name/stack .xml

Page 11: ROS - Robot Operating System€¦ · ROS Tutorial Packages and Stacks I Packages : directories with a certain structure, can contain anything: nodes, messages, tools I in their most

ROS Tutorialros.org

Documentation, tutorials, wiki:

Page 12: ROS - Robot Operating System€¦ · ROS Tutorial Packages and Stacks I Packages : directories with a certain structure, can contain anything: nodes, messages, tools I in their most

ROS TutorialExample

I simulator_stage demo