open-rmf / free_fleet

A free fleet management system.
Apache License 2.0
157 stars 65 forks source link

launch.invalid_launch_file_error.InvalidLaunchFileError: #59

Closed otomoov closed 3 years ago

otomoov commented 3 years ago
oto@moov:~/server_ws$ ros2 launch ff_examples_ros2 fake_server.launch.xml
[INFO] [launch]: All log files can be found below /home/oto/.ros/log/2020-11-27-15-22-24-850433-moov-59337
[INFO] [launch]: Default logging verbosity is set to INFO
/opt/ros/foxy/lib/python3.8/site-packages/launch/frontend/expose.py:39: UserWarning: The parameter 'node_name' is deprecated, use 'name' instead
  return action_type(**kwargs)
Task exception was never retrieved
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:271> exception=InvalidLaunchFileError('xml')>
Traceback (most recent call last):
  File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_description_sources/any_launch_file_utilities.py", line 53, in get_launch_description_from_any_launch_file
    return loader(launch_file_path)
  File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_description_sources/frontend_launch_file_utilities.py", line 35, in get_launch_description_from_frontend_launch_file
    return parser.parse_description(root_entity)
  File "/opt/ros/foxy/lib/python3.8/site-packages/launch/frontend/parser.py", line 102, in parse_description
    actions = [self.parse_action(child) for child in entity.children]
  File "/opt/ros/foxy/lib/python3.8/site-packages/launch/frontend/parser.py", line 102, in <listcomp>
    actions = [self.parse_action(child) for child in entity.children]
  File "/opt/ros/foxy/lib/python3.8/site-packages/launch/frontend/parser.py", line 85, in parse_action
    return instantiate_action(entity, self)
  File "/opt/ros/foxy/lib/python3.8/site-packages/launch/frontend/expose.py", line 39, in instantiate_action
    return action_type(**kwargs)
  File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/actions/node.py", line 174, in __init__
    raise RuntimeError(
RuntimeError: Passing both 'node_name' and 'name' parameters. Only use 'name'.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 273, in _process_one_event
    await self.__process_event(next_event)
  File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 293, in __process_event
    visit_all_entities_and_collect_futures(entity, self.__context))
  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
    futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
  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
    futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
  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
    sub_entities = entity.visit(context)
  File "/opt/ros/foxy/lib/python3.8/site-packages/launch/action.py", line 108, in visit
    return self.execute(context)
  File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/include_launch_description.py", line 125, in execute
    launch_description = self.__launch_description_source.get_launch_description(context)
  File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_description_source.py", line 84, in get_launch_description
    self._get_launch_description(self.__expanded_location)
  File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_description_sources/any_launch_description_source.py", line 53, in _get_launch_description
    return get_launch_description_from_any_launch_file(location)
  File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_description_sources/any_launch_file_utilities.py", line 56, in get_launch_description_from_any_launch_file
    raise InvalidLaunchFileError(extension, likely_errors=exceptions)
launch.invalid_launch_file_error.InvalidLaunchFileError: Caught exception when trying to load file of format [xml]: Passing both 'node_name' and 'name' parameters. Only use 'name'.
aaronchongth commented 3 years ago

Hello there @otomoov !

Could you make sure that you are using this branch? This has been fixed here, https://github.com/osrf/free_fleet/blob/fix/focal-docs/ff_examples_ros2/launch/fake_server.launch.xml#L7 and https://github.com/osrf/free_fleet/blob/fix/focal-docs/ff_examples_ros2/launch/turtlebot3_world_ff.launch.xml#L7

As a sanity check, make sure you try a fresh build too,

cd ~/server_ws
rm -rf build install log
colcon build --cmake-args -DCMAKE_BUILD_TYPE=RELEASE --packages-up-to free_fleet free_fleet_server_ros2 ff_examples_ros2
otomoov commented 3 years ago

It is solved. Thank you! I searched for

turtlebot3_world_ff.launch.xml
and in the file, I removed
node-name="turtlebot3_fleet_server_node"

aaronchongth commented 3 years ago

Yes, please make sure to pull from the fix/focal-docs branch, it already has the changes you mentioned.