1、ROS Services
ROS 服务是 ROS 提供的一种节点之间相互通信的方式,一个服务允许节点发送一个请求 request 或者接收一个响应 response。
2、rosservice
rosservice 命令可以对服务进行操作,比如调用服务,显示服务类型等,如下:
rosservice list print information about active services
rosservice call call the service with the provided args
rosservice type print service type
rosservice find find services by service type
rosservice uri print service ROSRPC uri
2.1 rosservice list
list 命令能够列出当前运行的节点提供的所有服务,让我们先来运行上一篇博客的小乌龟节点,先运行 roscore:
roscore
再开启一个新终端启动小乌龟节点,也可以在一个终端中分屏,参考这篇文章:
rosrun turtlesim turtlesim_node
然后使用 list 命令查看当前运行的小乌