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

Update for new ur_moveit_config #31

Merged
merged 3 commits into from
Jun 11, 2024
Merged
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
38 changes: 15 additions & 23 deletions ur_simulation_gz/launch/ur_sim_moveit.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription, OpaqueFunction
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
from launch_ros.substitutions import FindPackageShare


Expand All @@ -44,13 +44,14 @@ def launch_setup(context, *args, **kwargs):
controllers_file = LaunchConfiguration("controllers_file")
description_package = LaunchConfiguration("description_package")
description_file = LaunchConfiguration("description_file")
moveit_config_package = LaunchConfiguration("moveit_config_package")
moveit_config_file = LaunchConfiguration("moveit_config_file")
moveit_launch_file = LaunchConfiguration("moveit_launch_file")
prefix = LaunchConfiguration("prefix")

ur_control_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
[FindPackageShare("ur_simulation_gz"), "/launch", "/ur_sim_control.launch.py"]
PathJoinSubstitution(
[FindPackageShare("ur_simulation_gz"), "launch", "ur_sim_control.launch.py"]
)
),
launch_arguments={
"ur_type": ur_type,
Expand All @@ -65,17 +66,9 @@ def launch_setup(context, *args, **kwargs):
)

ur_moveit_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
[FindPackageShare("ur_moveit_config"), "/launch", "/ur_moveit.launch.py"]
),
PythonLaunchDescriptionSource(moveit_launch_file),
launch_arguments={
"ur_type": ur_type,
"safety_limits": safety_limits,
"description_package": description_package,
"description_file": description_file,
"moveit_config_package": moveit_config_package,
"moveit_config_file": moveit_config_file,
"prefix": prefix,
"use_sim_time": "true",
"launch_rviz": "true",
}.items(),
Expand Down Expand Up @@ -140,19 +133,18 @@ def generate_launch_description():
)
declared_arguments.append(
DeclareLaunchArgument(
"moveit_config_package",
default_value="ur_moveit_config",
description="MoveIt config package with robot SRDF/XACRO files. Usually the argument "
"moveit_launch_file",
default_value=PathJoinSubstitution(
[
FindPackageShare("ur_moveit_config"),
"launch",
"ur_moveit.launch.py",
]
),
description="Absolute path for MoveIt launch file, part of a config package with robot SRDF/XACRO files. Usually the argument "
"is not set, it enables use of a custom moveit config.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"moveit_config_file",
default_value="ur.srdf.xacro",
description="MoveIt SRDF/XACRO description file with the robot.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"prefix",
Expand Down
Loading