From a1cc0ee6926cfcdf942ef88b45aa5e86908a1e60 Mon Sep 17 00:00:00 2001 From: PetoAdam Date: Wed, 18 Sep 2024 10:35:04 +0200 Subject: [PATCH] remove extra launch files --- .../launch/startup.launch.py | 13 +- .../launch/startup_standalone.launch.py | 110 -------------- .../launch/startup_with_rviz.launch.py | 13 +- .../startup_with_rviz_extended.launch.py | 140 ------------------ .../startup_with_rviz_standalone.launch.py | 128 ---------------- 5 files changed, 2 insertions(+), 402 deletions(-) delete mode 100644 examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup_standalone.launch.py delete mode 100644 examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup_with_rviz_extended.launch.py delete mode 100644 examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup_with_rviz_standalone.launch.py diff --git a/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup.launch.py b/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup.launch.py index 945d43d3..b1923306 100644 --- a/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup.launch.py +++ b/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup.launch.py @@ -16,11 +16,7 @@ from launch_ros.actions import Node from ament_index_python.packages import get_package_share_directory from moveit_configs_utils import MoveItConfigsBuilder -from launch.actions.include_launch_description import IncludeLaunchDescription from launch.actions import DeclareLaunchArgument, OpaqueFunction -from launch.launch_description_sources.python_launch_description_source import ( - PythonLaunchDescriptionSource, -) from launch.substitutions import LaunchConfiguration @@ -86,13 +82,6 @@ def launch_setup(context, *args, **kwargs): parameters=[moveit_config.to_dict(), move_group_capabilities], ) - startup_launch = IncludeLaunchDescription( - PythonLaunchDescriptionSource( - [get_package_share_directory("kuka_iiqka_eac_driver"), "/launch/startup.launch.py"] - ), - launch_arguments={"use_fake_hardware": "true"}.items(), - ) - # MTC Demo node mtc_demo = Node( package="kuka_moveit_task_constructor_depalletizing", @@ -103,7 +92,7 @@ def launch_setup(context, *args, **kwargs): ], ) - to_start = [move_group_server, startup_launch, mtc_demo] + to_start = [move_group_server, mtc_demo] return to_start diff --git a/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup_standalone.launch.py b/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup_standalone.launch.py deleted file mode 100644 index b1923306..00000000 --- a/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup_standalone.launch.py +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright 2024 Ádám Pető -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from launch import LaunchDescription -from launch_ros.actions import Node -from ament_index_python.packages import get_package_share_directory -from moveit_configs_utils import MoveItConfigsBuilder -from launch.actions import DeclareLaunchArgument, OpaqueFunction -from launch.substitutions import LaunchConfiguration - - -def launch_setup(context, *args, **kwargs): - robot_model = LaunchConfiguration("robot_model") - ns = LaunchConfiguration("namespace") - x = LaunchConfiguration("x") - y = LaunchConfiguration("y") - z = LaunchConfiguration("z") - roll = LaunchConfiguration("roll") - pitch = LaunchConfiguration("pitch") - yaw = LaunchConfiguration("yaw") - - if ns.perform(context) == "": - tf_prefix = "" - else: - tf_prefix = ns.perform(context) + "_" - - moveit_config = ( - MoveItConfigsBuilder("kuka_lbr_iisy") - .robot_description( - file_path=get_package_share_directory("kuka_lbr_iisy_support") - + f"/urdf/{robot_model.perform(context)}.urdf.xacro", - mappings={ - "x": x.perform(context), - "y": y.perform(context), - "z": z.perform(context), - "roll": roll.perform(context), - "pitch": pitch.perform(context), - "yaw": yaw.perform(context), - "prefix": tf_prefix, - }, - ) - .robot_description_semantic( - file_path=get_package_share_directory("kuka_lbr_iisy_moveit_config") - + f"/urdf/{robot_model.perform(context)}.srdf" - ) - .robot_description_kinematics( - file_path=get_package_share_directory("kuka_lbr_iisy_moveit_config") - + "/config/kinematics.yaml" - ) - .trajectory_execution( - file_path=get_package_share_directory("kuka_lbr_iisy_moveit_config") - + "/config/moveit_controllers.yaml" - ) - .planning_pipelines(pipelines=["ompl", "pilz_industrial_motion_planner"]) - .planning_scene_monitor( - publish_robot_description=True, publish_robot_description_semantic=True - ) - .joint_limits( - file_path=get_package_share_directory("kuka_lbr_iisy_support") - + f"/config/{robot_model.perform(context)}_joint_limits.yaml" - ) - .to_moveit_configs() - ) - - move_group_capabilities = {"capabilities": "move_group/ExecuteTaskSolutionCapability"} - - move_group_server = Node( - package="moveit_ros_move_group", - executable="move_group", - output="screen", - parameters=[moveit_config.to_dict(), move_group_capabilities], - ) - - # MTC Demo node - mtc_demo = Node( - package="kuka_moveit_task_constructor_depalletizing", - executable="kuka_moveit_task_constructor_depalletizing", - output="screen", - parameters=[ - moveit_config.to_dict(), - ], - ) - - to_start = [move_group_server, mtc_demo] - - return to_start - - -def generate_launch_description(): - launch_arguments = [] - launch_arguments.append(DeclareLaunchArgument("robot_model", default_value="lbr_iisy3_r760")) - launch_arguments.append(DeclareLaunchArgument("namespace", default_value="")) - launch_arguments.append(DeclareLaunchArgument("x", default_value="0")) - launch_arguments.append(DeclareLaunchArgument("y", default_value="0")) - launch_arguments.append(DeclareLaunchArgument("z", default_value="0")) - launch_arguments.append(DeclareLaunchArgument("roll", default_value="0")) - launch_arguments.append(DeclareLaunchArgument("pitch", default_value="0")) - launch_arguments.append(DeclareLaunchArgument("yaw", default_value="0")) - return LaunchDescription(launch_arguments + [OpaqueFunction(function=launch_setup)]) diff --git a/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup_with_rviz.launch.py b/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup_with_rviz.launch.py index d110a428..44500d00 100644 --- a/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup_with_rviz.launch.py +++ b/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup_with_rviz.launch.py @@ -16,11 +16,7 @@ from launch_ros.actions import Node from ament_index_python.packages import get_package_share_directory from moveit_configs_utils import MoveItConfigsBuilder -from launch.actions.include_launch_description import IncludeLaunchDescription from launch.actions import DeclareLaunchArgument, OpaqueFunction -from launch.launch_description_sources.python_launch_description_source import ( - PythonLaunchDescriptionSource, -) from launch.substitutions import LaunchConfiguration @@ -104,13 +100,6 @@ def launch_setup(context, *args, **kwargs): ], ) - startup_launch = IncludeLaunchDescription( - PythonLaunchDescriptionSource( - [get_package_share_directory("kuka_iiqka_eac_driver"), "/launch/startup.launch.py"] - ), - launch_arguments={"use_fake_hardware": "true"}.items(), - ) - # MTC Demo node mtc_demo = Node( package="kuka_moveit_task_constructor_depalletizing", @@ -121,7 +110,7 @@ def launch_setup(context, *args, **kwargs): ], ) - to_start = [move_group_server, rviz, startup_launch, mtc_demo] + to_start = [move_group_server, rviz, mtc_demo] return to_start diff --git a/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup_with_rviz_extended.launch.py b/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup_with_rviz_extended.launch.py deleted file mode 100644 index f122ccae..00000000 --- a/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup_with_rviz_extended.launch.py +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright 2024 Ádám Pető -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from launch import LaunchDescription -from launch_ros.actions import Node -from ament_index_python.packages import get_package_share_directory -from moveit_configs_utils import MoveItConfigsBuilder -from launch.actions.include_launch_description import IncludeLaunchDescription -from launch.actions import DeclareLaunchArgument, OpaqueFunction -from launch.launch_description_sources.python_launch_description_source import ( - PythonLaunchDescriptionSource, -) -from launch.substitutions import LaunchConfiguration - - -def launch_setup(context, *args, **kwargs): - robot_model = LaunchConfiguration("robot_model") - ns = LaunchConfiguration("namespace") - x = LaunchConfiguration("x") - y = LaunchConfiguration("y") - z = LaunchConfiguration("z") - roll = LaunchConfiguration("roll") - pitch = LaunchConfiguration("pitch") - yaw = LaunchConfiguration("yaw") - - if ns.perform(context) == "": - tf_prefix = "" - else: - tf_prefix = ns.perform(context) + "_" - - moveit_config = ( - MoveItConfigsBuilder("kuka_lbr_iisy") - .robot_description( - file_path=get_package_share_directory("kuka_lbr_iisy_support") - + f"/urdf/{robot_model.perform(context)}.urdf.xacro", - mappings={ - "x": x.perform(context), - "y": y.perform(context), - "z": z.perform(context), - "roll": roll.perform(context), - "pitch": pitch.perform(context), - "yaw": yaw.perform(context), - "prefix": tf_prefix, - }, - ) - .robot_description_semantic( - file_path=get_package_share_directory("kuka_lbr_iisy_moveit_config") - + f"/urdf/{robot_model.perform(context)}.srdf" - ) - .robot_description_kinematics( - file_path=get_package_share_directory("kuka_lbr_iisy_moveit_config") - + "/config/kinematics.yaml" - ) - .trajectory_execution( - file_path=get_package_share_directory("kuka_lbr_iisy_moveit_config") - + "/config/moveit_controllers.yaml" - ) - .planning_pipelines(pipelines=["ompl"]) - .planning_scene_monitor( - publish_robot_description=True, publish_robot_description_semantic=True - ) - .joint_limits( - file_path=get_package_share_directory("kuka_lbr_iisy_support") - + f"/config/{robot_model.perform(context)}_joint_limits.yaml" - ) - .to_moveit_configs() - ) - - rviz_config_file = ( - get_package_share_directory("kuka_moveit_task_constructor_depalletizing") - + "/rviz/mtc.rviz" - ) - - move_group_capabilities = {"capabilities": "move_group/ExecuteTaskSolutionCapability"} - - move_group_server = Node( - package="moveit_ros_move_group", - executable="move_group", - output="screen", - parameters=[moveit_config.to_dict(), move_group_capabilities], - ) - - rviz = Node( - package="rviz2", - executable="rviz2", - name="rviz2", - output="log", - arguments=["-d", rviz_config_file, "--ros-args", "--log-level", "error"], - parameters=[ - moveit_config.robot_description, - moveit_config.robot_description_semantic, - moveit_config.robot_description_kinematics, - moveit_config.planning_pipelines, - ], - ) - - startup_launch = IncludeLaunchDescription( - PythonLaunchDescriptionSource( - [get_package_share_directory("kuka_iiqka_eac_driver"), "/launch/startup.launch.py"] - ), - launch_arguments={"use_fake_hardware": "true"}.items(), - ) - - # MTC Demo node - mtc_demo = Node( - package="kuka_moveit_task_constructor_depalletizing", - executable="kuka_moveit_task_constructor_depalletizing", - output="screen", - parameters=[ - moveit_config.to_dict(), - ], - ) - - to_start = [move_group_server, rviz, startup_launch, mtc_demo] - - return to_start - - -def generate_launch_description(): - launch_arguments = [] - launch_arguments.append(DeclareLaunchArgument("robot_model", default_value="lbr_iisy3_r760")) - launch_arguments.append(DeclareLaunchArgument("namespace", default_value="")) - launch_arguments.append(DeclareLaunchArgument("x", default_value="0")) - launch_arguments.append(DeclareLaunchArgument("y", default_value="0")) - launch_arguments.append(DeclareLaunchArgument("z", default_value="0")) - launch_arguments.append(DeclareLaunchArgument("roll", default_value="0")) - launch_arguments.append(DeclareLaunchArgument("pitch", default_value="0")) - launch_arguments.append(DeclareLaunchArgument("yaw", default_value="0")) - return LaunchDescription(launch_arguments + [OpaqueFunction(function=launch_setup)]) diff --git a/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup_with_rviz_standalone.launch.py b/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup_with_rviz_standalone.launch.py deleted file mode 100644 index 44500d00..00000000 --- a/examples/iiqka_moveit_task_constructor_example/kuka_moveit_task_constructor/launch/startup_with_rviz_standalone.launch.py +++ /dev/null @@ -1,128 +0,0 @@ -# Copyright 2024 Ádám Pető -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from launch import LaunchDescription -from launch_ros.actions import Node -from ament_index_python.packages import get_package_share_directory -from moveit_configs_utils import MoveItConfigsBuilder -from launch.actions import DeclareLaunchArgument, OpaqueFunction -from launch.substitutions import LaunchConfiguration - - -def launch_setup(context, *args, **kwargs): - robot_model = LaunchConfiguration("robot_model") - ns = LaunchConfiguration("namespace") - x = LaunchConfiguration("x") - y = LaunchConfiguration("y") - z = LaunchConfiguration("z") - roll = LaunchConfiguration("roll") - pitch = LaunchConfiguration("pitch") - yaw = LaunchConfiguration("yaw") - - if ns.perform(context) == "": - tf_prefix = "" - else: - tf_prefix = ns.perform(context) + "_" - - moveit_config = ( - MoveItConfigsBuilder("kuka_lbr_iisy") - .robot_description( - file_path=get_package_share_directory("kuka_lbr_iisy_support") - + f"/urdf/{robot_model.perform(context)}.urdf.xacro", - mappings={ - "x": x.perform(context), - "y": y.perform(context), - "z": z.perform(context), - "roll": roll.perform(context), - "pitch": pitch.perform(context), - "yaw": yaw.perform(context), - "prefix": tf_prefix, - }, - ) - .robot_description_semantic( - file_path=get_package_share_directory("kuka_lbr_iisy_moveit_config") - + f"/urdf/{robot_model.perform(context)}.srdf" - ) - .robot_description_kinematics( - file_path=get_package_share_directory("kuka_lbr_iisy_moveit_config") - + "/config/kinematics.yaml" - ) - .trajectory_execution( - file_path=get_package_share_directory("kuka_lbr_iisy_moveit_config") - + "/config/moveit_controllers.yaml" - ) - .planning_pipelines(pipelines=["ompl"]) - .planning_scene_monitor( - publish_robot_description=True, publish_robot_description_semantic=True - ) - .joint_limits( - file_path=get_package_share_directory("kuka_lbr_iisy_support") - + f"/config/{robot_model.perform(context)}_joint_limits.yaml" - ) - .to_moveit_configs() - ) - - rviz_config_file = ( - get_package_share_directory("kuka_resources") + "/config/view_6_axis_planning_scene.rviz" - ) - - move_group_capabilities = {"capabilities": "move_group/ExecuteTaskSolutionCapability"} - - move_group_server = Node( - package="moveit_ros_move_group", - executable="move_group", - output="screen", - parameters=[moveit_config.to_dict(), move_group_capabilities], - ) - - rviz = Node( - package="rviz2", - executable="rviz2", - name="rviz2", - output="log", - arguments=["-d", rviz_config_file, "--ros-args", "--log-level", "error"], - parameters=[ - moveit_config.robot_description, - moveit_config.robot_description_semantic, - moveit_config.robot_description_kinematics, - moveit_config.planning_pipelines, - ], - ) - - # MTC Demo node - mtc_demo = Node( - package="kuka_moveit_task_constructor_depalletizing", - executable="kuka_moveit_task_constructor_depalletizing", - output="screen", - parameters=[ - moveit_config.to_dict(), - ], - ) - - to_start = [move_group_server, rviz, mtc_demo] - - return to_start - - -def generate_launch_description(): - launch_arguments = [] - launch_arguments.append(DeclareLaunchArgument("robot_model", default_value="lbr_iisy3_r760")) - launch_arguments.append(DeclareLaunchArgument("namespace", default_value="")) - launch_arguments.append(DeclareLaunchArgument("x", default_value="0")) - launch_arguments.append(DeclareLaunchArgument("y", default_value="0")) - launch_arguments.append(DeclareLaunchArgument("z", default_value="0")) - launch_arguments.append(DeclareLaunchArgument("roll", default_value="0")) - launch_arguments.append(DeclareLaunchArgument("pitch", default_value="0")) - launch_arguments.append(DeclareLaunchArgument("yaw", default_value="0")) - return LaunchDescription(launch_arguments + [OpaqueFunction(function=launch_setup)])