Skip to main content

๐Ÿ”— System Integration

How does all your code, hardware, and ROS2 nodes actually work together?
This page shows how your custom logic, third-party packages, and real hardware connect in a single ROS2 ecosystem.


๐Ÿงฉ How Your Code Fits into ROS2โ€‹

Your project is a classic ROS2 modular system:

  • Each function (detection, navigation, manipulation, state management) is a separate node.
  • Nodes interact via topics, services, and actions.
  • The mission manager node acts as the โ€œbrain,โ€ coordinating everything and handling real-time events.
Tip

โ€œThink of every major box in your system as a separate node. Each node is replaceable, debuggable, and testable on its own.โ€


๐Ÿ—บ๏ธ System Integration Diagramโ€‹


๐Ÿ”„ Communication Patternsโ€‹

PatternExample in Your Project
Topic/target_pose from Detector โ†’ Mission Manager
ActionNavigation goals via nav2_msgs/action/NavigateToPose
Service(Optional) Reset, trigger, parameter tuning
ParameterLaunch configs, runtime tuning (e.g., thresholds, IP addresses)
TF FramesCamera, base_link, map, arm, all dynamically linked

Typical Flow:

  1. Robot explores via Navigation Node
  2. Object Detector publishes /target_pose on detection
  3. Mission Manager interrupts navigation, coordinates approach, triggers pick/drop nodes
  4. Pick/Drop Node interacts with MyCobot, Mission resumes or returns
  5. All state and pose info flows through topics or actions

โšก๏ธ System Coordination Exampleโ€‹

  1. Launch all nodes with full_system.launch.py
  2. Robot starts exploring waypoints
  3. Object is detected: /target_pose published
  4. Mission Manager:
    • Pauses exploration
    • Sends goal to Navigation Node
    • On arrival: triggers Pick Node
    • Waits for success/failure
    • Sends โ€œreturn to baseโ€ goal
    • Triggers Drop Node
    • Resumes or finishes

๐Ÿ•ธ๏ธ How Each Node Communicatesโ€‹

NodePublishesSubscribes toActions/Services
Object Detector/target_poseCamera, Depth topicsโ€”
Mission ManagerNavigation goal, /cmd_vel/target_pose, feedbackTriggers pick/drop
Navigation NodeRobot movementGoal posesNavigateToPose action
Pick/Drop NodeArm/gripper commandsTrigger from Missionโ€”
Pose SetterInitial pose to Nav NodeManual or launchโ€”

๐Ÿ‘จโ€๐Ÿ’ป System Integration Best Practicesโ€‹

  • Use launch files to manage startup dependencies and correct launch order (see full_system.launch.py)
  • Keep all custom code in your external workspace
  • Use actions for long-running tasks (navigation, arm movement), topics for rapid data/events
  • Always test each node individually before full system bring-up
  • Use RQT Graph and RViz to debug connections and visualize state

๐Ÿšฆ Next Stepsโ€‹