Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor followup issues for service cache manager. #261

Open
jihoonl opened this issue Jan 20, 2015 · 0 comments
Open

minor followup issues for service cache manager. #261

jihoonl opened this issue Jan 20, 2015 · 0 comments

Comments

@jihoonl
Copy link
Collaborator

jihoonl commented Jan 20, 2015

It is follow up issue of #257

  • use rocon_python_utils.ros.get_ros_friendly_name() for places like
    self._concert_name = concert_name.strip().lower().replace(' ', '_')
  • improve service_cache_manager._create_service_cache logic.
    def _create_service_cache(self):
    """
    Create cache as loading service configuration from default value.
    """
    # read resource file
    loaded_profiles = {}
    service_configurations = load_solution_configuration_from_default(rocon_python_utils.ros.find_resource_from_string(self._resource_name))
    for service_configuration in service_configurations:
    resource_name = check_extension_name(service_configuration['resource_name'], '.service')
    overrides = service_configuration['overrides']
    try:
    loaded_profile = self._load_service_profile_from_default(resource_name, overrides)
    self._save_service_profile(loaded_profile)
    loaded_profiles[loaded_profile['name']] = copy.deepcopy(loaded_profile)
    except rospkg.ResourceNotFound as e:
    self.logwarn('Cannot load service configuration: [%s]' % resource_name)
    continue
    # save solution configuration
    self._save_solution_configuration(loaded_profiles)
    • it is saving service profile while loading. service saving should be done with save solution configuration.
  • os.path.isfile(interactions_yaml_file) or os.stat(interactions_yaml_file).st_size <= 0: are used to check file existence and whether the file is up-to-date.
    • We may want to move this into rocon_python_utils as method.
  • rocon_python_utils.ros.paths -> rocon_python_utils.system.fileio
    • it is module to control file system.
  • rename default_auto_enable_services to default_enable_services
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant