irsim.env.env_config#

Classes#

EnvConfig

Environment configuration loader and builder from YAML.

Module Contents#

class irsim.env.env_config.EnvConfig(world_name: str | None, env_param_instance: irsim.config.env_param.EnvParam | None = None, world_param_instance: irsim.config.world_param.WorldParam | None = 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 World and object collections and produce an EnvPlot

  • Support 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 via file_check and 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 EnvPlot and objects internally 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 EnvPlot instance 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.