Summary | ROS2 III |
DDS, QoS๋ž€?

Table of Contents

[ ROS2 ] ROS ๊ธฐ์ดˆ III (DDS์™€ QoS)

์ด์ „ ํฌ์ŠคํŠธ์˜ ๋‚ด์šฉ์—์„œ๋Š” Topic๊ณผ Service, ๊ทธ๋ฆฌ๊ณ  Action์— ๋Œ€ํ•ด ๋‹ค๋ฃจ์—ˆ๋‹ค. Node ๊ฐ„ ํ†ต์‹  ๋ฐฉ๋ฒ•์ด ๊ถ๊ธˆํ•˜๋‹ค๋ฉด ํ•ด๋‹น ํฌ์ŠคํŠธ๋ฅผ ๋ฐฉ๋ฌธํ•˜๊ธฐ ๋ฐ”๋ž€๋‹ค. ๋ณธ ํฌ์ŠคํŠธ์—์„œ๋Š” ๋ฉ”์‹œ์ง€ ํ†ต์‹  ๋ฐฉ์‹ DDS์™€ QoS์— ๋Œ€ํ•ด ์•Œ์•„๋ณด์ž.

DDS Data Distribution Service

DDS๋ž€?

ROS2๋Š” ์‚ฐ์—…์šฉ ์‹œ์žฅ์„ ์œ„ํ•ด ํ‘œ์ค€ ๋ฐฉ์‹ ์‚ฌ์šฉ์„ ์ค‘์š”ํ•˜๊ฒŒ ์—ฌ๊ธด๋‹ค. ๊ทธ๋ ‡๊ธฐ ๋•Œ๋ฌธ์— ROS2๋Š” ROS1๊ณผ ๋น„์Šทํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ๋ณด๋‹ค๋Š” ์‚ฐ์—…์šฉ ํ‘œ์ค€์„ ๋งŒ๋“ค๊ณ  ์ƒํƒœ๊ณ„๋ฅผ ๊พธ๋ ค๊ฐ€๊ณ  ์žˆ์—ˆ๋˜ DDS๋ฅผ ํ†ต์‹  ๋ฏธ๋“ค์›จ์–ด๋กœ์„œ ์‚ฌ์šฉํ•œ๋‹ค.

DCPS model entities in the DDS Domain

DDS์˜ ํŠน์ง•

  • ์‚ฐ์—… ํ‘œ์ค€
    • ๋น„์˜๋ฆฌ๋‹จ์ฒด OMG๊ฐ€ ๋ถ„์‚ฐ๊ฐ์ฒด์— ๋Œ€ํ•œ ๊ธฐ์ˆ  ํ‘œ์ค€์„ ์ •ํ•˜๊ณ ์ž ๋งŒ๋“  ๋ฏธ๋“ค์›จ์–ด
    • ์‚ฐ์—… ํ‘œ์ค€์œผ๋กœ ์ž๋ฆฌ์žก์Œ
  • ์šด์˜์ฒด์ œ ๋…๋ฆฝ
    • DDS๋Š” Window, Linux, MacOS, Android ๋“ฑ ๋‹ค์–‘ํ•œ OS ์ง€์›ํ•จ
  • ์–ธ์–ด ๋…๋ฆฝ
    • DDS๋Š” ๋ฏธ๋“ค์›จ์–ด๋กœ, ๊ทธ ์ƒ์œ„ ๋ ˆ๋ฒจ์ธ ์‚ฌ์šฉ์ž ์ฝ”๋“œ ๋ ˆ๋ฒจ์—์„œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด๋ฅผ ๋ฐ”๊พธ์ง€ ์•Š์•„๋„ ๋จ
    • ROS2์—์„œ๋„ RMW ROS Middle Ware๋กœ ๋””์ž์ธ๋˜์–ด ๋‹ค์–‘ํ•œ ์–ธ์–ด ์ง€์›
  • UDP ๊ธฐ๋ฐ˜ ์ „์†ก ๋ฐฉ์‹
    • ์—ฌ๋Ÿฌ ๋ชฉ์ ์ง€๋กœ ๋™์‹œ์— ๋ณด๋‚ผ ์ˆ˜ ์žˆ์Œ โžก๏ธ ๋น ๋ฅธ ์ „์†ก ์†๋„
    • TCP ๋ฐฉ์‹์— ๋น„ํ•ด ์‹ ๋ขฐ์„ฑ์ด ๋–จ์–ด์ง€์ง€๋งŒ QoS๋ฅผ ๋„์ž…ํ•˜์—ฌ ์–ด๋Š ์ •๋„ ํ•ด๊ฒฐํ•จ
  • ๋ฐ์ดํ„ฐ ์ค‘์‹ฌ์ 
    • DDS ์‚ฌ์–‘ ์ค‘ DCPS Data-Centric Publish-Subscribe๋Š” ์ ์ ˆํ•œ ์ˆ˜์‹ ์ž์—๊ฒŒ ์ ์ ˆํ•œ ์ •๋ณด๋ฅผ ํšจ์œจ์ ์œผ๋กœ ์ „๋‹ฌํ•˜๋Š” ๊ฒƒ์„ ๋ชฉํ‘œ๋กœ ํ•˜๋Š” publish ๋ฐ subscribe ๋ฐฉ์‹์ด๋‹ค.
  • ๋™์  ๊ฒ€์ƒ‰
    • ์–ด๋–ค Topic์ด ์–ด๋–ค ๋„๋ฉ”์ธ ์˜์—ญ์— ์žˆ๊ณ , ์–ด๋–ค Node๊ฐ€ ์ด๋ฅผ ๋ฐœ์‹ /์ˆ˜์‹ ํ•˜๋Š”์ง€ ์•Œ ์ˆ˜ ์žˆ์Œ
    • ROS1์˜ Node ์ด๋ฆ„ ์ง€์ • ๋ฐ ๋“ฑ๋ก, Node ๊ฐ„ ๋ฉ”์‹œ์ง€ ์—ฐ๊ฒฐ ์ง€์›ํ•˜๋˜ ROS Master ์‚ฌ์šฉํ•˜์ง€ ์•Š์•„๋„ ๋จ
    • ๋งŽ์€ Node๋“ค์ด participant๋กœ ์ทจ๊ธ‰๋˜์–ด ๋™์  ๊ฒ€์ƒ‰์„ ํ†ตํ•ด ์—ฐ๊ฒฐ๋จ

Summary

ROS2๋Š” ์‹ค์‹œ๊ฐ„ ๋ฐ์ดํ„ฐ ์ „์†ก์„ ๋ณด์žฅํ•˜๊ณ , DDS์˜ ์‚ฌ์šฉ์œผ๋กœ Node ๊ฐ„์˜ ๋™์  ๊ฒ€์ƒ‰ ๊ธฐ๋Šฅ์„ ์ง€์›ํ•˜๊ณ  ์žˆ์–ด์„œ ๊ธฐ์กด ROS1์—์„œ ๊ฐ Node๋“ค์˜ ์ •๋ณด๋ฅผ ๊ด€๋ฆฌํ•˜์˜€๋˜ ROS Master ์—†์ด๋„ ์—ฌ๋Ÿฌ DDS ํ”„๋กœ๊ทธ๋žจ ๊ฐ„์— ํ†ต์‹ ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.

โžก๏ธ DDS๋ฅผ ์‚ฌ์šฉํ•จ์œผ๋กœ์จ
publish, subscribeํ˜• ๋ฉ”์‹œ์ง€ ์ „๋‹ฌ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.
์‹ค์‹œ๊ฐ„ ๋ฐ์ดํ„ฐ ์ „์†ก, ๋ถˆ์•ˆ์ •ํ•œ ๋„คํŠธ์›Œํฌ์— ๋Œ€์‘ํ•˜๊ณ  ๋ณด์•ˆ์„ ๊ฐ•ํ™”ํ•  ์ˆ˜ ์žˆ๋‹ค.


QoS Quality of Service

QoS๋ž€?

QoS๋ž€ DDS์˜ ์„œ๋น„์Šค ํ’ˆ์งˆ๋กœ, ๋ฐ์ดํ„ฐ ํ†ต์‹ ์˜ ์˜ต์…˜์ด๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ๋‹ค.

ROS2์—์„œ๋Š” TCP์ฒ˜๋Ÿผ ์‹ ๋ขฐ์„ฑ์„ ์ค‘์‹œ ์—ฌ๊ธฐ๋Š” ํ†ต์‹  ๋ฐฉ์‹๊ณผ UDP์ฒ˜๋Ÿผ ํ†ต์‹  ์†๋„์— focus๋ฅผ ๋งž์ถค ํ†ต์‹  ๋ฐฉ์‹์„ ์„ ํƒ์ ์œผ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

์ด๋ฅผ ์œ„ํ•ด DDS์˜ QoS๋ฅผ ๋„์ž…ํ•˜์—ฌ Publisher/Subscriber ๋“ฑ์„ ์„ ์–ธํ•  ๋•Œ QoS๋ฅผ ๋งค๊ฐœ๋ณ€์ˆ˜ ํ˜•ํƒœ๋กœ ์ง€์ •ํ•  ์ˆ˜ ์žˆ์–ด์„œ ์›ํ•˜๋Š” ๋ฐ์ดํ„ฐ ํ†ต์‹ ์˜ ์˜ต์…˜ ์„ค์ •์„ ์œ ์ €๊ฐ€ ์ง์ ‘ํ•  ์ˆ˜ ์žˆ๋‹ค.

QoS์˜ ์ข…๋ฅ˜

  • Reliability
    • RELIABLE : TCP์ฒ˜๋Ÿผ ๋ฐ์ดํ„ฐ ์†์‹ค ๋ฐฉ์ง€ํ•˜๊ณ  ์‹ ๋ขฐ๋„ ์šฐ์„ 
    • BEST_EFFORT : UDP์ฒ˜๋Ÿผ ํ†ต์‹  ์†๋„๋ฅผ ์ตœ์šฐ์„ ์‹œ
  • History
    • ํ†ต์‹  ์ƒํƒœ์— ๋”ฐ๋ผ ์ •ํ•ด์ง„ ์‚ฌ์ด์ฆˆ๋งŒํผ์˜ ๋ฐ์ดํ„ฐ ๋ณด๊ด€
    • KEEP_LAST : ์ •ํ•ด์ง„ ๋ฉ”์‹œ์ง€ ํ ์‚ฌ์ด์ฆˆ ๋งŒํผ์˜ ๋ฐ์ดํ„ฐ ๋ณด๊ด€ (depth : ๋ฉ”์‹œ์ง€ ํ ์‚ฌ์ด์ฆˆ)
    • KEEP_ALL : ๋ชจ๋“  ๋ฐ์ดํ„ฐ๋ฅผ ๋ณด๊ด€ (๋ฉ”์‹œ์ง€ ํ์˜ ์‚ฌ์ด์ฆˆ๋Š” DDS ๋ฒค๋”๋งˆ๋‹ค ๋‹ค๋ฆ„)
  • Durability
    • ๋ฐ์ดํ„ฐ ์ˆ˜์‹ ํ•˜๋Š” Subscriber๊ฐ€ ์ƒ์„ฑ๋˜๊ธฐ ์ „์˜ ๋ฐ์ดํ„ฐ๋ฅผ ํ๊ธฐํ• ์ง€์— ๋Œ€ํ•œ ์„ค์ •
    • TRANSIENT_LOCAL : Subscription์ด ์ƒ์„ฑ๋˜๊ธฐ ์ „์˜ ๋ฐ์ดํ„ฐ๋„ ๋ณด๊ด€ (Publisher์—๋งŒ ์ ์šฉ ๊ฐ€๋Šฅ)
    • VOLATILE : Subscription์ด ์ƒ์„ฑ๋˜๊ธฐ ์ „์˜ ๋ฐ์ดํ„ฐ๋Š” ๋ฌดํšจ
  • Deadline
    • ์ •ํ•ด์ง„ ์ฃผ๊ธฐ ์•ˆ์— ๋ฐ์ดํ„ฐ๊ฐ€ ๋ฐœ์‹  ๋ฐ ์ˆ˜์‹ ๋˜์ง€ ์•Š์„ ๊ฒฝ์šฐ ์ด๋ฒคํŠธ ํ•จ์ˆ˜๋ฅผ ์‹คํ–‰
    • deadline_duration : Deadline์„ ํ™•์ธํ•˜๋Š” ์ฃผ๊ธฐ
  • Lifespan
    • ์ •ํ•ด์ง„ ์ฃผ๊ธฐ ์•ˆ์—์„œ ์ˆ˜์‹ ๋˜๋Š” ๋ฐ์ดํ„ฐ๋งŒ ์œ ํšจ ํŒ์ •
    • ๊ทธ๋ ‡์ง€ ์•Š์€ ๋ฐ์ดํ„ฐ๋Š” ์‚ญ์ œ
    • lifespan_duration : Lifespan์„ ํ™•์ธํ•˜๋Š” ์ฃผ๊ธฐ
  • Liveliness
    • ์ •ํ•ด์ง„ ์ฃผ๊ธฐ ์•ˆ์—์„œ Node, Topic ์ƒ์‚ฌ ํ™•์ธ
    • liveliness : ์ž๋™/๋งค๋‰ด์–ผ๋กœ ํ™•์ธํ• ์ง€๋ฅผ ์ง€์ •ํ•˜๋Š” ์˜ต์…˜
      • AUTOMATIC / MANUAL_BY_NODE, MANUAL_BY_TOPIC
    • lease_duration : Liveliness๋ฅผ ํ™•์ธํ•˜๋Š” ์ฃผ๊ธฐ


Next Post..

ํ”„๋กœ์ ํŠธ๊ฐ€ ๋งˆ๋ฌด๋ฆฌ ๋˜๋ฉด ๊ฐ„๋‹จํ•œ ์‹ค์Šต ๋‚ด์šฉ๋„ ํ•จ๊ป˜ ์ •๋ฆฌํ•ด์„œ ์—…๋กœ๋“œํ•  ์˜ˆ์ •์ด๋‹ค.

 

Related Posts



๐Ÿ’™ You need to log in to GitHub to write comments. ๐Ÿ’™
If you can't see comments, please refresh page(F5).