ROS入门(十四)测试简单的Service和Client

文章目录

运行Service

让我们从运行Service开始:

$ rosrun beginner_tutorials add_two_ints_server     (C++)
$ rosrun beginner_tutorials add_two_ints_server.py  (Python)

你将会看到如下类似的信息:

Ready to add two ints.

运行Client
现在,运行Client并附带一些参数:

$ rosrun beginner_tutorials add_two_ints_client 1 3     (C++)
$ rosrun beginner_tutorials add_two_ints_client.py 1 3  (Python)

你将会看到如下类似的信息:

request: x=1, y=3
sending back response: [4]

现在,你已经成功地运行了你的第一个Service和Client程序,可以开始学习如何记录与回放数据了.

发布了34 篇原创文章 · 获赞 2 · 访问量 2336

猜你喜欢

转载自blog.csdn.net/weixin_44088559/article/details/104990271
今日推荐