When you need to communicate with nodes and receive a reply, you cannot do it with topics; you need to do it with services. The services are developed by the user, and standard services don’t exist for nodes. The files with the source code of the messages are stored in the srv folder.

With rosservice, we can list and query services. The commands supported are as follows:

  • rosservice call /service args: This calls the service with the provided arguments
  • rosservice find msg-type: This finds services by the service type
  • rosservice info /service: This prints information about the service
  • rosservice list: This lists active services
  • rosservice type /service: This prints the service type
  • rosservice uri /service: This prints the service ROSRPC URI