irsim.env.env_config#
Classes#
Environment configuration loader and builder from YAML. |
Module Contents#
- class irsim.env.env_config.EnvConfig(world_name: str | None)[source]#
Environment configuration loader and builder from YAML.
- Responsibilities:
Resolve and parse a YAML configuration into structured dictionaries (basic categories:
world,gui,robot,obstacle)Construct
Worldand object collections and produce anEnvPlotSupport reloading the YAML and updating the scene in the same figure
- object_factory#
- load_yaml(world_name: str | None = None) None[source]#
Parse the YAML file and populate internal configuration state.
- Parameters:
world_name – Path or name of the YAML file. If
None, will try to resolve viafile_checkand fall back to empty/defaults.
- initialize_objects() Any[source]#
Construct world, objects and plot from the current parsed config.
- Returns:
(world, objects, env_plot, robot_collection, obstacle_collection, map_collection)- Return type:
Tuple
Notes
Caches the created
EnvPlotandobjectsinternally for use during in-place reloads.
- reload_objects() Any[source]#
Rebuild world/objects and update the current figure in-place.
This method reuses the existing
EnvPlotinstance and its figure/axes, clearing old artists and re-initializing with the new world and objects.- Returns:
(world, objects, env_plot, robot_collection, obstacle_collection, map_collection)- Return type:
Tuple
- reload_yaml_objects(world_name) Any[source]#
Reload YAML and update the scene using the existing figure.
This re-parses the YAML and then calls
reload_objects()to apply the new configuration without creating a new figure window.- Parameters:
world_name – Optional path/name of the YAML to reload. If
None, uses the previously resolved YAML file.- Returns:
(world, objects, env_plot, robot_collection, obstacle_collection, map_collection)- Return type:
Tuple
- property parse: dict[str, Any]#
The parsed kwargs from the yaml file.
- property logger#
Get the logger of the env_param.