irsim.env.env_config ==================== .. py:module:: irsim.env.env_config Classes ------- .. autoapisummary:: irsim.env.env_config.EnvConfig Module Contents --------------- .. py:class:: 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) 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 .. py:attribute:: object_factory .. py:method:: load_yaml(world_name: str | None = None) -> None Parse the YAML file and populate internal configuration state. :param world_name: Path or name of the YAML file. If ``None``, will try to resolve via ``file_check`` and fall back to empty/defaults. .. py:method:: initialize_objects() -> Any Construct world, objects and plot from the current parsed config. :returns: ``(world, objects, env_plot, robot_collection, obstacle_collection, map_collection)`` :rtype: Tuple .. rubric:: Notes - Caches the created ``EnvPlot`` and ``objects`` internally for use during in-place reloads. .. py:method:: reload_objects() -> Any 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)`` :rtype: Tuple .. py:method:: reload_yaml_objects(world_name) -> Any Reload YAML and update the scene using the existing figure. This re-parses the YAML and then calls :py:meth:`reload_objects` to apply the new configuration without creating a new figure window. :param 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)`` :rtype: Tuple .. py:property:: parse :type: dict[str, Any] The parsed kwargs from the yaml file. .. py:property:: logger Get the logger of the env_param.