From ddfceb1b427f8fb862a094dace24bc55474f6a26 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 24 Nov 2025 10:06:56 -0600 Subject: [PATCH] feat: add launch config for ptz Disable PTZ node with `ros2 launch anchor_pkg rover.launch.py use_ptz:=false` instead of commenting it out --- src/anchor_pkg/launch/rover.launch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/anchor_pkg/launch/rover.launch.py b/src/anchor_pkg/launch/rover.launch.py index 2a949ba..a9520d8 100644 --- a/src/anchor_pkg/launch/rover.launch.py +++ b/src/anchor_pkg/launch/rover.launch.py @@ -8,6 +8,7 @@ from launch.substitutions import ( PathJoinSubstitution, ) from launch_ros.actions import Node +from launch.conditions import IfCondition # Prevent making __pycache__ directories @@ -50,6 +51,7 @@ def launch_setup(context, *args, **kwargs): executable="ptz", # change as needed name="ptz", output="both", + condition=IfCondition(LaunchConfiguration("use_ptz", default="true")), # Currently don't shutdown all nodes if the PTZ node fails, as it is not critical # on_exit=Shutdown() # Uncomment if you want to shutdown on PTZ failure )