kompass.components.mapper¶
Module Contents¶
Classes¶
LocalMapperConfig parameters |
|
This component is responsible for generating this local map during the navigation. |
API¶
- class kompass.components.mapper.LocalMapperConfig¶
Bases:
kompass.config.ComponentConfigLocalMapperConfig parameters
- class kompass.components.mapper.LocalMapper(*, component_name: str, config_file: Optional[str] = None, config: Optional[kompass.components.mapper.LocalMapperConfig] = None, inputs: Optional[Dict[str, kompass.components.ros.Topic]] = None, outputs: Optional[Dict[str, kompass.components.ros.Topic]] = None, **kwargs)¶
Bases:
kompass.components.component.ComponentThis component is responsible for generating this local map during the navigation.
Note
Current implementation supports LaserScan sensor data to create an Occupancy Grid local map. PointCloud and semantic information will be supported in an upcoming release
Available Run Types
Set directly from LocalMapper ‘run_type’ property.
Timed
Produces a local map periodically if all inputs are available
Inputs
Key
Description
Accepted Types
Number of Topics
Default Value
location
Robot current location
Odometry, PoseWithCovariance, Pose1
Topic(name="/odom", msg_type="Odometry")sensor_data
Direct sensor input
LaserScan1
Topic(name="/scan", msg_type="LaserScan")Outputs
Key
Description
Accepted Types
Default Value
local_map
Local occupancy map
OccupancyGridTopic(name="/scan", msg_type="LaserScan")Usage Example:
from kompass_core.mapping import LocalMapperConfig from kompass.components import LocalMapper, MapperConfig # Select map parameters map_params = MapperConfig(width=5.0, height=5.0, resolution=0.2) # 5mX5m map with 0.2m/cell resolution # Setup custom component configuration my_config = LocalMapperConfig(loop_rate=10.0, map_params=map_params) # Init a mapper my_mapper = LocalMapper(component_name="mapper", config=my_config)
- init_variables()¶
Overwrites the init variables method called at Node init
- publish_data()¶
Publish layers and obstacles mapped from LocalMapper