Skip to content

Commit 4be9606

Browse files
committed
Added option to publish SRDF file.
Added argument to the launch file that can toggle the ability to publish the contents of the SRDF on the topic /robot_description_semantic. This allows the launch file to be used with custom moveit2 projects without having to source the SRDF for every launched node.
1 parent 5c33085 commit 4be9606

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ur_moveit_config/launch/ur_moveit.launch.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def launch_setup(context, *args, **kwargs):
5252
# General arguments
5353
description_package = LaunchConfiguration("description_package")
5454
description_file = LaunchConfiguration("description_file")
55+
_publish_robot_description_semantic = LaunchConfiguration("publish_robot_description_semantic")
5556
moveit_config_package = LaunchConfiguration("moveit_config_package")
5657
moveit_joint_limits_file = LaunchConfiguration("moveit_joint_limits_file")
5758
moveit_config_file = LaunchConfiguration("moveit_config_file")
@@ -143,6 +144,8 @@ def launch_setup(context, *args, **kwargs):
143144
)
144145
robot_description_semantic = {"robot_description_semantic": robot_description_semantic_content}
145146

147+
publish_robot_description_semantic = {"publish_robot_description_semantic": _publish_robot_description_semantic}
148+
146149
robot_description_kinematics = PathJoinSubstitution(
147150
[FindPackageShare(moveit_config_package), "config", "kinematics.yaml"]
148151
)
@@ -205,6 +208,7 @@ def launch_setup(context, *args, **kwargs):
205208
parameters=[
206209
robot_description,
207210
robot_description_semantic,
211+
publish_robot_description_semantic,
208212
robot_description_kinematics,
209213
robot_description_planning,
210214
ompl_planning_pipeline_config,
@@ -312,6 +316,13 @@ def generate_launch_description():
312316
description="URDF/XACRO description file with the robot.",
313317
)
314318
)
319+
declared_arguments.append(
320+
DeclareLaunchArgument(
321+
"publish_robot_description_semantic",
322+
default_value="False",
323+
description="Whether to publish the SRDF description on topic /robot_description_semantic."
324+
)
325+
)
315326
declared_arguments.append(
316327
DeclareLaunchArgument(
317328
"moveit_config_package",

0 commit comments

Comments
 (0)