Add command to send a request with gz topic

#2907 Merged at a5d7110
Repository
ocrave
Branch
gz_topic_request
Repository
osrf
Branch
default
Author
  1. Olivier Crave
Reviewers
Description

This pull request adds a new command to gz topic to send requests.

Its prototype is: gz topic -r <request_name> [-m <message>] [-f <file>]

Optional data can be sent with options -m or -f where message is a message to send and file is the path to a file containing the message to send.

Some command line examples:

$ gz topic -r atmosphere_info

type: ADIABATIC
temperature: 288.15
pressure: 101325
mass_density: 1.2249782197913108
enable_atmosphere: true

$ gz topic -r entity_delete -m ground_plane
$ gz topic -r unknown_request
No response received

Note that this pull request also adds a timeout parameter to gazebo::transport::request whose default value is -1 to wait forever.

Comments (7)