Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add launch argument to optionally omit the controller_stopper node #1175

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)])