|
토픽 (topic)
|
서비스 (service)
|
액션 (action)
|
연속성
|
연속성
|
일회성
|
복합 (토픽+서비스)
|
방향성
|
단방향
|
양방향
|
양방향
|
동기성
|
비동기
|
동기
|
동기 + 비동기
|
다자간 연결
|
1:1, 1:N, N:1, N:N
(publisher:subscriber)
|
1:1
(server:client)
|
1:1
(server:client)
|
노드 역할
|
발행자 (publisher)
구독자 (subscriber)
|
서버 (server)
클라언트 (client)
|
서버 (server)
클라언트 (client)
|
동작 트리거
|
발행자
|
클라언트
|
클라언트
|
인터페이스
|
msg 인터페이스
|
srv 인터페이스
|
action 인터페이스
|
CLI 명령어
|
ros2 topic
ros2 interface
|
ros2 service
ros2 interface
|
ros2 action
ros2 interface
|
사용 예
|
센서 데이터, 로봇 상태,
로봇 좌표, 로봇 속도 명령 등
|
LED 제어, 모터 토크 On/Off,
IK/FK 계산, 이동 경로 계산 등
|
목적지로 이동,
물건 파지, 복합 태스크 등
|
|
msg 인터페이스
|
srv 인터페이스
|
action 인터페이스
|
확장자
|
*.msg
|
*.srv
|
*.action
|
데이터
|
토픽 데이터 (data)
|
서비스 요청 (request)
---
서비스 응답 (response)
|
액션 목표 (goal)
---
액션 결과 (result)
---
액션 피드백 (feedback)
|
형식
|
fieldtype1 fieldname1
fieldtype2 fieldname2
fieldtype3 fieldname3
|
fieldtype1 fieldname1
fieldtype2 fieldname2
---
fieldtype3 fieldname3
fieldtype4 fieldname4
|
fieldtype1 fieldname1
fieldtype2 fieldname2
---
fieldtype3 fieldname3
fieldtype4 fieldname4
---
fieldtype5 fieldname5
fieldtype6 fieldname6
|
사용 예
|
[geometry_msgs/msg/Twist]
|
[turtlesim/srv/Spawn.srv]
|
[turtlesim/action/RotateAbsolute.action]
|
Vector3 linear
Vector3 angular
|
float32 x
float32 y
float32 theta
string name
---
string name
|
float32 theta
---
float32 delta
---
float32 remaining
|
인터페이스에 ---은 구분하기위한 문자로 사용한다.
'ROS' 카테고리의 다른 글
Ros2 to Unity(TCP) (0) | 2022.07.06 |
---|---|
Ros2 to Unity(rclcs) (0) | 2022.07.04 |
[ROS2] 인터페이스 (0) | 2022.06.20 |
[ROS2] 패키지 구성요소 세부사항 (0) | 2022.06.19 |
[ROS2] 사용자 작업 폴더 구성 요소 (0) | 2022.06.19 |