You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/examples/motion_planning_python_api/motion_planning_python_api_tutorial.rst
+20-13Lines changed: 20 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ Motion Planning Python API
5
5
6
6
<iframewidth="560"height="315"src="https://www.youtube.com/embed/7KvF7Dj7bz0"title="YouTube video player"frameborder="0"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"allowfullscreen></iframe>
7
7
8
-
In this tutorial we cover the basics of the motion planning API for ``moveit_py``.
8
+
In this tutorial, we will cover the basics of the motion planning API for ``moveit_py``.
9
9
This tutorial is broken down into the following sections:
10
10
11
11
* **Getting Started:** An outline of the tutorial setup requirements.
@@ -93,7 +93,7 @@ An example of such a configuration file is given below: ::
93
93
planning_time: 1.5
94
94
95
95
96
-
The first block of the configuration file sets the planning scene monitor options such as the topics that it subsribes to (Note: if you aren't familiar with the planning scene monitor, you should consider reviewing ... ): ::
96
+
The first block of the configuration file sets the planning scene monitor options such as the topics that it subscribes to (Note: if you aren't familiar with the planning scene monitor, consider reviewing :doc:`this tutorial </doc/examples/planning_scene_monitor/planning_scene_monitor_tutorial>` ): ::
97
97
98
98
planning_scene_monitor_options:
99
99
name: "planning_scene_monitor"
@@ -104,7 +104,9 @@ The first block of the configuration file sets the planning scene monitor option
The second block of the configuration file sets the planning pipelines that we wish to use. MoveIt supports multiple motion planning libraries including OMPL, PILZ industrial motion planner, Stochastic Trajectory Optimization for Motion Planning (STOMP), Search-Based Planning Library (SBPL) and Covariant Hamiltonian Optimization for Motion Planning (CHOMP) to name a few. When configuring our ``moveit_py`` node, we need to specify the configuration for planning pipelines we wish to use: ::
107
+
The second block of the configuration file sets the planning pipelines that we wish to use.
108
+
MoveIt supports multiple motion planning libraries including OMPL, Pilz Industrial Motion Planner, Stochastic Trajectory Optimization for Motion Planning (STOMP), Search-Based Planning Library (SBPL), and Covariant Hamiltonian Optimization for Motion Planning (CHOMP) to name a few.
109
+
When configuring our ``moveit_py`` node, we need to specify the configuration for planning pipelines we wish to use: ::
@@ -146,11 +148,13 @@ For each of these named pipelines we must provide a configuration that identifie
146
148
max_acceleration_scaling_factor: 1.0
147
149
planning_time: 1.5
148
150
149
-
These specified parameters will be made available as ``moveit_py`` node parameters and will be leveraged at runtime when performing planning. This is what we will investigate next.
151
+
These specified parameters will be made available as ``moveit_py`` node parameters and will be leveraged at runtime when performing planning.
Before we can plan motions we need to instantiate a ``moveit_py`` node and its derived planning component. We will also instantiate a rclpy logger object: ::
156
+
Before we can plan motions, we need to instantiate a ``moveit_py`` node and its derived planning component.
157
+
We will also instantiate a ``rclpy`` logger object: ::
Using the planning component represented by the ``panda_arm`` variable we can begin to perform motion planning. We also define a helper function for planning and executing motions: ::
167
+
Using the planning component represented by the ``panda_arm`` variable, we can begin to perform motion planning.
168
+
We also define a helper function for planning and executing motions: ::
164
169
165
170
def plan_and_execute(
166
171
robot,
@@ -206,8 +211,9 @@ We start exploring the ``moveit_py`` motion planning API through executing a sin
Such a method is quite flexible as we can alter the robot state configuration as we wish (e.g. through setting joint values), here we will just set the robot state to a random configuration for simplicity. We will use the ``set_start_state_to_current_state`` method to set the start state of the robot to its current state and the ``set_goal_state`` method to set the goal state of the robot.
214
+
Next, we will plan to a robot state.
215
+
Such a method is quite flexible as we can alter the robot state configuration as we wish (e.g., through setting joint values).
216
+
Here, we will use the ``set_start_state_to_current_state`` method to set the start state of the robot to its current state and the ``set_goal_state`` method to set the goal state to a random configuration.
211
217
We will then plan to the goal state and execute the plan: ::
212
218
213
219
# instantiate a RobotState instance using the current robot model
@@ -249,7 +255,8 @@ Here we demonstrate how to set a pose goal for the end effector of the robot: ::
You can also control the output of motion planning via custom constraints. Here we demonstrate planning to a configuration that satisfies a set of joint constraints: ::
258
+
You can also control the output of motion planning via custom constraints.
259
+
Here we demonstrate planning to a configuration that satisfies a set of joint constraints: ::
253
260
254
261
# set plan start state to current state
255
262
panda_arm.set_start_state_to_current_state()
@@ -310,13 +317,13 @@ The code for this section requires you to run a different Python file, which you
Copy file name to clipboardExpand all lines: doc/tutorials/getting_started/getting_started.rst
+21-11Lines changed: 21 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,27 @@
1
1
Getting Started
2
2
===============
3
3
4
-
Here we will setup your environment for best running the tutorials. This will create a Colcon workspace, download all of the latest MoveIt source code, and build everything from source to ensure you have the latest fixes and improvements.
4
+
Here, we will setup your environment for best running the tutorials.
5
+
This will create a colcon workspace, download all of the latest MoveIt source code, and build everything from source to ensure you have the latest fixes and improvements.
5
6
6
-
Building all the source code of MoveIt can take 20-30 minutes, depending on the CPU speed and available RAM of your computer. If you are on a less performant system, or generally just want to get started quicker, checkout our :doc:`Docker Guide </doc/how_to_guides/how_to_setup_docker_containers_in_ubuntu>`.
7
+
Building all the source code of MoveIt can take 20-30 minutes, depending on the CPU speed and available RAM of your computer.
8
+
If you are on a less performant system, or generally just want to get started quicker, check out our :doc:`Docker Guide </doc/how_to_guides/how_to_setup_docker_containers_in_ubuntu>`.
7
9
8
-
Install ROS 2 and Colcon
10
+
Install ROS 2 and colcon
9
11
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10
12
MoveIt 2 currently supports multiple versions of ROS.
11
13
Install whichever version you prefer.
12
14
We primarily support ROS installed Ubuntu 22.04 but other methods and platforms may work with small changes to the instructions listed below.
13
-
If you are just getting started we would recommend you use the latest stable version of ROS (Iron) on Ubuntu 22.04 for the most seamless experience.
15
+
If you are just getting started, we recommend you use the latest stable version of ROS (Iron) on Ubuntu 22.04 for the most seamless experience.
14
16
15
17
* `Rolling Ridley <https://docs.ros.org/en/rolling/Installation.html>`_ - Rolling Development Release
* `Humble Hawksbill<https://docs.ros.org/en/humble/Installation.html>`_ - LTS Release - May 2022
18
20
19
-
It is easy to miss steps when going through the ROS 2 installation tutorial. If you run into errors in the next few steps, a good place to start is to go back and make sure you have installed ROS 2 correctly. One that users commonly forget is to source the ROS 2 install itself. Note to source the version of ROS you installed. ::
21
+
It is easy to miss steps when going through the ROS 2 installation tutorial.
22
+
If you run into errors in the next few steps, a good place to start is to go back and make sure you have installed ROS 2 correctly.
23
+
One that users commonly forget is to source the ROS 2 install itself.
24
+
Note to source the version of ROS you installed. ::
20
25
21
26
source /opt/ros/iron/setup.bash
22
27
@@ -61,11 +66,13 @@ Next we will download the source code for the rest of MoveIt: ::
The import command may ask for your GitHub credentials. You can just press Enter until it moves on (ignore the "Authentication failed" error).
69
+
The import command may ask for your GitHub credentials.
70
+
You can just press Enter until it moves on (ignore the "Authentication failed" error).
65
71
66
72
Build your Colcon Workspace
67
73
^^^^^^^^^^^^^^^^^^^^^^^^^^^
68
-
The following will install from Debian any package dependencies not already in your workspace. This is the step that will install MoveIt and all of its dependencies: ::
74
+
The following will install from Debian any package dependencies not already in your workspace.
75
+
This is the step that will install MoveIt and all of its dependencies: ::
@@ -102,12 +109,15 @@ Optional: add the previous command to your ``.bashrc``: ::
102
109
Switch to Cyclone DDS
103
110
^^^^^^^^^^^^^^^^^^^^^
104
111
105
-
As of Sep 26, 2022, the default ROS 2 middleware (RMW) implementation has an issue. As a workaround, switch to Cyclone DDS. (Note: this makes all nodes started using this RMW incompatible with any other nodes not using Cyclone DDS.) ::
112
+
As of Sep 26, 2022, the default ROS 2 middleware (RMW) implementation has an issue.
113
+
As a workaround, switch to Cyclone DDS.
114
+
(Note: this makes all nodes started using this RMW incompatible with any other nodes not using Cyclone DDS.) ::
106
115
107
116
sudo apt install ros-rolling-rmw-cyclonedds-cpp
108
117
# You may want to add this to ~/.bashrc to source it automatically
109
118
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
110
119
111
120
Next Step
112
121
^^^^^^^^^
113
-
Nice job! Next we will :doc:`Visualize a robot with the interactive motion planning plugin for RViz </doc/tutorials/quickstart_in_rviz/quickstart_in_rviz_tutorial>`
122
+
Nice job!
123
+
Next, we will :doc:`Visualize a robot with the interactive motion planning plugin for RViz </doc/tutorials/quickstart_in_rviz/quickstart_in_rviz_tutorial>`
0 commit comments