Improve argument parsing in Actions (backport #663) #665
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🦟 Bug fix
Summary
The
RosGzBridge
andGzServer
now support different spellings for boolean arguments (True
,true
). This also simplifies how conditionals are used to create composable nodes by evaluating the conditionals and using them as regular Python booleans instead of relying onPythonExpression
. It was actually thePythonExpression
that was preventing support of boolean arguments spelledtrue
/false
.This came up in #632
The launch file in XML can now use lower case boolean strings:
https://github.com/gazebosim/ros_gz/blob/25b6644b644183e09f517170ce41b5dc6f16d6b8/ros_gz_sim_demos/launch/air_pressure.launch.xml#L1C1-L15C10
The equivalent python launch file for just gzserver and the bridge would be:
Note the
use_composition
argument can be a python boolean or a string (True
ortrue
). We should probably deprecate the string input at some point since that's not very PythonicChecklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.This is an automatic backport of pull request #663 done by Mergify.