# Revision history [back]

It seems that a neater solution is on the way:
https://github.com/ros2/launch/pull/453

Once the PR changes are available upstream, you will be able to do something like:

import launch
from launch.substitutions import LaunchConfiguration
from launch.conditions import LaunchConfigurationEquals

def generate_launch_description():
return launch.LaunchDescription([
DeclareLaunchArgument('bag_version', default_value='v1'),

Before the LaunchConfigurationEquals condition is available I guess your best bet is to copy the condition locally: https://github.com/ros2/launch/blob/master/launch/launch/conditions/launch_configuration_equals.py