일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- mysql
- Subscribe
- 프로그래밍
- 반복문
- 그랑사가
- 리눅스
- Linux
- ros
- C언어
- ubuntu
- topic
- 오늘도 우라라
- 데이터 베이스
- install opencv-4.4.0 on ubuntu 22.04
- LeetCode
- mariaDB
- 마리아 DB
- 오늘도 우라라 펫
- while
- 토픽
- C++
- 오늘도 우라라 펫 공략
- JungOl
- publish
- 오늘도 우라라 공략
- 환경설정
- 기초
- 등차수열
- MSG
- 우분투
- Today
- Total
하루의 쉼터
[ROS] param vs rosparam 본문
| param과 rosparam 차이점
1. param
- Parameter Server에서 설정할 파라미터를 정의
- value의 파라미터 설정을 txt file, bin file, command 속성으로 지정하여 매개 변수의 값을 설정할 수 있음
* value는 string, int, bool, double 형태만 가능함.
- 단일 매개변수를 <param>설정하여 처리할 수 있음.
1.1 Attributes
name | "namespace/name" |
매개변수 이름, 전역변수(namespace) 이름이 겹치지 않게 주의 필요 | |
value | "value(optional) " |
매개변수 값을 정의, 생략하려면 binfile, textfile, command를 통하여 지정해야함. | |
type | "str" OR "int" OR "double" OR "bool" OR "yaml" (optional) |
지정이 없을시 roslaunch에서 자동으로 지정 - '.'이 있는 숫자는 부동 소숫점 아니라면 정수 type - true / false bool type - 이외에 모든 값은 문자열 |
|
textfile | "$(find pkg-name(패키지 이름))/path(경로)/file.txt"(optional) |
파일의 내용을 읽고 문자열로 저장 - 파일은 로컬에서 액세스 할 수 있어야 함. |
|
binfile | "$(find pkg-name(패키지 이름))/path(경로)/file"(optional) |
파일의 내용을 읽고 base64로 인코딩된 XML-RPC 바이너리 개체로 저장 - 파일은 로컬에서 액세스 할 수 있어야 함. |
|
command | $(find pkg-name(패키지 이름))/exe '$(find pkg-name(패키지 이름))/arg.txt'"(optional) |
명령의 출력은 문자열로 읽고 저장 - 패키지 관련 $(find)/file.txt 구문을 사용하여 파일 인수를 지정(권장) - XML 요구사항에 맞춰 작은 땀오표를 사용하여 파일 인수를 인용해야 함 |
ex)
<param name="params_a" type="yaml" command="cat '$(find roslaunch)/test/params.yaml'" />
2. rosparam
- YAML 인코딩 파일을 사용하여 Parameter Server에서 ROS 파라미터가져오고 설정
- 매개변수의 일괄처리, 매개변수가 많은 경우 yaml file을 통하여 처리하면 유리함.
- <rosparam> 태그는 <node> 태그 안에 넣을 수 있으며, 이 경우 private 이름처럼 처리됨
- "delete" 및 "dump" 명령은 load 명령 앞뿐만 아니라 다른 파라미터가 Parameter Server에 업로드되기 전에 실행됨* delete and dump 명령은 선언된 순서로 실행
- "Load" 명령은 추가 명령어로 간주하며 파라미터의 dictionary 또는 namespace를 선언하면 namespace에 선언된 다른 파라미터에 추가됨.
2.1 Attributes
command | "load" OR "dump" OR "delete" (optional, default=load) |
file | "$(find pkg-name(패키지명))/path(경로)/foo.yaml(예시파일)" (load or dump ) |
rosparam 파일의 이름 | |
param | "param-name" |
파라미터의 이름 | |
ns | "namespace" |
범위 안을 namespace로 지정 | |
subst_value | true OR false (optional) |
YAML text에서 argv를 대체 사용할지 여부 |
reference site :
http://wiki.ros.org/roslaunch/XML/param
roslaunch/XML/param - ROS Wiki
tag The tag defines a parameter to be set on the Parameter Server. Instead of value, you can specify a textfile, binfile or command attribute to set the value of a parameter. The tag can be put inside of a tag, in which case the parameter is treated like a
wiki.ros.org
rosparam - ROS Wiki
kinetic melodic noetic Show EOL distros: EOL distros: electric fuerte groovy hydro indigo jade lunar diamondback: Only showing information from the released package extracted on Unknown. No API documentation available. Please see this page for in
wiki.ros.org
http://wiki.ros.org/roslaunch/XML/rosparam
roslaunch/XML/rosparam - ROS Wiki
tag The tag enables the use of rosparam YAML files for loading and dumping parameters from the ROS Parameter Server. It can also be used to remove parameters. The tag can be put inside of a tag, in which case the parameter is treated like a private name. T
wiki.ros.org
'프로그래밍 - 개발 > ROS' 카테고리의 다른 글
[ROS] Full_Coverage_Path_Planner 컴파일 및 사용 (0) | 2022.01.12 |
---|---|
[actionlib] Fail: RECALLED: This goal was canceled because another goal was recieved by the simple action server. (0) | 2021.11.24 |
[ROS] catkin_ws 구조에 관하여 (0) | 2021.09.16 |
[Error] Github & Source Tree Push Error | Git Token Error (0) | 2021.09.02 |
[ERROR] couldn't register subscriber on topic [/"topic_name"] (0) | 2021.08.12 |