Skip to content

Commit 4823ab1

Browse files
committed
Update tutorial
1 parent d4015a7 commit 4823ab1

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

doc/examples/motion_planning_api/launch/motion_planning_api_tutorial.launch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def generate_launch_description():
4848
"moveit_resources_panda_moveit_config", "config/ompl_planning.yaml"
4949
)
5050

51-
planning_plugin = {"planning_plugin": "ompl_interface/OMPLPlanner"}
51+
planning_plugins = {"planning_plugins": ["ompl_interface/OMPLPlanner"]}
5252

5353
return LaunchDescription(
5454
[
@@ -61,7 +61,7 @@ def generate_launch_description():
6161
robot_description_semantic,
6262
kinematics_yaml,
6363
planning_yaml,
64-
planning_plugin,
64+
planning_plugins,
6565
],
6666
)
6767
]

doc/examples/motion_planning_api/src/motion_planning_api_tutorial.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ int main(int argc, char** argv)
9494
// Note that we are using the ROS pluginlib library here.
9595
std::unique_ptr<pluginlib::ClassLoader<planning_interface::PlannerManager>> planner_plugin_loader;
9696
planning_interface::PlannerManagerPtr planner_instance;
97-
std::string planner_plugin_name;
97+
std::vector<std::string> planner_plugin_names;
9898

9999
// We will get the name of planning plugin we want to load
100100
// from the ROS parameter server, and then load the planner
101101
// making sure to catch all exceptions.
102-
if (!motion_planning_api_tutorial_node->get_parameter("planning_plugin", planner_plugin_name))
102+
if (!motion_planning_api_tutorial_node->get_parameter("planning_plugin", planner_plugin_names))
103103
RCLCPP_FATAL(LOGGER, "Could not find planner plugin name");
104104
try
105105
{
@@ -112,7 +112,7 @@ int main(int argc, char** argv)
112112
}
113113
try
114114
{
115-
planner_instance.reset(planner_plugin_loader->createUnmanagedInstance(planner_plugin_name));
115+
planner_instance.reset(planner_plugin_loader->createUnmanagedInstance(planner_plugin_names.at(0)));
116116
if (!planner_instance->initialize(robot_model, motion_planning_api_tutorial_node,
117117
motion_planning_api_tutorial_node->get_namespace()))
118118
RCLCPP_FATAL(LOGGER, "Could not initialize planner instance");
@@ -124,8 +124,8 @@ int main(int argc, char** argv)
124124
std::stringstream ss;
125125
for (const auto& cls : classes)
126126
ss << cls << " ";
127-
RCLCPP_ERROR(LOGGER, "Exception while loading planner '%s': %s\nAvailable plugins: %s", planner_plugin_name.c_str(),
128-
ex.what(), ss.str().c_str());
127+
RCLCPP_ERROR(LOGGER, "Exception while loading planner '%s': %s\nAvailable plugins: %s",
128+
planner_plugin_names.at(0).c_str(), ex.what(), ss.str().c_str());
129129
}
130130

131131
moveit::planning_interface::MoveGroupInterface move_group(motion_planning_api_tutorial_node, PLANNING_GROUP);

doc/how_to_guides/pilz_industrial_motion_planner/pilz_industrial_motion_planner.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ Using the planner
299299
The *pilz_industrial_motion_planner::CommandPlanner* is provided as a MoveIt Motion Planning
300300
Pipeline and, therefore, can be used with all other manipulators using
301301
MoveIt. Loading the plugin requires the param
302-
``/move_group/<pipeline_name>/planning_plugin`` to be set to ``pilz_industrial_motion_planner/CommandPlanner``
302+
``/move_group/<pipeline_name>/planning_plugins`` to be set to ``[pilz_industrial_motion_planner/CommandPlanner]``
303303
before the ``move_group`` node is started.
304304
For example, the `panda_moveit_config package
305305
<https://github.com/ros-planning/moveit_resources/blob/ros2/panda_moveit_config>`_
@@ -308,7 +308,7 @@ has a ``pilz_industrial_motion_planner`` pipeline set up as follows:
308308

309309
::
310310

311-
ros2 param get /move_group pilz_industrial_motion_planner.planning_plugin
311+
ros2 param get /move_group pilz_industrial_motion_planner.planning_plugins
312312

313313
String value is: pilz_industrial_motion_planner/CommandPlanner
314314

doc/how_to_guides/stomp_planner/stomp_planner.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Using STOMP with Your Robot
3131

3232
#. Simply add the `stomp_planning.yaml <https://github.com/ros-planning/moveit_resources/blob/ros2/panda_moveit_config/config/stomp_planning.yaml>`__ configuration file into the config directory of your MoveIt config package. It contains the plugin identifier, a planning pipeline adapter list, and the STOMP planning parameters. The config file should look like example below: ::
3333

34-
planning_plugin:
34+
planning_plugins:
3535
- stomp_moveit/StompPlanner
3636
request_adapters:
3737
- default_planning_request_adapters/ResolveConstraintFrames

0 commit comments

Comments
 (0)