ROS - Robot Operating System€¦ · ROS Tutorial Packages and Stacks I Packages : directories with...

Preview:

Citation preview

ROS - Robot Operating System

Brian Gerkey

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

March 17, 2011

ROS Tutorial

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

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

ROS TutorialActions (1/2)

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

ROS TutorialActions (2/2)

I action protocol relies on ROS topics to transport messages

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

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}

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

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

ROS Tutorialros.org

Documentation, tutorials, wiki:

ROS TutorialExample

I simulator_stage demo

Recommended