Inputs and Outputs¶
Strict typing and standardized data streams
In Kompass, Components are designed with strict interfaces to “lock” their functionality. Each input and output is associated with a unique keyword name and restricted to a set of specific ROS2 message types.
A single keyword (e.g., sensor_data) can accept:
A Single Topic: One laser scan.
Multiple Topics: A list of topics (e.g., LiDAR + Radar) which are then fused internally by the component.
Configuration¶
Configuring inputs and outputs is done via the .inputs() and .outputs() methods on any Component instance.
from kompass.components import DriveManager
from kompass.ros import Topic
driver = DriveManager(component_name="driver")
# 1. Configure Inputs
# The 'sensor_data' key accepts a list of topics (fusion)
driver.inputs(
sensor_data=[
Topic(name='/scan', msg_type='LaserScan'),
Topic(name='/radar_data', msg_type='Float64')
]
)
# 2. Configure Outputs
# Remap the 'emergency_stop' signal to a custom topic name
driver.outputs(
emergency_stop=Topic(name='/system/alarm', msg_type='Bool')
)
See also
See the Topic configuration class details in the API Documentation.
Standard Stream Keys¶
Kompass uses a standardized set of keys across the entire stack.
Mapping & Perception¶
Enum Key |
Keyword String |
Description |
|---|---|---|
GLOBAL_MAP |
|
The static global reference map. |
LOCAL_MAP |
|
Dynamic occupancy grid of immediate surroundings. |
SPATIAL_SENSOR |
|
Raw spatial data (LIDAR, Radar, Depth). |
VISION_TRACKINGS |
|
Tracking data from vision systems (bounding boxes/masks). |
DEPTH_CAM_INFO |
|
Camera intrinsics parameters. |
TRACKED_POINT |
|
Specific point or object currently being tracked. |
Control & Actuation¶
Enum Key |
Keyword String |
Description |
|---|---|---|
INTERMEDIATE_CMD |
|
Velocity command produced by the Controller. |
INTERMEDIATE_CMD_LIST |
|
List of candidate velocity commands. |
FINAL_COMMAND |
|
Final, safety-checked command sent to the Driver. |
EMERGENCY |
|
Signal for immediate robot halt. |
System & State¶
Enum Key |
Keyword String |
Description |
|---|---|---|
ROBOT_LOCATION |
|
Current robot position and orientation (Odometry). |
RUN_TESTS |
|
Trigger flag to initiate calibration procedures. |
Tip
Each component’s specific requirements (required vs. optional streams) can be found in its respective documentation page (e.g., Planner Inputs, DriveManager Outputs).