Multiple conditions for IfCondition in ros2 launch script
I need to launch a node in a ros2 launch script that requires multiple conditions i.e. a logical 'and' expression
DeclareLaunchArgument("input_arg", default_value="arg1")
DeclareLaunchArgument("bool_arg", default_value="false")
input_arg = LaunchConfiguration("input_arg")
bool_arg = LaunchConfiguration("bool_arg")
my_node = Node(
package="my_pkg",
executable="my_node",
# condition=IfCondition(input_arg == arg2 and not bool_arg)
)
I only want to launch the above node if the input_arg launch argument equals a specific value and the bool_arg argument is false. It easy enough to do one or the other condition e.g. with LaunchConfigurationEquals for the input_arg, but how do combine both these into one IfCondition. I'm guessing it has something with using PythonExpression but I can't get anything to work.