Skip to content

Conditional Boolean vs String Argument Declaration #5233

@nishalangovender

Description

@nishalangovender

Feature request

Feature description

Whilst using nav2_bringup, I noticed that some arguments are defined as native Python booleans (True/False), whilst others are string-based ("true"/"false") depending on the conditional check in the launch file.

For example, here you can see boolean conditions slam and use_localization are in a PythonExpression conditional check whilst the string-based conditions use_sim_time, autostart and use_respawn are in the launch_arguments (funny enough use_respawn is defined as boolean False).

Whilst this has no real impact on anyone using it, it would be nice to stay consistent with their uses. I'm not sure if I'm in the minority here?

Implementation considerations

Possible solution:
condition=IfCondition(PythonExpression(["'", slam, "' == 'true' and '", use_localization, "' == 'true'"]))

This keeps everything as string conditions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomershelp wantedExtra attention is neededquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions