-
Notifications
You must be signed in to change notification settings - Fork 74
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
Support for conditional parameter import from yaml file in XML launch file #323
Comments
Launch throws an error in To get this on foxy, need to backport this PR that added the validation to frontend : ros2/launch#468 Opened backport PRs: |
Okay it is definitely better to have this helpful error message. This being said, what are the arguments against the a conditional parameter, as it was supported in ROS 1 and there is no way to do this in ROS 2 in an elegant way. |
@Flova conditions apply to For this feature to work, conditions would have to apply to all |
One backport PR is blocked here : #293 (comment). Working on it |
Closing this issue as both backport PRs have been merged : |
Could we leave this issue open as a feature request for conditional loading of parameters? Or should I create a new one? |
Re-opening since the feature isn't supported. |
Note that the backport ros2/launch#567 inadvertently broke behavior of front-end launch files (reported in ros2/ros2#1244). I'm considering reverting the backports. Although the error messages are nice to have, I think the break in behavior was not worth it. |
Is there no update on this yet? It still does not work, I'm trying it on Galactic? It would also be nice to know the reasoning behind deprecating this feature for ROS2, there also seems to be nothing mentioned in the ROS2 design documentation. |
Sadly, this is still missing in ros2. But I also didn't have the resources to implement it myself yet. |
Thanks for the update @Flova. I eventually moved to using python launch files, where it is possible. |
Bug report
Conditional loading of parameters using the
<param>
tag in the XML launch files is not possible at the moment, because the said tag does not support theif
orunless
argument as described in https://design.ros2.org/articles/roslaunch_xml.html.In ROS1 the
<rosparam>
and<param>
tags supported conditional loading usingif=""
, this enabled e.g. overwriting of some parameters if the launch argumentsim
was set. Now that the loading was moved from<rosparam>
to<param>
it is missing this feature.Steps to reproduce issue
Launch a node with the launch file above and it will include all parameters even if
sim
anddummy
arefalse
.Expected behavior
I would expect one of the following behaviors, even tho I am preferring the first one.
if
argument is not supported in this context. The same happens for other similar errors (e.g.arg
instead of var).Actual behavior
if
.The text was updated successfully, but these errors were encountered: