robokudo.semantic_map¶
Semantic map management for RoboKudo.
This module provides classes for managing semantic maps in RoboKudo. A semantic map represents the environment as a collection of named regions with spatial properties. The module supports:
Storage and retrieval of semantic map entries
Visualization of regions using ROS markers
Region definitions with position, orientation and size
Classes¶
Base class for managing semantic maps. |
|
A single entry in a semantic map. |
Module Contents¶
- class robokudo.semantic_map.BaseSemanticMap¶
-
Base class for managing semantic maps.
This class provides functionality to store and visualize semantic map entries. Each entry represents a named region in the environment with spatial properties. The map can be visualized using ROS visualization markers.
- Variables:
-
entries – Dictionary mapping region names to SemanticMapEntry objects
vis_publisher – ROS publisher for visualization markers
- entries¶
- node¶
- vis_publisher¶
- add_entry(entry)¶
-
Add a single semantic map entry.
- Parameters:
-
entry (SemanticMapEntry) – The semantic map entry to add
- Raises:
-
Exception – If the entry has no name attribute
- add_entries(entries: list)¶
-
Add multiple semantic map entries.
- Parameters:
-
entries (list[SemanticMapEntry]) – List of semantic map entries to add
- publish_visualization_markers(highlighted: set = None, highlight_color=(0.0, 1.0, 0.0), default_color=(0.0, 0.0, 0.7))¶
-
Publish visualization markers for all map entries.
Creates and publishes ROS visualization markers for each semantic map entry. Each entry is visualized as a cube with a text label showing its name.
- class robokudo.semantic_map.SemanticMapEntry¶
-
Bases:
robokudo.defs.Region3DWithNameA single entry in a semantic map.
This class extends Region3DWithName to add semantic information to regions. Each entry has a reference frame ID and a semantic type.
- Variables:
-
frame_id – The reference frame this region is defined in
type – The semantic type of this region (e.g. “CounterTop”)
plane_equation – Optional plane equation coefficients
- frame_id: str = ''¶
- type: str = ''¶
- plane_equation = None¶