mirror of
https://github.com/SHC-ASTRA/rover-ros2.git
synced 2026-02-11 09:20:40 +00:00
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
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user