Services are another method of communication for nodes in the ROS graph. Services are based on a call-and-response model, versus topics’ publisher-subscriber model. While topics allow nodes to subscribe to data streams and get continual updates, services only provide data when they are specifically called by a client.
服务,是另外一种通讯方式,不同于topic 持续的,周期的。
服务是,事件类型的。 被客户端 请求了, 服务器端会响应。 响应结束,服务可能就结束了。
节点需要实现 客户端或服务端的逻辑。

ros2 run turtlesim turtlesim_node
ros2 run turtlesim turtle_teleop_key
ros2 service list -t
/clear
/kill
/reset
/spawn
/teleop_turtle/describe_parameters
/teleop_turtle/get_parameter_types
/teleop_turtle/get_parameters
/teleop_turtle/list_parameters
/teleop_turtle/set_parameters
/te

最低0.47元/天 解锁文章
1038

被折叠的 条评论
为什么被折叠?



