Skip to main content

Chapter 3: Communication Basics (Topics, Services, Actions)

Template

This is a template file. Fill in content from specs/001-physical-ai-book-specs/spec.md lines 357-452. Use Chapter 1 (01-introduction.mdx) as a formatting reference.

Chapter Purpose & Audience​

TODO: Add content from spec.md lines 359-360


Learning Objectives​

TODO: Add 3-6 learning objectives from spec.md lines 362-367


Prerequisites​

  • Completed Chapters 1-2
  • ROS 2 Humble installed and working
  • Basic understanding of nodes and topics

Key Concepts​

TODO: Add content from spec.md lines 369-379:

  • Topics in depth
  • Services in depth
  • Actions in depth
  • QoS policies (reliability, durability, history)
  • Message types and interfaces
  • Creating custom messages

Topics (Publish-Subscribe)​

TODO: Add detailed topics section from spec.md

Creating a Publisher​

# TODO: Add Python publisher example

Creating a Subscriber​

# TODO: Add Python subscriber example

Services (Request-Response)​

TODO: Add services section from spec.md


Actions (Long-Running Tasks)​

TODO: Add actions section from spec.md


Diagrams / Architecture Notes​

TODO: Add Mermaid.js diagrams from spec.md lines 401-405:

  • Topic Communication Flow
  • Service Call Sequence
  • Action Lifecycle Diagram

Practice Tasks​

TODO: Add practice tasks from spec.md lines 407-412


Summary​

TODO: Add summary points from spec.md lines 414-422


References​

TODO: Add references from spec.md lines 424-452


Next: Chapter 4: URDF for Humanoid Robots →