๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

ROS

[ROS2] DDS์™€ RMW ๊ฐœ๋… ๋ฐ QoS ํ˜ธํ™˜์„ฑ ํ™•์ธ

๐Ÿ’ก ์ด ๊ธ€์€ ROS2์—์„œ ๋…ธ๋“œ๊ฐ„์˜ ํ†ต์‹ ์˜ ๋ณ€๊ฒฝ์  ๋ฐ DDS๊ด€๋ จ ์šฉ์–ด ๋ฐ QoS ์„ค์ •์— ๊ด€ํ•œ ๋‚ด์šฉ์ด ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

 

ROS2๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ DDS Middleware๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค. ๋‹ค์–‘ํ•œ DDS ํ˜น์€ RTPS ๊ฐ€ ํ˜ธํ™˜๋˜๋Š”๋ฐ ์ž‘์„ฑ์ผ ๊ธฐ์ค€ ํ˜ธํ™˜๋˜๋Š” ๋ฒค๋”๋Š” ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

  • eProsima’s Fast DDS → Humble์ด ๊ธฐ๋ณธ์ ์œผ๋กœ ์‚ฌ์šฉํ•˜๋Š” DDS Middleware
  • RTI’s Connext DDS
  • Eclipse Cyclone DDS
  • GurumNetworks GurumDDS

ROS2๋Š” ๋‹ค๋ฅธ DDS์™€๋„ ํ†ต์‹ ์ด ๊ฐ€๋Šฅํ•˜๋‹ค. ๊ทธ ์ด์œ ๋Š” RMW(Robot MiddleWare)๊ฐ€ RCL(Robot Client Library)์™€์˜ ํ†ต์‹ ์„ ์œ„ํ•ด DDS ๊ตฌํ˜„์— ๋Œ€ํ•œ ์ถ”์ƒํ™” ๊ณ„์ธต์„ ์ œ๊ณตํ•˜๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. (DDS๊ฐ€ ๋„์ž…๋˜๋ฉด์„œ ROS1๊ณผ ๊ฐ€์žฅ ํฌ๊ฒŒ ์ฒด๊ฐ๋˜๋Š” ์ฐจ์ด๋Š” QoS ๋ผ๊ณ  ์ƒ๊ฐํ•œ๋‹ค.)

QoS

ROS2๋Š” ๋…ธ๋“œ๊ฐ„์˜ ํ†ต์‹ ์„ ์กฐ์ •ํ•  ์ˆ˜ ์žˆ๋Š” QoS ์ •์ฑ…์„ ์ œ๊ณตํ•˜์—ฌ, ์•ˆ์ •์„ฑ์ธ TCP, best-effort UDP๋“ฑ ๊ทธ ์‚ฌ์ด์˜ ๋ฌด์—‡์ด๋“  ์œ ์—ฐํ•˜๊ฒŒ ์ƒํ™ฉ์— ๋งž๋Š” ํ†ต์‹  ์ •์ฑ…์„ ์ •ํ•  ์ˆ˜ ์žˆ๋‹ค. ๊ธฐ๋ณธ์ ์œผ๋กœ ์•„๋ž˜์™€ ๊ฐ™์€ ์„ค์ •์„ ์ง€์›ํ•œ๋‹ค.

  • History
    • Keep last: N๊ฐœ์˜ ์ƒ˜ํ”Œ๋งŒ์„ ์ €์žฅ (N(Depth)์€ ์„ค์ • ๊ฐ€๋Šฅ)
    • Keep all: middleware์— ์ง€์ •๋œ ๋ฆฌ์†Œ์Šค ์ œํ•œ ๋งŒํผ ์ €์žฅ
  • Depth
    • Keep last ์ •์ฑ…์ผ ๋•Œ Depth ์ง€์ •
  • Reliability
    • Best effort: ์ƒ˜ํ”Œ์„ ๋ณด๋‚ด๋ ค๊ณ  ์‹œ๋„๋Š” ํ•˜๋‚˜ ๋ถˆ์•ˆ์ •ํ•œ ๋„คํŠธ์›Œํฌ ์ƒ์—์„œ ์œ ์‹ค์ด ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ์Œ
    • Reliable: ์ƒ˜ํ”Œ์˜ ์ „์†ก์„ ๋ณด์žฅํ•จ, ๋‹จ ์—ฌ๋Ÿฌ๋ฒˆ ์‹œ๋„ ํ•  ์ˆ˜ ์žˆ์Œ
  • Durability
    • Transient local: ์ƒ˜ํ”Œ์„ ์ˆ˜์‹ ๋ฐ›์€ subscriber๊ฐ€ ์ƒ์„ฑ๋˜๊ธฐ ์ „ ๋ฐ์ดํ„ฐ๋ฅผ ์œ ์ง€ํ•˜๋ ค ํ•จ
    • Volatile: ์ƒ˜ํ”Œ์„ ์œ ์ง€ํ•˜๋ ค ํ•˜์ง€ ์•Š์Œ
  • Deadline
    • Duration: Topic์—์„œ ์ „์†ก๋˜๋Š” ๋ฉ”์‹œ์ง€์™€ ํ›„์† ๋ฉ”์‹œ์ง€ ์‚ฌ์ด์˜ ์ตœ๋Œ€ ๊ธฐ๊ฐ„
  • Lifespan
    • Duration: ๋ฉ”์‹œ์ง€์˜ ์ตœ๋Œ€ ์ˆ˜๋ช…, ์ตœ๋Œ€ ์ˆ˜๋ช…์ด ๋๋‚œ ๋ฉ”์‹œ์ง€๋Š” ์‚ญ์ œ๋จ
  • Liveliness
    • Automatic: publisher๊ฐ€ ๋ฉ”์‹œ์ง€๋ฅผ ์ „์†กํ• ๋•Œ lease duration ๊ธฐ๊ฐ„๋™์•ˆ ํ™œ์„ฑ ์ƒํƒœ์ธ ๊ฒƒ์œผ๋กœ ๊ฐ„์ฃผ
    • Manual by topic: publisher๊ฐ€ ์‚ด์•„ ์žˆ๋‹ค๊ณ  ์ˆ˜๋™์œผ๋กœ ๊ฐ„์ฃผํ•˜๋Š” ๊ฒฝ์šฐ lease duration ๋™์•ˆ ํ™œ์„ฑ ์ƒํƒœ๋กœ ๊ฐ„์ฃผ
  • Lease duration
    • ๊ฒŒ์‹œ์ž๊ฐ€ ํ™œ์„ฑ์ƒํƒœ์ž„์„ ๋‚˜ํƒ€๋‚ด๋Š” ์ตœ๋Œ€ ๊ธฐ๊ฐ„

Compatibility

ROS์—์„œ ํ†ต์‹ ์ด ๋˜์ง€ ์•Š๋Š”๋‹ค๋ฉด QoS ์„ค์ •์— ๋”ฐ๋ผ ํ˜ธํ™˜์„ฑ ์—ฌ๋ถ€๋ฅผ ํ™•์ธํ•ด๋ณผ ํ•„์š”๊ฐ€ ์žˆ๋‹ค.

https://docs.ros.org/en/humble/Concepts/Intermediate/About-Quality-of-Service-Settings.html

 

Quality of Service settings — ROS 2 Documentation: Humble documentation

You're reading the documentation for an older, but still supported, version of ROS 2. For information on the latest version, please have a look at Iron. Quality of Service settings ROS 2 offers a rich variety of Quality of Service (QoS) policies that allow

docs.ros.org

QoS Profile

  • RMW์—์„œ QoS ์„ค์ •์„ ์‰ฝ๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ๊ฐ€์žฅ ๋งŽ์ด ์‚ฌ์šฉํ•˜๋Š” QoS ์„ค์ •์„ ์„ธํŠธ๋กœ ํ‘œํ˜„ํ•ด๋‘”๋‹ค.
  • ๋ชฉ์ ์— ๋”ฐ๋ผ Default, Sensor Data, Service, Action Status, Parameters, Parameter Events์™€ ๊ฐ™์ด 6๊ฐ€์ง€๋กœ ๊ตฌ๋ถ„ํ•˜๋ฉฐ Reliability, History, Depth(History Depth), Durability ๋ฅผ ์„ค์ •ํ•œ๋‹ค.
Default Sensor Data Service Action Status Parameters Parameters Events
Reliability RELIABLE BEST_EFFORT RELIABLE RELIABLE RELIABLE RELIABLE
History KEEP_LAST KEEP_LAST KEEP_LAST KEEP_LAST KEEP_LAST KEEP_LAST
Depth 10 5 10 1 1,000 1,000
Durability VOLATILE VOLATILE VOLATILE TRANSIENT LOCAL VOLATILE VOLATILE

์ฝ”๋“œ๋Š” ์•„๋ž˜ Github ์ฃผ์†Œ์—์„œ ํ™•์ธ ๊ฐ€๋Šฅํ•˜๋‹ค.

https://github.com/ros2/rmw/blob/humble/rmw/include/rmw/qos_profiles.h#L25

์ฐธ๊ณ  ์‚ฌ์ดํŠธ

DDS implementations — ROS 2 Documentation: Humble documentation

 

DDS implementations — ROS 2 Documentation: Humble documentation

You're reading the documentation for an older, but still supported, version of ROS 2. For information on the latest version, please have a look at Iron. DDS implementations By default, ROS 2 uses DDS as its middleware. It is compatible with multiple DDS or

docs.ros.org

About internal ROS 2 interfaces — ROS 2 Documentation: Humble documentation

 

About-Internal-Interfaces — ROS 2 Documentation: Humble documentation

» About-Internal-Interfaces © Copyright 2023, Open Robotics. Built with Sphinx using a theme provided by Read the Docs.

docs.ros.org

About Quality of Service settings — ROS 2 Documentation: Humble documentation

 

About-Quality-of-Service-Settings — ROS 2 Documentation: Humble documentation

» About-Quality-of-Service-Settings © Copyright 2023, Open Robotics. Built with Sphinx using a theme provided by Read the Docs.

docs.ros.org