41 robot_description_config = xacro.process_file(
43 get_package_share_directory(
"moveit_resources_prbt_support"),
48 robot_description = {
"robot_description": robot_description_config.toxml()}
50 robot_description_semantic_config = xacro.process_file(
52 get_package_share_directory(
"moveit_resources_prbt_moveit_config"),
58 robot_description_semantic = {
59 "robot_description_semantic": robot_description_semantic_config.toxml()
62 joint_limits_yaml = load_yaml(
63 "moveit_resources_prbt_moveit_config",
"config/joint_limits.yaml"
65 pilz_cartesian_limits_yaml = load_yaml(
66 "moveit_resources_prbt_moveit_config",
"config/pilz_cartesian_limits.yaml"
68 robot_description_planning = {
69 "robot_description_planning": {
71 **pilz_cartesian_limits_yaml,
74 kinematics_yaml = load_yaml(
75 "moveit_resources_prbt_moveit_config",
"config/kinematics.yaml"
77 robot_description_kinematics = {
"robot_description_kinematics": kinematics_yaml}
80 planning_pipelines_config = {
81 "default_planning_pipeline":
"ompl",
82 "planning_pipelines": [
"pilz",
"ompl"],
84 "planning_plugins": [
"pilz_industrial_motion_planner/CommandPlanner"],
87 "planning_plugins": [
"ompl_interface/OMPLPlanner"],
89 "default_planning_request_adapters/ResolveConstraintFrames",
90 "default_planning_request_adapters/ValidateWorkspaceBounds",
91 "default_planning_request_adapters/CheckStartStateBounds",
92 "default_planning_request_adapters/CheckStartStateCollision",
94 "response_adapters": [
95 "default_planning_response_adapters/AddTimeOptimalParameterization",
96 "default_planning_response_adapters/ValidateSolution",
100 ompl_planning_yaml = load_yaml(
101 "moveit_resources_prbt_moveit_config",
"config/ompl_planning.yaml"
103 planning_pipelines_config[
"ompl"].update(ompl_planning_yaml)
106 moveit_simple_controllers_yaml = load_yaml(
107 "moveit_resources_prbt_moveit_config",
"config/prbt_controllers.yaml"
109 moveit_controllers = {
110 "moveit_simple_controller_manager": moveit_simple_controllers_yaml,
111 "moveit_controller_manager":
"moveit_simple_controller_manager/MoveItSimpleControllerManager",
114 trajectory_execution = {
115 "moveit_manage_controllers":
True,
116 "trajectory_execution.allowed_execution_duration_scaling": 1.2,
117 "trajectory_execution.allowed_goal_duration_margin": 0.5,
118 "trajectory_execution.allowed_start_tolerance": 0.01,
121 planning_scene_monitor_parameters = {
122 "publish_planning_scene":
True,
123 "publish_geometry_updates":
True,
124 "publish_state_updates":
True,
125 "publish_transforms_updates":
True,
129 run_move_group_node = Node(
130 package=
"moveit_ros_move_group",
131 executable=
"move_group",
135 robot_description_semantic,
136 robot_description_kinematics,
137 robot_description_planning,
138 planning_pipelines_config,
139 trajectory_execution,
141 planning_scene_monitor_parameters,
146 rviz_base = os.path.join(
147 get_package_share_directory(
"moveit_resources_prbt_moveit_config"),
"launch"
149 rviz_full_config = os.path.join(rviz_base,
"moveit.rviz")
155 arguments=[
"-d", rviz_full_config],
158 robot_description_semantic,
159 robot_description_planning,
160 robot_description_kinematics,
161 planning_pipelines_config,
168 executable=
"static_transform_publisher",
169 name=
"static_transform_publisher",
171 arguments=[
"0.0",
"0.0",
"0.0",
"0.0",
"0.0",
"0.0",
"world",
"prbt_link0"],
175 robot_state_publisher = Node(
176 package=
"robot_state_publisher",
177 executable=
"robot_state_publisher",
178 name=
"robot_state_publisher",
180 parameters=[robot_description],
184 ros2_controllers_path = os.path.join(
185 get_package_share_directory(
"moveit_resources_prbt_moveit_config"),
187 "prbt_ros_controllers.yaml",
189 ros2_control_node = Node(
190 package=
"controller_manager",
191 executable=
"ros2_control_node",
192 parameters=[ros2_controllers_path],
194 (
"/controller_manager/robot_description",
"/robot_description"),
199 joint_state_broadcaster_spawner = Node(
200 package=
"controller_manager",
201 executable=
"spawner",
203 "joint_state_broadcaster",
204 "--controller-manager",
205 "/controller_manager",
209 prbt_arm_controller_spawner = Node(
210 package=
"controller_manager",
211 executable=
"spawner",
213 "panda_joint_group_position_controller",
215 "/controller_manager",
220 mongodb_server_node = Node(
221 package=
"warehouse_ros_mongo",
222 executable=
"mongo_wrapper_ros.py",
224 {
"warehouse_port": 33829},
225 {
"warehouse_host":
"localhost"},
226 {
"warehouse_plugin":
"warehouse_ros_mongo::MongoDatabaseConnection"},
231 return LaunchDescription(
235 robot_state_publisher,
238 joint_state_broadcaster_spawner,
239 prbt_arm_controller_spawner,