48 """Launch file for rviz"""
49 ld = LaunchDescription()
53 DeclareLaunchArgument(
55 default_value=str(moveit_config.package_path /
"config/moveit.rviz"),
60 moveit_config.planning_pipelines,
61 moveit_config.robot_description_kinematics,
62 moveit_config.joint_limits,
71 arguments=[
"-d", LaunchConfiguration(
"rviz_config")],
72 parameters=rviz_parameters,
120 controller_names = moveit_config.trajectory_execution.get(
121 "moveit_simple_controller_manager", {}
122 ).get(
"controller_names", [])
123 ld = LaunchDescription()
125 ros2_controllers_path = moveit_config.package_path /
"config/ros2_controllers.yaml"
127 [
"--param-file", str(ros2_controllers_path)]
128 if ros2_controllers_path.exists()
133 if controller_manager_timeout
is not None:
135 "--controller-manager-timeout",
136 str(controller_manager_timeout),
138 for controller
in controller_names + [
"joint_state_broadcaster"]:
141 package=
"controller_manager",
142 executable=
"spawner",
143 arguments=[controller] + spawner_args,
151 """Launch file for warehouse database"""
152 ld = LaunchDescription()
154 DeclareLaunchArgument(
155 "moveit_warehouse_database_path",
157 moveit_config.package_path /
"default_warehouse_mongo_db"
164 ld.add_action(DeclareLaunchArgument(
"moveit_warehouse_port", default_value=
"33829"))
168 DeclareLaunchArgument(
"moveit_warehouse_host", default_value=
"localhost")
175 "database_path": LaunchConfiguration(
"moveit_warehouse_database_path"),
176 "warehouse_port": LaunchConfiguration(
"moveit_warehouse_port"),
177 "warehouse_host": LaunchConfiguration(
"moveit_warehouse_host"),
178 "warehouse_exec":
"mongod",
179 "warehouse_plugin":
"warehouse_ros_mongo::MongoDatabaseConnection",
184 package=
"warehouse_ros_mongo",
185 executable=
"mongo_wrapper_ros.py",
188 parameters=db_parameters,
190 ld.add_action(db_node)
194 package=
"moveit_ros_warehouse",
195 executable=
"moveit_init_demo_warehouse",
197 condition=IfCondition(LaunchConfiguration(
"reset")),
199 ld.add_action(reset_node)
205 ld = LaunchDescription()
216 DeclareLaunchArgument(
218 default_value=moveit_config.move_group_capabilities[
"capabilities"],
223 DeclareLaunchArgument(
224 "disable_capabilities",
225 default_value=moveit_config.move_group_capabilities[
"disable_capabilities"],
233 should_publish = LaunchConfiguration(
"publish_monitored_planning_scene")
235 move_group_configuration = {
236 "publish_robot_description_semantic":
True,
237 "allow_trajectory_execution": LaunchConfiguration(
"allow_trajectory_execution"),
239 "capabilities": ParameterValue(
240 LaunchConfiguration(
"capabilities"), value_type=str
242 "disable_capabilities": ParameterValue(
243 LaunchConfiguration(
"disable_capabilities"), value_type=str
246 "publish_planning_scene": should_publish,
247 "publish_geometry_updates": should_publish,
248 "publish_state_updates": should_publish,
249 "publish_transforms_updates": should_publish,
250 "monitor_dynamics":
False,
253 move_group_params = [
254 moveit_config.to_dict(),
255 move_group_configuration,
260 package=
"moveit_ros_move_group",
261 executable=
"move_group",
262 commands_file=str(moveit_config.package_path /
"launch" /
"gdb_settings.gdb"),
264 parameters=move_group_params,
265 extra_debug_args=[
"--debug"],
267 additional_env={
"DISPLAY": os.environ.get(
"DISPLAY",
"")},
274 Launches a self contained demo
276 launch_package_path is optional to use different launch and config packages
279 * static_virtual_joint_tfs
280 * robot_state_publisher
283 * warehouse_db (optional)
284 * ros2_control_node + controller spawners
286 if launch_package_path ==
None:
287 launch_package_path = moveit_config.package_path
289 ld = LaunchDescription()
294 description=
"By default, we do not start a database (it can be large)",
301 description=
"By default, we are not in debug mode",
306 virtual_joints_launch = (
307 launch_package_path /
"launch/static_virtual_joint_tfs.launch.py"
310 if virtual_joints_launch.exists():
312 IncludeLaunchDescription(
313 PythonLaunchDescriptionSource(str(virtual_joints_launch)),
319 IncludeLaunchDescription(
320 PythonLaunchDescriptionSource(
321 str(launch_package_path /
"launch/rsp.launch.py")
327 IncludeLaunchDescription(
328 PythonLaunchDescriptionSource(
329 str(launch_package_path /
"launch/move_group.launch.py")
336 IncludeLaunchDescription(
337 PythonLaunchDescriptionSource(
338 str(launch_package_path /
"launch/moveit_rviz.launch.py")
340 condition=IfCondition(LaunchConfiguration(
"use_rviz")),
346 IncludeLaunchDescription(
347 PythonLaunchDescriptionSource(
348 str(launch_package_path /
"launch/warehouse_db.launch.py")
350 condition=IfCondition(LaunchConfiguration(
"db")),
357 package=
"controller_manager",
358 executable=
"ros2_control_node",
360 str(moveit_config.package_path /
"config/ros2_controllers.yaml"),
363 (
"/controller_manager/robot_description",
"/robot_description"),
369 IncludeLaunchDescription(
370 PythonLaunchDescriptionSource(
371 str(launch_package_path /
"launch/spawn_controllers.launch.py")