Skip to content

Conversation

henningkayser
Copy link

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.

@urfeex urfeex self-requested a review September 4, 2025 12:17
Copy link

codecov bot commented Sep 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 5.37%. Comparing base (1b121b7) to head (a216319).
⚠️ Report is 479 commits behind head on main.

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     
Flag Coverage Δ
unittests 5.37% <ø> (+1.78%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@urfeex urfeex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@urfeex
Copy link
Member

urfeex commented Sep 8, 2025

Hm, Kilted should be green except for binary/main. I'll check why it is not with this PR.

Copy link
Member

@urfeex urfeex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants