5 from launch.actions
import ExecuteProcess, TimerAction
6 from launch.some_substitutions_type
import SomeSubstitutionsType
7 from launch.substitutions
import LaunchConfiguration, PathJoinSubstitution
8 from launch_ros.actions
import Node
9 from ament_index_python.packages
import get_package_share_directory
10 from moveit_configs_utils
import MoveItConfigsBuilder
16 .robot_description(file_path=
"config/panda.urdf.xacro")
17 .trajectory_execution(file_path=
"config/gripper_moveit_controllers.yaml")
21 moveit_config.planning_pipelines[
"ompl"][
"panda_arm"][
22 "enforce_constrained_state_space"
24 moveit_config.planning_pipelines[
"ompl"][
"panda_arm"][
25 "projection_evaluator"
26 ] =
"joints(panda_joint1,panda_joint2)"
29 run_move_group_node = Node(
30 package=
"moveit_ros_move_group",
31 executable=
"move_group",
33 parameters=[moveit_config.to_dict()],
39 executable=
"static_transform_publisher",
40 name=
"static_transform_publisher",
42 arguments=[
"0.0",
"0.0",
"0.0",
"0.0",
"0.0",
"0.0",
"world",
"panda_link0"],
46 robot_state_publisher = Node(
47 package=
"robot_state_publisher",
48 executable=
"robot_state_publisher",
49 name=
"robot_state_publisher",
51 parameters=[moveit_config.robot_description],
55 ros2_controllers_path = os.path.join(
58 "ros2_controllers.yaml",
60 ros2_control_node = Node(
61 package=
"controller_manager",
62 executable=
"ros2_control_node",
63 parameters=[moveit_config.robot_description, ros2_controllers_path],
67 joint_state_broadcaster_spawner = Node(
68 package=
"controller_manager",
71 "joint_state_broadcaster",
72 "--controller-manager",
73 "/controller_manager",
77 panda_arm_controller_spawner = Node(
78 package=
"controller_manager",
80 arguments=[
"panda_arm_controller",
"-c",
"/controller_manager"],
83 panda_hand_controller_spawner = Node(
84 package=
"controller_manager",
86 arguments=[
"panda_hand_controller",
"-c",
"/controller_manager"],
90 ompl_constraint_test = launch_ros.actions.Node(
91 executable=PathJoinSubstitution(
92 [LaunchConfiguration(
"test_binary_dir"), gtest_name]
95 moveit_config.robot_description,
96 moveit_config.robot_description_semantic,
97 moveit_config.robot_description_kinematics,
102 return launch.LaunchDescription(
104 launch.actions.DeclareLaunchArgument(
105 name=
"test_binary_dir",
106 description=
"Binary directory of package "
107 "containing test executables",
111 robot_state_publisher,
113 joint_state_broadcaster_spawner,
114 panda_arm_controller_spawner,
115 panda_hand_controller_spawner,
116 TimerAction(period=2.0, actions=[ompl_constraint_test]),
117 launch_testing.actions.ReadyToTest(),
120 "run_move_group_node": run_move_group_node,
121 "static_tf": static_tf,
122 "robot_state_publisher": robot_state_publisher,
123 "ros2_control_node": ros2_control_node,
124 "ompl_constraint_test": ompl_constraint_test,
def get_package_share_directory(pkg_name)
def generate_move_group_test_description(*args, SomeSubstitutionsType gtest_name)