Open gitisacatsname opened 8 months ago
If e.g. realsense is selected value mapper fails as it is evaluated with realsense value:
to_oakd_vars = { "oakd": "OAK-D", "oakdlite": "OAK-D-LITE", "oakdpro": "OAK-D-PRO" }
this is evaluated at launch causing it to fail (sensor is realsense):
launch_arguments={ 'camera_model': to_oakd_vars[LaunchConfiguration('sensor')],
I would prefer this
IncludeLaunchDescription( PythonLaunchDescriptionSource(PathJoinSubstitution( [FindPackageShare('depthai_examples'), 'launch', 'stereo.launch.py'] )), condition=IfCondition(PythonExpression(['"', LaunchConfiguration('sensor'), '" in "', str(oakd_sensors), '"'])), launch_arguments={ 'camera_model': PythonExpression(["'OAK-D' if 'oakd' in ", LaunchConfiguration('sensor'), " else 'OAK-D-LITE' if 'oakdlite' in ", LaunchConfiguration('sensor'), " else 'OAK-D-PRO' if 'oakdpro' in ", LaunchConfiguration('sensor')," else 'UNKNOWN'"]), }.items() ),
otherwise valuemapper will fail if e.g. realsense is used. this broke launch for me.
If e.g. realsense is selected value mapper fails as it is evaluated with realsense value:
this is evaluated at launch causing it to fail (sensor is realsense):
I would prefer this
IncludeLaunchDescription( PythonLaunchDescriptionSource(PathJoinSubstitution( [FindPackageShare('depthai_examples'), 'launch', 'stereo.launch.py'] )), condition=IfCondition(PythonExpression(['"', LaunchConfiguration('sensor'), '" in "', str(oakd_sensors), '"'])), launch_arguments={ 'camera_model': PythonExpression(["'OAK-D' if 'oakd' in ", LaunchConfiguration('sensor'), " else 'OAK-D-LITE' if 'oakdlite' in ", LaunchConfiguration('sensor'), " else 'OAK-D-PRO' if 'oakdpro' in ", LaunchConfiguration('sensor')," else 'UNKNOWN'"]), }.items() ),
otherwise valuemapper will fail if e.g. realsense is used. this broke launch for me.