Skip to content

Commit 46f6026

Browse files
mergify[bot]Felix Exner (fexner)
andauthored
Added support for UR20 (#806)
(cherry picked from commit dd83244) Co-authored-by: Felix Exner (fexner) <[email protected]>
1 parent 1fc9017 commit 46f6026

File tree

8 files changed

+112
-7
lines changed

8 files changed

+112
-7
lines changed

ur_moveit_config/launch/ur_moveit.launch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def generate_launch_description():
263263
DeclareLaunchArgument(
264264
"ur_type",
265265
description="Type/series of used UR robot.",
266-
choices=["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e"],
266+
choices=["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e", "ur20"],
267267
)
268268
)
269269
declared_arguments.append(
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
controller_manager:
2+
ros__parameters:
3+
update_rate: 500 # Hz

ur_robot_driver/doc/usage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The arguments for launch files can be listed using ``ros2 launch ur_robot_driver
2020
The most relevant arguments are the following:
2121

2222

23-
* ``ur_type`` (\ *mandatory* ) - a type of used UR robot (\ *ur3*\ , *ur3e*\ , *ur5*\ , *ur5e*\ , *ur10*\ , *ur10e*\ , or *ur16e*\ ).
23+
* ``ur_type`` (\ *mandatory* ) - a type of used UR robot (\ *ur3*\ , *ur3e*\ , *ur5*\ , *ur5e*\ , *ur10*\ , *ur10e*\ , or *ur16e*\ , *ur20*\ ).
2424
* ``robot_ip`` (\ *mandatory* ) - IP address by which the root can be reached.
2525
* ``use_fake_hardware`` (default: *false* ) - use simple hardware emulator from ros2_control.
2626
Useful for testing launch files, descriptions, etc. See explanation below.
@@ -106,7 +106,7 @@ For details on the Docker image, please see the more detailed guide :ref:`here <
106106
Example Commands for Testing the Driver
107107
---------------------------------------
108108

109-
Allowed UR - Type strings: ``ur3``\ , ``ur3e``\ , ``ur5``\ , ``ur5e``\ , ``ur10``\ , ``ur10e``\ , ``ur16e``.
109+
Allowed UR - Type strings: ``ur3``\ , ``ur3e``\ , ``ur5``\ , ``ur5e``\ , ``ur10``\ , ``ur10e``\ , ``ur16e``\ , ``ur20``.
110110

111111
1. Start hardware, simulator or mockup
112112
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Copyright (c) 2021 PickNik, Inc.
2+
#
3+
# Redistribution and use in source and binary forms, with or without
4+
# modification, are permitted provided that the following conditions are met:
5+
#
6+
# * Redistributions of source code must retain the above copyright
7+
# notice, this list of conditions and the following disclaimer.
8+
#
9+
# * Redistributions in binary form must reproduce the above copyright
10+
# notice, this list of conditions and the following disclaimer in the
11+
# documentation and/or other materials provided with the distribution.
12+
#
13+
# * Neither the name of the {copyright_holder} nor the names of its
14+
# contributors may be used to endorse or promote products derived from
15+
# this software without specific prior written permission.
16+
#
17+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27+
# POSSIBILITY OF SUCH DAMAGE.
28+
29+
#
30+
# Author: Denis Stogl
31+
32+
from launch import LaunchDescription
33+
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
34+
from launch.launch_description_sources import PythonLaunchDescriptionSource
35+
from launch.substitutions import LaunchConfiguration, ThisLaunchFileDir
36+
37+
38+
def generate_launch_description():
39+
# Declare arguments
40+
declared_arguments = []
41+
declared_arguments.append(
42+
DeclareLaunchArgument(
43+
"robot_ip",
44+
description="IP address by which the robot can be reached.",
45+
)
46+
)
47+
declared_arguments.append(
48+
DeclareLaunchArgument(
49+
"use_mock_hardware",
50+
default_value="false",
51+
description="Start robot with mock hardware mirroring command to its states.",
52+
)
53+
)
54+
declared_arguments.append(
55+
DeclareLaunchArgument(
56+
"mock_sensor_commands",
57+
default_value="false",
58+
description="Enable mock command interfaces for sensors used for simple simulations. \
59+
Used only if 'use_mock_hardware' parameter is true.",
60+
)
61+
)
62+
declared_arguments.append(
63+
DeclareLaunchArgument(
64+
"initial_joint_controller",
65+
default_value="scaled_joint_trajectory_controller",
66+
description="Initially loaded robot controller.",
67+
choices=[
68+
"scaled_joint_trajectory_controller",
69+
"joint_trajectory_controller",
70+
"forward_velocity_controller",
71+
"forward_position_controller",
72+
],
73+
)
74+
)
75+
declared_arguments.append(
76+
DeclareLaunchArgument(
77+
"activate_joint_controller",
78+
default_value="true",
79+
description="Activate loaded joint controller.",
80+
)
81+
)
82+
83+
# Initialize Arguments
84+
robot_ip = LaunchConfiguration("robot_ip")
85+
use_mock_hardware = LaunchConfiguration("use_mock_hardware")
86+
mock_sensor_commands = LaunchConfiguration("mock_sensor_commands")
87+
initial_joint_controller = LaunchConfiguration("initial_joint_controller")
88+
activate_joint_controller = LaunchConfiguration("activate_joint_controller")
89+
90+
base_launch = IncludeLaunchDescription(
91+
PythonLaunchDescriptionSource([ThisLaunchFileDir(), "/ur_control.launch.py"]),
92+
launch_arguments={
93+
"ur_type": "ur20",
94+
"robot_ip": robot_ip,
95+
"use_mock_hardware": use_mock_hardware,
96+
"mock_sensor_commands": mock_sensor_commands,
97+
"initial_joint_controller": initial_joint_controller,
98+
"activate_joint_controller": activate_joint_controller,
99+
}.items(),
100+
)
101+
102+
return LaunchDescription(declared_arguments + [base_launch])

ur_robot_driver/launch/ur_control.launch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def generate_launch_description():
373373
DeclareLaunchArgument(
374374
"ur_type",
375375
description="Type/series of used UR robot.",
376-
choices=["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e"],
376+
choices=["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e", "ur20"],
377377
)
378378
)
379379
declared_arguments.append(

ur_robot_driver/test/dashboard_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def generate_test_description():
6565
"ur_type",
6666
default_value="ur5e",
6767
description="Type/series of used UR robot.",
68-
choices=["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e"],
68+
choices=["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e", "ur20"],
6969
)
7070
)
7171

ur_robot_driver/test/robot_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def generate_test_description(tf_prefix):
8686
"ur_type",
8787
default_value="ur5e",
8888
description="Type/series of used UR robot.",
89-
choices=["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e"],
89+
choices=["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e", "ur20"],
9090
)
9191
)
9292

ur_robot_driver/test/urscript_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def generate_test_description():
7575
"ur_type",
7676
default_value="ur5e",
7777
description="Type/series of used UR robot.",
78-
choices=["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e"],
78+
choices=["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e", "ur20"],
7979
)
8080
)
8181

0 commit comments

Comments
 (0)