How ankur6889/hlcs_v2 works
1. This is a ROS 2 Jazzy monorepo for a multi-robot industrial control system. The workspace is split into several ROS packages under src/, with clear separation between shared contracts, orchestration, vendor-specific robot support, scene management, forecasting, and GUI tools.
2. The architectural center is the fleet-manager/brand-launcher split. hlcs_fleet_manager owns robot registration, identity assignment, lifecycle state, and fleet services. It does not contain vendor-specific logic; instead it delegates robot startup and vendor wiring to brand packages through a common launcher abstraction in hlcs_common.
3. Vendor support is packaged per brand. hlcs_brand_ur and hlcs_brand_kinova each bundle both the brand launcher and the brand adapter/refiner side. These packages are where driver-specific concerns live: URSim Docker orchestration, dashboard/program handling, ghost synchronization, Kinova ros2_control and gRPC setup, controller YAML generation, and vendor state translation.
4. The adapter boundary is important. Each brand package exposes a robot-facing adapter that translates vendor state into the HLCS contract: a generic core_states stream, vendor-specific state messages, and a single robot_command action. This is the main interface the GUI consumes, and it keeps the Commander brand-agnostic.
5. hlcs_commander is the human-facing control layer. It is a PySide6/QML application with per-robot tabs for control, motion, forecast, interfaces, config, and logs, plus fleet/scene/system tabs. It talks to ROS 2 through a Python backend, but it does not launch robot processes directly; it interacts with the fleet manager, adapters, and scene services.
6. hlcs_msgs defines the shared ROS API used across the whole system. It contains custom messages, services, and actions for fleet state, robot identity, capabilities, forecast control, scene loading, and robot add/remove operations. This package is the cross-cutting schema layer that keeps the other packages interoperable.
7. hlcs_common holds shared code rather than runtime features. It provides the RobotIdentity concept, base classes like the adapter and brand launcher abstractions, QoS profile helpers, constants, and logging utilities. This package is what enforces the common contract between fleet, brands, and GUI-facing components.
8. Scene handling is isolated in hlcs_scene. It loads environment URDFs, publishes static transforms for robot mount points, and serves scene-related services such as load/unload and mount assignment. The scene system is intentionally separate from fleet orchestration so robot placement and environment description stay independent of vendor drivers.
9. Forecasting is a separate system service in hlcs_forecast. Its role is to record and replay ghost robot motion using bag files, providing preview/approval workflows before executing on the real robot. This sits above the brands: it is brand-agnostic, but it depends on each brand package’s ghost stack and joint-state stream.
10. The ghost concept is implemented at the brand-launcher layer, not in the GUI or fleet manager. For both UR and Kinova, the brand launcher brings up a real stack and a ghost stack together, then keeps the ghost synchronized with the real robot’s joint state. That makes “forecasting” a runtime feature of the brand package rather than a separate simulator application.
11. hlcs_robot_registry is the configuration catalog. Its YAML files declare supported brands, models, capabilities, scene definitions, and mount metadata, including which launcher and adapter executables belong to each brand. The fleet manager and GUI use this registry to stay data-driven instead of hardcoding supported robots.
12. hlcs_program_builder is a separate PySide6/QML application for constructing motion programs. It stores waypoint-based programs in YAML and can execute them through MoveIt services. It is adjacent to the Commander workflow, but it is its own tool rather than a subsystem embedded into the main GUI.
13. The main runtime flow is: Commander starts the fleet manager and scene manager, the user adds a robot through the fleet manager, the chosen brand launcher spawns the vendor driver stack, and the adapter exposes normalized state back to the GUI. Scene assignment and forecast control then operate through their own ROS services and topics, not through direct GUI-to-driver coupling.
14. The repo also contains some non-runtime artifacts that matter for architecture understanding: notes/architecture.md and notes/development_journal.md document the design rules and rationale, while src/user_programs/ holds example UR programs. These are useful for understanding system behavior, but they are not core runtime components.
Main entry points: hlcs_msgs ROS API · hlcs_fleet_manager Fleet Manager · hlcs_commander Commander · hlcs_common Common
Components 19
Runtime services
Core ROS 2 services that coordinate robots, scenes, and forecasting.
- Fleet Manager · Owns robot registration, identity assignment, lifecycle state, and fleet services.
src/hlcs_fleet_manager - Scene Manager · Loads scenes, publishes mount transforms, and serves scene services.
src/hlcs_scene - Forecast Manager · Coordinates forecast record/replay workflows for ghost robot motion.
src/hlcs_forecast - Fleet Node · Fleet manager node implementation and launch entrypoint.
src/hlcs_fleet_manager/hlcs_fleet_manager/fleet_manager_node.py - Fleet Core · Fleet orchestration logic and port allocation.
src/hlcs_fleet_manager/hlcs_fleet_manager/fleet_manager.py - Scene Core · Scene loading and mount-management implementation.
src/hlcs_scene/hlcs_scene/scene_manager.py - Forecast Core · Bag recording, playback, and forecast coordination.
src/hlcs_forecast/hlcs_forecast/forecast_manager.py
Brand stacks
Vendor-specific launchers, adapters, and ghost support.
- UR Brand · Universal Robots launcher, adapter, ghost manager, and vendor-specific helpers.
src/hlcs_brand_ur - Kinova Brand · Kinova launcher, adapter, ghost manager, and controller setup.
src/hlcs_brand_kinova - UR Adapter · Normalizes UR states into HLCS core states and robot commands.
src/hlcs_brand_ur/hlcs_brand_ur/ur/ur_adapter.py - UR Launcher · Starts UR real and ghost stacks and handles UR-specific orchestration.
src/hlcs_brand_ur/hlcs_brand_ur/ur/ur_brand_launcher.py - Kinova Adapter · Normalizes Kinova states into HLCS core states and robot commands.
src/hlcs_brand_kinova/hlcs_brand_kinova/kinova/kinova_adapter.py - Kinova Launcher · Starts Kinova real and ghost stacks and handles vendor orchestration.
src/hlcs_brand_kinova/hlcs_brand_kinova/kinova/kinova_brand_launcher.py
Operator tools
Human-facing applications for fleet control and program authoring.
- Commander · Main operator UI for fleet, robot, scene, forecast, settings, and logs.
src/hlcs_commander - Program Builder · Standalone application for waypoint-based program authoring and execution.
src/hlcs_program_builder
Shared contract
Common abstractions and ROS API schema used across the repo.
Registry and assets
Data-driven robot, scene, and example program definitions.
- Registry · YAML catalog of supported brands, scenes, capabilities, and launcher metadata.
src/hlcs_robot_registry - User Programs · Example user-authored motion programs stored as YAML.
src/user_programs
Connections 29
- Commander → Fleet Manager: fleet control · Commander drives robot add/remove, selection, and fleet state through ROS services.
- Commander → Scene Manager: scene control · Commander loads and unloads scenes and assigns robot mounts.
- Commander → Forecast Manager: forecast UI · Commander triggers forecast launch, stop, and approval workflows.
- Commander → Program Builder: adjacent tool · Program Builder is a separate operator application, not embedded in Commander.
- Commander → ROS API: ROS contract · Commander consumes the shared ROS messages, services, and actions.
- Program Builder → ROS API: robot services · Program Builder executes motion programs through shared ROS services.
- Fleet Manager → Common: shared base · Fleet manager relies on common identity and launcher abstractions.
- Fleet Manager → ROS API: fleet api · Fleet manager implements fleet state and robot lifecycle services.
- Fleet Manager → Registry: brand lookup · Fleet manager uses registry data to resolve supported brands and launch metadata.
- Fleet Manager → UR Launcher: launch brand · Fleet manager delegates startup to the selected brand launcher.
- Fleet Manager → Kinova Launcher: launch brand · Fleet manager delegates startup to the selected brand launcher.
- Scene Manager → ROS API: scene api · Scene manager serves load/unload and mount assignment services.
- Scene Manager → Registry: scene data · Scene manager consumes scene definitions from the registry.
- Forecast Manager → ROS API: forecast api · Forecast manager provides forecast launch and stop services.
- Forecast Manager → UR Brand: ghost sync · Forecast workflows depend on brand ghost stacks and joint-state streams.
- Forecast Manager → Kinova Brand: ghost sync · Forecast workflows depend on brand ghost stacks and joint-state streams.
- UR Launcher → UR Adapter: expose state · UR launcher pairs the runtime stack with the adapter boundary.
- UR Launcher → Common: launcher base · UR launcher builds on the shared brand launcher abstraction.
- UR Adapter → ROS API: normalized api · UR adapter publishes core states, vendor states, and robot command actions.
- Kinova Launcher → Kinova Adapter: expose state · Kinova launcher pairs the runtime stack with the adapter boundary.
- Kinova Launcher → Common: launcher base · Kinova launcher builds on the shared brand launcher abstraction.
- Kinova Adapter → ROS API: normalized api · Kinova adapter publishes core states, vendor states, and robot command actions.
- Registry → ROS API: schema-aligned · Registry metadata mirrors the shared robot, scene, and capability contracts.
- User Programs → Program Builder: example input · Example YAML programs illustrate the program builder workflow.
- Common → ROS API: contract layer · Shared code underpins the cross-package HLCS contract.
- Fleet Node → Fleet Core: implements · Fleet node hosts the fleet orchestration logic.
- Fleet Core → Common: uses identity · Fleet orchestration uses shared robot identity and base abstractions.
- Scene Core → ROS API: scene services · Scene implementation backs the scene-related ROS API.
- Forecast Core → ROS API: forecast services · Forecast implementation backs the forecast-related ROS API.