1.4 request response communication Mukunda Bharatheesha ROS - - PowerPoint PPT Presentation

1 4
SMART_READER_LITE
LIVE PREVIEW

1.4 request response communication Mukunda Bharatheesha ROS - - PowerPoint PPT Presentation

ROS Services 1.4 request response communication Mukunda Bharatheesha ROS Services the basic idea ROS nodes communicating with Topics Many to many one-way communication ROS Wiki. No acknowledgement.


slide-1
SLIDE 1

Mukunda Bharatheesha

ROS Services – “request – response” communication

1.4

slide-2
SLIDE 2

ROS Services – the basic idea

  • ROS nodes communicating with Topics
  • “Many to many one-way communication” – ROS Wiki.
  • No acknowledgement.
  • Useful for monitoring.
  • ROS Services
  • Request – Response communication.
  • Two message types – a request, and a response.
  • “Event-based” execution for ROS applications.

http://wiki.ros.org/Services

slide-3
SLIDE 3

ROS Services – on the filesystem, utility cmds

list all available ROS services

$ rosservice list

call a ROS service

$ rosservice call <service_name> <arguments_req>

  • ROS services are also defined in the ROS messages package
  • hrwros_msgs/srv folder.
slide-4
SLIDE 4

ROS Services – an example service type

float64 measurement_metres

  • float64 measurement_feet

Bool success

hrwros_msgs/srv/ConvertMetresToFeet.srv

  • Requirement: convert measurement in SI units to Imperial Units
  • request message – measurement in SI units (m).
  • response message – measurement in Imperial Units (ft).

request field response field

  • A service request is processed in a service callback.
slide-5
SLIDE 5

ROS Services – code nomenclature

  • A ROS Node: service server “advertises” a service
  • makes the service available for other ROS nodes.
  • A ROS Node: service client “calls” a service
  • sends a request message once a service is available.
slide-6
SLIDE 6

ROS services – a few properties

  • ROS services block the

program flow.

  • Useful for designing sequential

behaviors.

  • Desirable to have quickly

executing computations in service callback.

  • No going back after a service

call!

Attention!