How viamrobotics/rdk works
Main Components
• Robot Server/Core: At the heart of the system, you have the server application (seen in directories such as “app”, “web/cmd/server”, and the “robot” package) that coordinates robot operations.
• Components/Drivers: The “components” directory contains numerous modules for hardware devices (e.g., arm, camera, board, motor, sensor, etc.) – these serve as the hardware abstraction layer. They register as resources and handle interactions with physical devices.
• Services Layer: The “services” directory (with subfolders like “motion”, “navigation”, “vision”, “datamanager”, “discovery”, and others) provides domain-specific functionalities. This layer abstracts control loops, planning, communication with sensors, and robot-specific tasks.
• Communication Infrastructure: The “grpc” package and other networking code facilitate communication. They provide APIs (using Protocol Buffers/gRPC) for clients and external SDKs – these are your service interfaces.
• Client SDKs and CLI: Separate directories “cli” and “robot/client” indicate the presence of client-side interfaces. They allow external applications (in Go, Python, Typescript, C++, Rust) to interact with the robot through APIs.
• Configuration and Logging: The “config” and “logging” layers manage robot configuration data, dynamic reconfiguration, and logging. They are cross-cutting concerns present in many subsystems.
• Cloud and Integration: The “cloud” folder represents cloud connectivity and integration capabilities. This, along with the API documentation and SDK references, bridges the local robot operating system with remote interfaces.
Relationships and Interactions
– The Component Modules (hardware drivers and abstraction, e.g., camera, arm, motor)
– Various Service Modules (motion planning, navigation, vision, data management, etc.)
– The Configuration and Logging Frameworks (for dynamic resource setup and debugging).
• The Communication Layer (gRPC and APIs) forms external interfaces:
– Client SDKs (Go, Python, etc.) and CLI applications send requests to the server.
– These client interactions pass through the gRPC layer.
Architectural Patterns to Highlight
• Modularity: Emphasize how each hardware component or service (organized as separate directories) is developed as an independent module. Show a “registry” concept used by the resource manager (found in “components/register”, “services/register”).
• Abstraction & Plugins: The system appears to use plugin-like design patterns for the various components, enabling easy extensibility and replacement.
• Client–Server / API Gateway: Illustrate that client requests (via CLI or SDKs) are handled by the server that dispatches commands to lower-level modules.
• Layered Architecture: Separate the system into layers – UI/Client, API/Communication, Core/Resource Manager, Services, and Hardware Abstractions.
Key Technologies and Frameworks
• Languages & Tools: The project is primarily in Go (as indicated by the .go files, go.mod, and test files). It includes Makefiles and CI configurations (.github/workflows, etc.).
• APIs: gRPC is used (the grpc directory) so include a block for “API Interface (gRPC/Protobuf)” that communicates with external clients.
• Cloud Integration: Mark the cloud module and related configurations (e.g., “cloud/cloud.go”) that facilitate remote control and monitoring via the cloud.
• SDKs & Extensibility: Mention that there are Go, Python, Typescript, C++, and Rust SDKs which connect to the server API.