Launch arguments support bool instead of string types only#1484
Launch arguments support bool instead of string types only#1484henningkayser wants to merge 1 commit intoUniversalRobots:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1484 +/- ##
========================================
+ Coverage 3.59% 5.37% +1.78%
========================================
Files 13 33 +20
Lines 947 3239 +2292
Branches 152 391 +239
========================================
+ Hits 34 174 +140
- Misses 843 3063 +2220
+ Partials 70 2 -68
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
urfeex
left a comment
There was a problem hiding this comment.
That seems fair, thank you! The failing CI is unrelated to this, I'll open a separate PR fixing that. This one might have to wait until that one's merged.
The priorliy used string comparison would not work when passing proper bool types when including the launch file. This fix allows using both string and bool values.
119d702 to
a216319
Compare
|
Hm, Kilted should be green except for binary/main. I'll check why it is not with this PR. |
urfeex
left a comment
There was a problem hiding this comment.
I'm sorry to retract my approval. The method you proposed, seems to fail. When starting from the commandline:
ros2 launch ur_robot_driver ur5e.launch.py robot_ip:=192.168.56.101 use_mock_hardare:=False
The expression if use_mock_hardware.perform(context) seems to evaluate to True. That probably is, since use_mock_hardware is read as a string from the command line, probably because its default value is "false". However, if I make the default value a boolean False, the IfCondition(use_mock_hardware) fails with 'bool' object is not iterable.
I don't know how to resolve this for now.
The priorliy used string comparison would not work when passing proper bool types when including the launch file. This fix allows using both string and bool values.