Skip to content

Commit 9ee21dd

Browse files
urfeexmergify[bot]
authored andcommitted
Add support for UR7e and UR12e (#1320)
(cherry picked from commit d168696) # Conflicts: # ur_moveit_config/launch/ur_moveit.launch.py # ur_robot_driver/launch/ur_control.launch.py # ur_robot_driver/launch/ur_rsp.launch.py # ur_robot_driver/urdf/ur.urdf.xacro
1 parent 5059942 commit 9ee21dd

File tree

9 files changed

+856
-4
lines changed

9 files changed

+856
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ For getting started, you'll basically need three steps:
117117
details.
118118

119119
```bash
120-
# Replace ur5e with one of ur3, ur3e, ur5, ur5e, ur10, ur10e, ur16e, ur20, ur30
120+
# Replace ur5e with one of ur3, ur3e, ur5, ur5e, ur7e, ur10, ur10e, ur12e, ur16e, ur20, ur30
121121
# Replace the IP address with the IP address of your actual robot / URSim
122122
ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=192.168.56.101
123123
```

ur_moveit_config/launch/ur_moveit.launch.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def launch_setup(context, *args, **kwargs):
8181

8282
robot_description_content = Command(
8383
[
84+
<<<<<<< HEAD
8485
PathJoinSubstitution([FindExecutable(name="xacro")]),
8586
" ",
8687
PathJoinSubstitution([FindPackageShare(description_package), "urdf", description_file]),
@@ -123,6 +124,44 @@ def launch_setup(context, *args, **kwargs):
123124
"prefix:=",
124125
prefix,
125126
" ",
127+
=======
128+
DeclareLaunchArgument("launch_rviz", default_value="true", description="Launch RViz?"),
129+
DeclareLaunchArgument(
130+
"ur_type",
131+
description="Typo/series of used UR robot.",
132+
choices=[
133+
"ur3",
134+
"ur3e",
135+
"ur5",
136+
"ur5e",
137+
"ur7e",
138+
"ur10",
139+
"ur10e",
140+
"ur12e",
141+
"ur16e",
142+
"ur20",
143+
"ur30",
144+
],
145+
),
146+
DeclareLaunchArgument(
147+
"warehouse_sqlite_path",
148+
default_value=os.path.expanduser("~/.ros/warehouse_ros.sqlite"),
149+
description="Path where the warehouse database should be stored",
150+
),
151+
DeclareLaunchArgument(
152+
"launch_servo", default_value="false", description="Launch Servo?"
153+
),
154+
DeclareLaunchArgument(
155+
"use_sim_time",
156+
default_value="false",
157+
description="Using or not time from simulation",
158+
),
159+
DeclareLaunchArgument(
160+
"publish_robot_description_semantic",
161+
default_value="true",
162+
description="MoveGroup publishes robot description semantic",
163+
),
164+
>>>>>>> d168696 (Add support for UR7e and UR12e (#1320))
126165
]
127166
)
128167
robot_description = {"robot_description": robot_description_content}

ur_robot_driver/doc/usage/startup.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ nodes for UR robots. The only required arguments are the ``ur_type`` and ``robot
2222
2323
$ ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=192.168.56.101
2424
25-
Allowed ``ur_type`` strings: ``ur3``, ``ur3e``, ``ur5``, ``ur5e``, ``ur10``, ``ur10e``, ``ur16e``,
26-
``ur20``, ``ur30``.
25+
Allowed ``ur_type`` strings: ``ur3``, ``ur3e``, ``ur5``, ``ur5e``, ``ur7e``, ``ur10``, ``ur10e``,
26+
``ur12e``, ``ur16e``, ``ur20``, ``ur30``.
2727

2828
Other important arguments are:
2929

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Copyright (c) 2025 Universal Robots A/S
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+
from launch import LaunchDescription
30+
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
31+
from launch.launch_description_sources import PythonLaunchDescriptionSource
32+
from launch.substitutions import LaunchConfiguration, ThisLaunchFileDir
33+
34+
35+
def generate_launch_description():
36+
# Declare arguments
37+
declared_arguments = []
38+
declared_arguments.append(
39+
DeclareLaunchArgument(
40+
"robot_ip",
41+
description="IP address by which the robot can be reached.",
42+
)
43+
)
44+
declared_arguments.append(
45+
DeclareLaunchArgument(
46+
"use_mock_hardware",
47+
default_value="false",
48+
description="Start robot with mock hardware mirroring command to its states.",
49+
)
50+
)
51+
declared_arguments.append(
52+
DeclareLaunchArgument(
53+
"mock_sensor_commands",
54+
default_value="false",
55+
description="Enable mock command interfaces for sensors used for simple simulations. "
56+
"Used only if 'use_mock_hardware' parameter is true.",
57+
)
58+
)
59+
declared_arguments.append(
60+
DeclareLaunchArgument(
61+
"initial_joint_controller",
62+
default_value="scaled_joint_trajectory_controller",
63+
description="Initially loaded robot controller.",
64+
choices=[
65+
"scaled_joint_trajectory_controller",
66+
"joint_trajectory_controller",
67+
"forward_velocity_controller",
68+
"forward_position_controller",
69+
"freedrive_mode_controller",
70+
"passthrough_trajectory_controller",
71+
],
72+
)
73+
)
74+
declared_arguments.append(
75+
DeclareLaunchArgument(
76+
"activate_joint_controller",
77+
default_value="true",
78+
description="Activate loaded joint controller.",
79+
)
80+
)
81+
82+
# Initialize Arguments
83+
robot_ip = LaunchConfiguration("robot_ip")
84+
use_mock_hardware = LaunchConfiguration("use_mock_hardware")
85+
mock_sensor_commands = LaunchConfiguration("mock_sensor_commands")
86+
initial_joint_controller = LaunchConfiguration("initial_joint_controller")
87+
activate_joint_controller = LaunchConfiguration("activate_joint_controller")
88+
89+
base_launch = IncludeLaunchDescription(
90+
PythonLaunchDescriptionSource([ThisLaunchFileDir(), "/ur_control.launch.py"]),
91+
launch_arguments={
92+
"ur_type": "ur12e",
93+
"robot_ip": robot_ip,
94+
"use_mock_hardware": use_mock_hardware,
95+
"mock_sensor_commands": mock_sensor_commands,
96+
"initial_joint_controller": initial_joint_controller,
97+
"activate_joint_controller": activate_joint_controller,
98+
}.items(),
99+
)
100+
101+
return LaunchDescription(declared_arguments + [base_launch])
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Copyright (c) 2025 Universal Robots A/S
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+
from launch import LaunchDescription
30+
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
31+
from launch.launch_description_sources import PythonLaunchDescriptionSource
32+
from launch.substitutions import LaunchConfiguration, ThisLaunchFileDir
33+
34+
35+
def generate_launch_description():
36+
# Declare arguments
37+
declared_arguments = []
38+
declared_arguments.append(
39+
DeclareLaunchArgument(
40+
"robot_ip",
41+
description="IP address by which the robot can be reached.",
42+
)
43+
)
44+
declared_arguments.append(
45+
DeclareLaunchArgument(
46+
"use_mock_hardware",
47+
default_value="false",
48+
description="Start robot with mock hardware mirroring command to its states.",
49+
)
50+
)
51+
declared_arguments.append(
52+
DeclareLaunchArgument(
53+
"mock_sensor_commands",
54+
default_value="false",
55+
description="Enable mock command interfaces for sensors used for simple simulations. "
56+
"Used only if 'use_mock_hardware' parameter is true.",
57+
)
58+
)
59+
declared_arguments.append(
60+
DeclareLaunchArgument(
61+
"initial_joint_controller",
62+
default_value="scaled_joint_trajectory_controller",
63+
description="Initially loaded robot controller.",
64+
choices=[
65+
"scaled_joint_trajectory_controller",
66+
"joint_trajectory_controller",
67+
"forward_velocity_controller",
68+
"forward_position_controller",
69+
"freedrive_mode_controller",
70+
"passthrough_trajectory_controller",
71+
],
72+
)
73+
)
74+
declared_arguments.append(
75+
DeclareLaunchArgument(
76+
"activate_joint_controller",
77+
default_value="true",
78+
description="Activate loaded joint controller.",
79+
)
80+
)
81+
82+
# Initialize Arguments
83+
robot_ip = LaunchConfiguration("robot_ip")
84+
use_mock_hardware = LaunchConfiguration("use_mock_hardware")
85+
mock_sensor_commands = LaunchConfiguration("mock_sensor_commands")
86+
initial_joint_controller = LaunchConfiguration("initial_joint_controller")
87+
activate_joint_controller = LaunchConfiguration("activate_joint_controller")
88+
89+
base_launch = IncludeLaunchDescription(
90+
PythonLaunchDescriptionSource([ThisLaunchFileDir(), "/ur_control.launch.py"]),
91+
launch_arguments={
92+
"ur_type": "ur7e",
93+
"robot_ip": robot_ip,
94+
"use_mock_hardware": use_mock_hardware,
95+
"mock_sensor_commands": mock_sensor_commands,
96+
"initial_joint_controller": initial_joint_controller,
97+
"activate_joint_controller": activate_joint_controller,
98+
}.items(),
99+
)
100+
101+
return LaunchDescription(declared_arguments + [base_launch])

ur_robot_driver/launch/ur_control.launch.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,23 @@ def generate_launch_description():
395395
DeclareLaunchArgument(
396396
"ur_type",
397397
description="Type/series of used UR robot.",
398+
<<<<<<< HEAD
398399
choices=["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e", "ur20", "ur30"],
400+
=======
401+
choices=[
402+
"ur3",
403+
"ur3e",
404+
"ur5",
405+
"ur5e",
406+
"ur7e",
407+
"ur10",
408+
"ur10e",
409+
"ur12e",
410+
"ur16e",
411+
"ur20",
412+
"ur30",
413+
],
414+
>>>>>>> d168696 (Add support for UR7e and UR12e (#1320))
399415
)
400416
)
401417
declared_arguments.append(

0 commit comments

Comments
 (0)