-
Notifications
You must be signed in to change notification settings - Fork 79
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
Fix misleading deprecated warning when using launch arguments #106
Conversation
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
@Karsten1987 FYI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
I don't know if we need to pass ROS arguments to the internal launch_ros node or not, but for now it's probably ok to not do so.
As far as I see, we don't need to pass remapping rules or parameters. |
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
Signed-off-by: Ivan Santiago Paunovic <[email protected]> Signed-off-by: ivan <[email protected]>
* Add pid to launch_ros node name as suffix Signed-off-by: Brian Ezequiel Marchi <[email protected]> Signed-off-by: ivan <[email protected]> * Pass the node-name attribute through the substitution parser (#101) Signed-off-by: ivan <[email protected]> * Fix push-ros-namespace in xml/yaml launch files (#100) Signed-off-by: Ivan Santiago Paunovic <[email protected]> Signed-off-by: ivan <[email protected]> * Maintain order of parameters regarding name and from (#99) Signed-off-by: Brian Ezequiel Marchi <[email protected]> Signed-off-by: ivan <[email protected]> * Use imperative mood in constructor docstrings. (#103) * Use imperative mood in constructor docstrings. Fixes D401 in pycodestyle 5.0.0 and flake8. Signed-off-by: Steven! Ragnarök <[email protected]> * Use imperative mood in docstring. Signed-off-by: Steven! Ragnarök <[email protected]> * Use imperative mood in docstrings. Signed-off-by: Steven! Ragnarök <[email protected]> Signed-off-by: ivan <[email protected]> * Fix misleading deprecated warnings when using launch arguments (#106) Signed-off-by: Ivan Santiago Paunovic <[email protected]> Signed-off-by: ivan <[email protected]> * check for shutdown while waiting for a service response to avoid hang during shutdown (#104) * check for shutdown while waiting for a service response to avoid hang during shutdown Signed-off-by: William Woodall <[email protected]> * fix typo in logger call Signed-off-by: William Woodall <[email protected]> Signed-off-by: ivan <[email protected]> * Fix frontend topic remapping (#111) * Add frontend remap test Signed-off-by: Jacob Perron <[email protected]> * Pass data_type parameter to remap entity This resolves an issue where frontend remaps are not parsed. Signed-off-by: Jacob Perron <[email protected]> Signed-off-by: ivan <[email protected]> Co-authored-by: Brian Marchi <[email protected]> Co-authored-by: Grey <[email protected]> Co-authored-by: Steven! Ragnarök <[email protected]> Co-authored-by: William Woodall <[email protected]> Co-authored-by: Jacob Perron <[email protected]>
#120 reintroduced this bug. I'm working on a fix and a regression test. |
Before this patch, running:
ros2 launch any_package any_launch_file some_arg:=some_value
ended up with a warning:
That's misleading, because the only way of passing launch arguments is by adding
key:=value
at the end of the command.To fix this, I did the following:
LaunchContext
arguments in the initialization of therclpy.Context
:launch_ros/launch_ros/launch_ros/default_launch_description.py
Line 60 in d6dd5c0
Add a custom way of passing those arguments.
rclpy.Context
inros2launch
launch_ros/ros2launch/ros2launch/api/api.py
Line 144 in 8fae305
Before, we were passing the same key values configurations that
ros2launch
received, which can cause problems (e.g.: being used as remapping rules).argv
option ofros2launch
arguments. IIUC, it was always empty as the previous argument (launch configurations) was taking a variable number of options.I'm not sure if this is the correct way to go, maybe we want to do something different.
e.g.: Filtering the launch configurations from the arguments, and use the others as the arguments of the
rclpy.Context
. IMO, that may be confusing.