usdot-fhwa-stol / carma-config

System configuration data for CARMA vehicle/vehicle-class deployments
4 stars 11 forks source link

CARMA Platform shuts down when /opt/carma/vehicle is symlinked to carma-config's example_calibration_folder/vehicle folder #262

Closed JonSmet closed 1 year ago

JonSmet commented 1 year ago

Summary

When launching CARMA Platform with the development config, it is expected that a user can symlink their /opt/carma/vehicle folder to carma-config's example_calibration_folder/vehicle folder. This is accomplished as part of the development environment setup instructions on Confluence: https://usdot-carma.atlassian.net/wiki/spaces/CRMPLT/pages/488472599/Setup+CARMA+Platform+Runtime#Setup-the-%2Fopt%2Fcarma-folder

Currently, when the carma-config/example_calibration_folder/vehicle folder is used, CARMA Platform shuts down during launch with the following error:

platform_ros2                 | chmod: cannot access '/opt/carma/vehicle/calibration/cloud_permission/carma-cloud-test-1.pem': No such file or directory
platform_ros2                 | Task exception was never retrieved
platform_ros2                 | future: <Task finished name='Task-2' coro=<LaunchService._process_one_event() done, defined at /opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py:226> exception=CalledProcessError(1, ['sudo', 'chmod', '400', '/opt/carma/vehicle/calibration/cloud_permission/carma-cloud-test-1.pem'])>
platform_ros2                 | Traceback (most recent call last):
platform_ros2                 |   File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 228, in _process_one_event
platform_ros2                 |     await self.__process_event(next_event)
platform_ros2                 |   File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 248, in __process_event
platform_ros2                 |     visit_all_entities_and_collect_futures(entity, self.__context))
platform_ros2                 |   File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
platform_ros2                 |     futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
platform_ros2                 |   File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
platform_ros2                 |     futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
platform_ros2                 |   File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
platform_ros2                 |     futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
platform_ros2                 |   [Previous line repeated 4 more times]
platform_ros2                 |   File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 38, in visit_all_entities_and_collect_futures
platform_ros2                 |     sub_entities = entity.visit(context)
platform_ros2                 |   File "/opt/ros/foxy/lib/python3.8/site-packages/launch/action.py", line 108, in visit
platform_ros2                 |     return self.execute(context)
platform_ros2                 |   File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/include_launch_description.py", line 130, in execute
platform_ros2                 |     launch_description = self.__launch_description_source.get_launch_description(context)
platform_ros2                 |   File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_description_source.py", line 84, in get_launch_description
platform_ros2                 |     self._get_launch_description(self.__expanded_location)
platform_ros2                 |   File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_description_sources/python_launch_description_source.py", line 51, in _get_launch_description
platform_ros2                 |     return get_launch_description_from_python_launch_file(location)
platform_ros2                 |   File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_description_sources/python_launch_file_utilities.py", line 68, in get_launch_description_from_python_launch_file
platform_ros2                 |     return getattr(launch_file_module, 'generate_launch_description')()
platform_ros2                 |   File "/opt/carma/install_ros2/carma/share/carma/launch/message.launch.py", line 213, in generate_launch_description
platform_ros2                 |     subprocess.check_call(['sudo','chmod','400', keyfile])
platform_ros2                 |   File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
platform_ros2                 |     raise CalledProcessError(retcode, cmd)
platform_ros2                 | subprocess.CalledProcessError: Command '['sudo', 'chmod', '400', '/opt/carma/vehicle/calibration/cloud_permission/carma-cloud-test-1.pem']' returned non-zero exit status 1.

Version

4.3.0 (Current)

Expected Behavior

A carma-cloud-test-1.pem file should be found within the /opt/carma/vehicle/calibration/cloud_permission directory. As mentioned above, a user should be able to symlink /opt/carma/vehicle to the carma-config's example_calibration_folder/vehicle folder.

Actual Behavior

The carma-cloud-test-1.pem file is not found at launch time, and CARMA Platform shuts down.

Steps to Reproduce the Actual Behavior

  1. Launch CARMA with the development config and with /opt/carma/vehicle symlinked to carma-config's example_calibration_folder/vehicle folder.
  2. Verify that CARMA Platform shuts down with the error displayed previously in this issue.

Related Work

No response

JonSmet commented 1 year ago

Closed by PR #261