Skip to content

Commit

Permalink
add arguments to launch file templates (moveit#1397)
Browse files Browse the repository at this point in the history
* add arguments to launch file templates

If one has an installed moveit_config package, there should be enough
arguments, to use move_group.launch. Otherwise every user of the robot
would have to fork the robot package.

This commit adds some options that allow an application package to build
onto a robot's moveit_config:

* load_robot_description - if set to false, one can load a modified
  robot model that contains e.g. additional fixed objects
* pipeline - allows to choose between different planning pipelines
  (minimal version of moveit#1025)
* rviz config_file - path to config file is way more flexible than
  defaulting to an empty setting. Especially since the
  `save config as default` option was dropped in RViz.

* rename argument to rviz_config

* add rviz_config argument to MIGRATION.md

* Update MIGRATION.md

Co-Authored-By: jschleicher <j.schleicher@pilz.de>
  • Loading branch information
jschleicher authored and rhaschke committed May 11, 2019
1 parent 620e6b2 commit d9c6a83
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<launch>

<!-- specify the planning pipeline -->
<arg name="pipeline" default="ompl" />

<!-- By default, we do not start a database (it can be large) -->
<arg name="db" default="false" />
<!-- Allow user to specify database location -->
Expand Down Expand Up @@ -41,11 +44,12 @@
<arg name="fake_execution" value="true"/>
<arg name="info" value="true"/>
<arg name="debug" value="$(arg debug)"/>
<arg name="pipeline" value="$(arg pipeline)"/>
</include>

<!-- Run Rviz and load the default config to see the state of the move_group node -->
<include file="$(find [GENERATED_PACKAGE_NAME])/launch/moveit_rviz.launch">
<arg name="config" value="true"/>
<arg name="rviz_config" value="$(find [GENERATED_PACKAGE_NAME])/launch/moveit.rviz"/>
<arg name="debug" value="$(arg debug)"/>
</include>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<launch>

<include file="$(find [GENERATED_PACKAGE_NAME])/launch/planning_context.launch" />

<!-- GDB Debug Option -->
<arg name="debug" default="false" />
<arg unless="$(arg debug)" name="launch_prefix" value="" />
Expand All @@ -14,6 +12,7 @@
<arg if="$(arg info)" name="command_args" value="--debug" />

<!-- move_group settings -->
<arg name="pipeline" default="ompl" />
<arg name="allow_trajectory_execution" default="true"/>
<arg name="fake_execution" default="false"/>
<arg name="max_safe_path_cost" default="1"/>
Expand All @@ -38,9 +37,15 @@
" />
-->

<arg name="load_robot_description" default="true" />
<!-- load URDF, SRDF and joint_limits configuration -->
<include file="$(find [GENERATED_PACKAGE_NAME])/launch/planning_context.launch">
<arg name="load_robot_description" value="$(arg load_robot_description)" />
</include>

<!-- Planning Functionality -->
<include ns="move_group" file="$(find [GENERATED_PACKAGE_NAME])/launch/planning_pipeline.launch.xml">
<arg name="pipeline" value="ompl" />
<arg name="pipeline" value="$(arg pipeline)" />
</include>

<!-- Trajectory Execution Functionality -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<arg unless="$(arg debug)" name="launch_prefix" value="" />
<arg if="$(arg debug)" name="launch_prefix" value="gdb --ex run --args" />

<arg name="config" default="false" />
<arg unless="$(arg config)" name="command_args" value="" />
<arg if="$(arg config)" name="command_args" value="-d $(find [GENERATED_PACKAGE_NAME])/launch/moveit.rviz" />
<arg name="rviz_config" default="" />
<arg if="$(eval rviz_config=='')" name="command_args" value="" />
<arg unless="$(eval rviz_config=='')" name="command_args" value="-d $(arg rviz_config)" />

<node name="$(anon rviz)" launch-prefix="$(arg launch_prefix)" pkg="rviz" type="rviz" respawn="false"
args="$(arg command_args)" output="screen">
Expand Down

0 comments on commit d9c6a83

Please sign in to comment.