Skip to content

Commit

Permalink
Add launch argument to optionally launch the controller_stopper
Browse files Browse the repository at this point in the history
  • Loading branch information
eholum committed Nov 5, 2024
1 parent 984c218 commit 8c615bc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion ur_robot_driver/launch/ur_control.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def launch_setup(context):
use_tool_communication = LaunchConfiguration("use_tool_communication")
tool_device_name = LaunchConfiguration("tool_device_name")
tool_tcp_port = LaunchConfiguration("tool_tcp_port")
use_controller_stopper = LaunchConfiguration("use_controller_stopper")

control_node = Node(
package="controller_manager",
Expand Down Expand Up @@ -120,7 +121,9 @@ def launch_setup(context):
name="controller_stopper",
output="screen",
emulate_tty=True,
condition=UnlessCondition(use_mock_hardware),
condition=IfCondition(
AndSubstitution(use_controller_stopper, NotSubstitution(use_mock_hardware))
),
parameters=[
{"headless_mode": headless_mode},
{"joint_controller_active": activate_joint_controller},
Expand Down Expand Up @@ -470,4 +473,12 @@ def generate_launch_description():
],
)
)
declared_arguments.append(
DeclareLaunchArgument(
"use_controller_stopper",
default_value="true",
description="Use the controller stopper node to start and stop ROS 2 controllers "
"based on the robot's running state topic."
)
)
return LaunchDescription(declared_arguments + [OpaqueFunction(function=launch_setup)])

0 comments on commit 8c615bc

Please sign in to comment.