How miroboticslab/cyberdog_ros2 works
Main Components
a. ROS 2 runtime environment: Mark the ROS 2 framework (Galactic) and underlying Cyclone DDS, which underpin all communications.
b. CyberDog Bringup: Contains launch files, parameters, and initial node configuration used for bootstrapping the robot.
c. Perception (“cyberdog_ception”): Comprised of packages such as bms (battery/system monitoring), body state, lightsensor, obstacle detection, and scene detection.
d. Common Utilities (“cyberdog_common”): Provides GRPC communication components, utilities (e.g., CAN bus interfaces and lifecycle handling), and third-party vendor packages.
e. Decision-making (“cyberdog_decision”): Implements the robot’s decision maker, including modules for automation, ception integration, and motion management with parameter-driven orders.
f. Interaction (“cyberdog_interaction”): Includes multiple submodules:
• Audio (with further division into audio assistant, audio base, and audio interaction)
• Camera (handling image capture, processing, and service nodes)
• LED, Livestream, Touch, and Wireless modules (which, for example, include the bluetooth and wifi signal processing and sensor interfaces).
g. Interfaces (“cyberdog_interfaces”): Hosts all the ROS message, service, action, and LCM definitions that standardize the communication between these components (perception, decision, interaction, etc.).
Relationships & Data Flows
• The Bringup package initializes the entire ROS ecosystem and launches nodes from the perception, decision, and interaction modules.
• The Decision-making module interacts bi-directionally with the Perception modules to receive sensor data (e.g., battery state, obstacles, body state) and with the Interaction modules to send feedback or control commands.
• The Common Utilities assist in cross-module communication (e.g., via GRPC services and utility functions) as well as shared data processing.
• The Interfaces layer acts as the contract – showing how nodes publish/subscribe messages and call services across the architecture.
• External communications: the ROS 2 network (using Cyclone DDS) as the backbone for inter-node communication and any external devices (e.g., the robot’s hardware, network interfaces).
Architectural Patterns & Design Principles
• A modular, component-based architecture where each major functional area is developed and maintained as a separate ROS package.
• Use of declarative launch files and parameter files (YAML and TOML) to configure behavior at runtime.
• Separation of concerns: bringup for initialization, ception for sensing, decision for autonomous control, and interaction for user and external interface functionalities.
• Employing vendor-specific submodules (as seen in the “*_vendor” directories) to integrate third-party libraries and hardware drivers.
• Distributed communication between nodes using standardized ROS interfaces (topics, services, actions) based on the definitions in the cyberdog_interfaces.
Relevant Technologies & Frameworks
• ROS 2 Galactic, Cyclone DDS, and external dependencies such as GRPC, vendor drivers (e.g., for audio, camera, CAN bus interfaces), and Docker for deployment.
• That parts of the system are tailored for Jetson hardware and Ubuntu 18.04 adaptations provided by custom forks (as seen in the mini.repos file).