rofunc.config.utils#

1.  Module Contents#

1.1.  Functions#

get_sim_config

Load the configs stored in agent_name.yaml.

get_config

Load config file for RofuncRL and rewrite some params by args.

process_omni_config

Load the configs stored in agent_name.yaml.

load_view_motion_config

Load the configs stored in config_name.yaml.

load_ikea_config

Load the configs stored in ikea_name.yaml.

print_config

omegaconf_to_dict

Converts an omegaconf DictConfig to a python Dict, respecting variable interpolation.

dict_to_omegaconf

Converts a python Dict to an omegaconf DictConfig, respecting variable interpolation.

1.2.  API#

rofunc.config.utils.get_sim_config(sim_name: str)[source]#

Load the configs stored in agent_name.yaml.

Parameters:

sim_name – Name of the config file under config/simulator for the agent.

Returns:

A dict of configs.

rofunc.config.utils.get_config(config_path=None, config_name=None, args=None, debug=False, absl_config_path=None) omegaconf.DictConfig[source]#

Load config file for RofuncRL and rewrite some params by args.

Parameters:
  • config_path – relative path to the config file (only for rofunc package)

  • config_name – name of the config file (without .yaml)

  • args – custom args to rewrite some params in the config file

  • debug – if True, print the config

  • absl_config_path – absolute path to the folder contains config file (for external user)

Returns:

rofunc.config.utils.process_omni_config(cfg)[source]#

Load the configs stored in agent_name.yaml.

Parameters:

cfg

Returns:

rofunc.config.utils.load_view_motion_config(config_name)[source]#

Load the configs stored in config_name.yaml.

Args:

config_name (str): Name of the config file for viewing motion.

Returns:

(dict): A dict of configs.

rofunc.config.utils.load_ikea_config(ikea_name)[source]#

Load the configs stored in ikea_name.yaml.

Args:

ikea_name (str): Name of the config file under config/ikea for the ikea furniture.

Returns:

(dict): A dict of configs.

rofunc.config.utils.print_config(config: omegaconf.DictConfig)[source]#
rofunc.config.utils.omegaconf_to_dict(config: omegaconf.DictConfig) Dict[source]#

Converts an omegaconf DictConfig to a python Dict, respecting variable interpolation.

rofunc.config.utils.dict_to_omegaconf(d: Dict, save_path: str = None) omegaconf.DictConfig[source]#

Converts a python Dict to an omegaconf DictConfig, respecting variable interpolation.