service是nodes之间通信的一种方式,允许nodes send a request and recieve a response。

  • rosservice
  • rosparam

roservice

rosservice list         print information about active services   #展示有哪些service
rosservice call call the service with the provided args #rosservice call [service] [args]
rosservice type print service type #rosservice type [service]
rosservice find find services by service type
rosservice uri print service ROSRPC uri

rosparam

rosparam allows you to store and manipulate data on the ROS Parameter Server. The Parameter Server can store integers, floats, boolean, dictionaries, and lists. rosparam uses the YAML markup language for syntax. In simple cases, YAML looks very natural: 1 is an integer, 1.0 is a float, one is a string, true is a boolean, [1, 2, 3] is a list of integers, and {a: b, c: d} is a dictionary. rosparam has many commands that can be used on parameters, as shown below:

rosparam set            set parameter       # rosparam set /background_r 150
rosparam get get parameter # rosparam get /background_g
rosparam load load parameters from file
rosparam dump dump parameters to file
rosparam delete delete parameter
rosparam list list parameter names

dump load用法举例

rosparam dump [file_name] [namespace]
rosparam load [file_name] [namespace] rosparam dump params.yaml #把所有的参数写入params.yaml
rosparam load params.yaml copy #加载param.yaml的参数到新的namespace(新的namespace名字为copy)
rosparam get /copy/background_b #获取上一步中的新的namespace中的参数信息

在set parameter以后必须调用rosservice call /clear使其生效

This changes the parameter value, now we have to call the clear service for the parameter change to take effect:

rosservice call /clear

rosparam用来存储及操作位于Parameter Server的数据.

Understanding ROS Services and Parameters的更多相关文章

  1. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection

    ylbtech-Error-WebForm: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\ ...

  2. [转]Understanding Integration Services Package Configurations

    本文转自:http://msdn.microsoft.com/en-us/library/cc895212.aspx Introduction With the 2008 release, SQL S ...

  3. Understanding Optional and Compulsory Parameters

    If the MVC Framework cannot find a value for a reference type parameter (such as a string or object) ...

  4. ROS学习手记 - 5 理解ROS中的基本概念_Services and Parameters

    上一节完成了对nodes, Topic的理解,再深入一步: Services and Parameters 我不理解为何 ROS wiki 要把service与parameter放在一起介绍, 很想分 ...

  5. ROS教程

    Learning ROS 学习ROS Depending on your learning style and preferences, you can take two approaches to ...

  6. ROS入门学习(基于Ubuntu16.04+kinetic)

    本文主要部分全部来源于ROS官网的Tutorials. Setup roscore # making sure that we have roscore running rosrun turtlesi ...

  7. Learning ROS: Ubuntu16.04下kinetic开发环境安装和初体验 Install + Configure + Navigating(look around) + Creating a Package(catkin_create_pkg) + Building a Package(catkin_make) + Understanding Nodes

    本文主要部分来源于ROS官网的Tutorials. Ubuntu install of ROS Kinetic # Setup your sources.list sudo sh -c 'echo & ...

  8. Creating a ROS msg and srv

    msg: msg files are simple text files that describe the fields of a ROS message. They are used to gen ...

  9. ROS 101

    https://www.clearpathrobotics.com/blog/2014/01/how-to-guide-ros-101/ 什么是ROS ROS(robot operating syst ...

随机推荐

  1. Tomcat7在centos7.3上正常运行,在centos7.2就不行了

    我在jdk1.7的环境下,把一个tomcat7从一台centos7.3的服务器迁移到7.2,理论上讲  迁移完成之后只要端口没有被占用,环境变量配置完成,Tomcat是可以正常启动的(空的Tomcat ...

  2. 配置maven和maven本地仓库

    l配置maven: 下载maven 网站: http://maven.apache.org/download.cgi 下载解压,在配置maven 右键本地电脑   选择 属性  在选择高级环境变量在选 ...

  3. Fence Repair POJ - 3253 (贪心)

    Farmer John wants to repair a small length of the fence around the pasture. He measures the fence an ...

  4. Jmeter中连接Oracle报错Cannot create PoolableConnectionFactory

    填坑贴,之前一直用jmeter2.13版本进行oracle测试,今天改为3.2版本,发现按照以往的方法执行测试,JDBC Request结果始终报错:Cannot create PoolableCon ...

  5. python MVC、MTV 框架介绍 Django 模板系统常用语法

    Django 框架简介一.MVC框架和MTV框架1.MVC 全名Model View Controller,是软件工程中的一种软件架构模式,把软件系统分为三个基本部分.优势: 耦合性低 重用性高 生命 ...

  6. 前端基础之JS

    流程控制 if-else var a = 10; if (a > 5){ console.log("yes"); }else { console.log("no&q ...

  7. Shell语言

    1.shell脚本规范以.sh结尾 2.运行 3.赋予权限,查询shell的执行过程 输出时间的 输出日历 输出一年的日历 修改语言 计算机 read –t 3 –p “1111111111”   # ...

  8. 【DFS】困难的串

    题目: 问题描述:如果一个字符串包含两个相邻的重复子串,则称它为容易的串,其他串称为困难的串.如:BB,ABCDACABCAB,ABCDABCD都是容易的,A,AB,ABA,D,DC,ABDAB,CB ...

  9. Python公众号开发(二)—颜值检测

    上篇文章,我们把自己的程序接入了微信公众号,并且能把用户发送的文本及图片文件原样返回.今天我们把用户的图片通过腾讯的AI平台分析后再返回给用户. 为了防止我的文章被到处转载,贴一下我的公众号[智能制造 ...

  10. [Swift]LeetCode247.对称数 II $ Strobogrammatic Number II

    A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside ...