“ROS 机器人操作系统初级教程”实验报告

理解ROS服务和参数

1使用rosservice

1.1 rosservice list

$ rosservice list image.png 1.2 rosservice type

$ rosservice type clear image.png 1.3 rosservice call

$ rosservice call clear image.png 通过查看再生(spawn)服务的信息,我们来了解带参数的服务:

$ rosservice type spawn| rossrv show image.png $ rosservice call spawn 2 2 0.2 "" image.png image.png 2 Using rosparam

2.1 rosparam list

$ rosparam list image.png 2.2 rosparam 设置 and rosparam 获取

$ rosparam set background_r 150

$ rosservice call clear image.png $ rosparam get background_g image.png $ rosparam get / image.png 2.3 rosparam dump and rosparam load

$ rosparam dump params.yaml

$ rosparam load params.yaml copy

$ rosparam get copy/background_b image.png

最新评论
暂无评论~