Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fmauch committed Apr 18, 2024
1 parent 01dd717 commit 2be2694
Showing 1 changed file with 14 additions and 215 deletions.
229 changes: 14 additions & 215 deletions my_robot_cell/my_robot_cell_control/launch/rsp.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def generate_launch_description():

headless_mode = LaunchConfiguration("headless_mode")

kinematics_params = LaunchConfiguration("kinematics_params_file")
kinematics_parameters_file = LaunchConfiguration("kinematics_parameters_file")

robot_description_content = Command(
[
Expand All @@ -68,6 +68,9 @@ def generate_launch_description():
"ur_type:=",
ur_type,
" ",
"kinematics_parameters_file:=",
kinematics_parameters_file,
" ",
"use_mock_hardware:=",
use_mock_hardware,
" ",
Expand Down Expand Up @@ -97,6 +100,7 @@ def generate_launch_description():
"ur20",
"ur30",
],
default_value="ur20",
)
)
declared_arguments.append(
Expand All @@ -106,63 +110,15 @@ def generate_launch_description():
)
declared_arguments.append(
DeclareLaunchArgument(
"safety_limits",
default_value="true",
description="Enables the safety limits controller if true.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"safety_pos_margin",
default_value="0.15",
description="The margin to lower and upper limits in the safety controller.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"safety_k_position",
default_value="20",
description="k-position factor in the safety controller.",
)
)
# General arguments
declared_arguments.append(
DeclareLaunchArgument(
"runtime_config_package",
default_value="ur_robot_driver",
description='Package with the controller\'s configuration in "config" folder. '
"Usually the argument is not set, it enables use of a custom setup.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"controllers_file",
default_value="ur_controllers.yaml",
description="YAML file with the controllers configuration.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"description_package",
default_value="ur_description",
description="Description package with robot URDF/XACRO files. Usually the argument "
"is not set, it enables use of a custom description.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"description_file",
default_value="ur.urdf.xacro",
description="URDF/XACRO description file with the robot.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"tf_prefix",
default_value="",
description="tf_prefix of the joint names, useful for "
"multi-robot setup. If changed, also joint names in the controllers' configuration "
"have to be updated.",
"kinematics_parameters_file",
default_value=PathJoinSubstitution(
[
FindPackageShare("my_robot_cell_control"),
"config",
"my_robot_calibration.yaml",
]
),
description="The calibration configuration of the actual robot used.",
)
)
declared_arguments.append(
Expand All @@ -187,143 +143,6 @@ def generate_launch_description():
description="Enable headless mode for robot control",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"controller_spawner_timeout",
default_value="10",
description="Timeout used when spawning controllers.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"initial_joint_controller",
default_value="scaled_joint_trajectory_controller",
description="Initially loaded robot controller.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"activate_joint_controller",
default_value="true",
description="Activate loaded joint controller.",
)
)
declared_arguments.append(
DeclareLaunchArgument("launch_rviz", default_value="true", description="Launch RViz?")
)
declared_arguments.append(
DeclareLaunchArgument(
"launch_dashboard_client",
default_value="true",
description="Launch Dashboard Client?",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"use_tool_communication",
default_value="false",
description="Only available for e series!",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"tool_parity",
default_value="0",
description="Parity configuration for serial communication. Only effective, if "
"use_tool_communication is set to True.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"tool_baud_rate",
default_value="115200",
description="Baud rate configuration for serial communication. Only effective, if "
"use_tool_communication is set to True.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"tool_stop_bits",
default_value="1",
description="Stop bits configuration for serial communication. Only effective, if "
"use_tool_communication is set to True.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"tool_rx_idle_chars",
default_value="1.5",
description="RX idle chars configuration for serial communication. Only effective, "
"if use_tool_communication is set to True.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"tool_tx_idle_chars",
default_value="3.5",
description="TX idle chars configuration for serial communication. Only effective, "
"if use_tool_communication is set to True.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"tool_device_name",
default_value="/tmp/ttyUR",
description="File descriptor that will be generated for the tool communication device. "
"The user has be be allowed to write to this location. "
"Only effective, if use_tool_communication is set to True.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"tool_tcp_port",
default_value="54321",
description="Remote port that will be used for bridging the tool's serial device. "
"Only effective, if use_tool_communication is set to True.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"tool_voltage",
default_value="0", # 0 being a conservative value that won't destroy anything
description="Tool voltage that will be setup.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"reverse_ip",
default_value="0.0.0.0",
description="IP that will be used for the robot controller to communicate back to the driver.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"script_command_port",
default_value="50004",
description="Port that will be opened to forward URScript commands to the robot.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"reverse_port",
default_value="50001",
description="Port that will be opened to send cyclic instructions from the driver to the robot controller.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"script_sender_port",
default_value="50002",
description="The driver will offer an interface to query the external_control URScript on this port.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"trajectory_port",
default_value="50003",
description="Port that will be opened for trajectory control.",
)
)

return LaunchDescription(
declared_arguments
Expand All @@ -334,26 +153,6 @@ def generate_launch_description():
output="both",
parameters=[robot_description],
),
# Node(
# package="controller_manager",
# executable="ros2_control_node",
# parameters=[
# update_rate_config_file,
# ParameterFile(initial_joint_controllers, allow_substs=True),
# ],
# output="screen",
# ),
# Node(
# package="controller_manager",
# executable="spawner",
# arguments=[
# "--controller-manager",
# "/controller_manager",
# "--controller-manager-timeout",
# controller_spawner_timeout,
# "joint_state_broadcaster"
# ]
# )
]
)

0 comments on commit 2be2694

Please sign in to comment.