Map Server#
The MapServer component is responsible for serving the static global map data within the navigation system. It reads static map files, processes them, and serves global map data to other components in the system.
The MapServer component can perform the following functionalities:
Map Data Conversion |
Reads map files in either 2D (YAML) or 3D (PCD) format and converts the data into usable global map formats (OccupancyGrid). |
Global Map Serving |
Once map data is loaded and processed, the MapServer publishes the global map as an |
Point Cloud to Grid Conversion |
If the map data is provided in the form of point cloud data (PCD file), the MapServer can generate an occupancy grid from the point cloud. It uses the provided grid resolution and ground limits to classify points and create an accurate occupancy map. |
Custom Frame Handling |
The MapServer allows configuration of a custom frame for the map. This frame can be applied to the global map when published, ensuring compatibility with other components that may use a different reference frame for their operations. |
Map Saving |
The MapServer can save the generated or modified maps to files. It supports saving both 2D and 3D maps using the |
Map Update Frequency Control |
The MapServer can be configured to control how often map data is read and converted. The rate of map updates can be controlled by the |
Outputs:#
Key Name |
Allowed Types |
Number |
Default |
---|---|---|---|
global_map |
1 |
|
|
spatial_sensor |
1, optional |
|
Configuration Parameters:#
See all available parameters in MapServerConfig
Usage Example:#
from kompass.components import MapServerConfig, MapServer
from kompass.ros import Topic
# Setup custom configuration
my_config = MapServerConfig(
map_file_read_rate=5.0,
map_file_path="/path/to/your/map.pcd", # Absolute path to the static map file
grid_resolution=0.1, # Map resolution used for converting from 3D
pc_publish_row=False, # Disable publishing point cloud data
)
# Init a MapServer object
my_map_server = MapServer(component_name="map_server", config=my_config)