Inputs and Outputs#
Components in Kompass are defined to accept only restricted types of inputs/outputs to help lock the functionality of a specific Component implementation. Each input/output is associated with a unique keyword name and is set to accept one or many of ROS2 message types. Additionally, the input/output keyword in the Component can define a category of Topics rather than a single one. To see an example of this check the DriveManager Component. In this component the input sensor_data defines any proximity sensor input (LiDAR, Radar, etc.) and can optionally take up to 10 Topics of such types to fuse it internally during execution.
Configuring an input/output of a Component is very straightforward and can be done in one line in your Python script. Below is an example for configuring the previously mentioned DriveManager:
from kompass.components import DriveManager
from kompass.ros import Topic
driver = DriveManager(component_name="driver")
# Configure an input
driver.inputs(sensor_data=[Topic(name='/scan', msg_type='LaserScan'),
Topics(name='radar_data', msg_type='Float64')])
# Configure an output
driver.outputs(emergency_stop=Topic(name='alarm', msg_type='Bool'))
See also
See the input/output configuration class Topic
in detail here
All Inputs/Outputs in Kompass Components are defined with fixed key names across the stack, each containing:
Set of allowed types for the stream (equivalent to ROS2 messages)
The number of required streams for the key name
The maximum number of additional streams that can be assigned.
Below is a list of all the streams (inputs and outputs) key names available in Kompass stack:
Enum TopicsKeys |
Name Value |
Description |
---|---|---|
GOAL_POINT |
|
Target destination point on the map for the robot point navigation |
GLOBAL_PLAN |
|
Global navigation plan (path) from start to goal |
GLOBAL_MAP |
|
Global (reference) map used for navigation |
ROBOT_LOCATION |
|
Current position and orientation of the robot |
SPATIAL_SENSOR |
|
Raw data from robot’s spatial sensors (e.g., LIDAR, depth sensors) |
VISION_TRACKINGS |
|
Visual tracking data from robot’s cameras or vision systems |
DEPTH_CAM_INFO |
|
Depth camera information which includes camera intrinsics parameters |
LOCAL_PLAN |
|
Short-term path plan considering immediate surroundings |
INTERMEDIATE_CMD |
|
Robot velocity command produced by the control system |
INTERMEDIATE_CMD_LIST |
|
List of intermediate velocity commands |
LOCAL_MAP |
|
Map of the immediate surroundings for local navigation (control) |
LOCAL_MAP_OCC |
|
Occupancy grid representation of the local environment |
INTERPOLATED_PATH |
|
Interpolated global path |
TRACKED_POINT |
|
Specific point being tracked by the robot’s systems on the reference path of reference vision target |
FINAL_COMMAND |
|
Final control command sent to robot’s driver |
EMERGENCY |
|
Emergency stop signal for immediate robot halt |
REACHED_END |
|
Flag indicating whether the goal point has been reached |
RUN_TESTS |
|
Flag to initiate system test procedures |
Tip
You can refer to each individual component in the stack to see its respective Inputs and Output keys, along with their allowed types and number of optional and required streams. (See Planner Inputs or example)