"launch configuration 'True' does not exist"
Maxme3ernard opened this issue · 1 comments
Hey,
I recently updated my simple_launch installation (from source) to use the add_action
function.
However, without modifying my previously working launchfile, I now have an error.
My previous simple_launch version was quite old (1 or 2 years)
Some info:
ROS distro: foxy
$pip show launch
Name: launch
Version: 0.10.10
Summary: Launch processes specified in launch files.
Home-page: https://github.com/ros2/launch
Author: Dirk Thomas
Author-email: dthomas@osrfoundation.org
License: Apache License, Version 2.0
Location: /opt/ros/foxy/lib/python3.8/site-packages
Requires: setuptools
Required-by: launch-ros, topic-monitor
The error:
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:226> exception=SubstitutionFailure("launch configuration 'True' does not exist")>
Traceback (most recent call last):
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 228, in _process_one_event
await self.__process_event(next_event)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 248, 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 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
[Previous line repeated 3 more times]
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 106, in visit
if self.__condition is None or self.__condition.evaluate(context):
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/condition.py", line 44, in evaluate
return self._predicate(context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/conditions/if_condition.py", line 43, in _predicate_func
return evaluate_condition_expression(context, self.__predicate_expression)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/conditions/evaluate_condition_expression_impl.py", line 41, in evaluate_condition_expression
expanded_expression = perform_substitutions(context, expression)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/perform_substitutions_impl.py", line 26, in perform_substitutions
return ''.join([context.perform_substitution(sub) for sub in subs])
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/perform_substitutions_impl.py", line 26, in <listcomp>
return ''.join([context.perform_substitution(sub) for sub in subs])
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_context.py", line 232, in perform_substitution
return substitution.perform(self)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/substitutions/launch_configuration.py", line 98, in perform
raise SubstitutionFailure(
launch.substitutions.substitution_failure.SubstitutionFailure: launch configuration 'True' does not exist
I fail to accurately trace this error further back, and the associated ~/.ros/log/logfile
file is empty.
However, the error seems to occur when the line with sl.group(if_arg=sl.arg('arg_name')):
is interpreted.
Thanks again for your work.
Thanks for the feedback,
Can you give the launch file that leads to this error?
There might be several reasons why it occurs, including a launch argument that would contain "true", possibly wrongly changed to "True" under some conditions.