@@ -33,29 +33,25 @@ You should see the above window displaying a manipulator robot surrounded by obs
In the third terminal, you should see the message "Method solveBiRRT is not implemented yet". Open file +script/motion_planner.py+ in a text editor. The message is produced by method +solveBiRRT+ of class +MotionPlanner+.
Exercise 1
----------
Before starting
---------------
In file +script/motion_planner.py+, remove instruction
[source,python]
----
print ("Method solveBiRRT is not implemented yet")
----
and implement RRT algorithm between markers
[source,python]
----
#### RRT begin
All classes and functions are implemented by the remote process +hppcorbaserver+ called a +server+.
Instructions in python terminal trigger computation on the server side that stores some objects.
The server stores a +roadmap+ composed of nodes and of edges. Nodes contain
configurations. Edges contain paths. The roadmap can be extended using methods
#### RRT end
----
* +ps.addConfigToRoadmap+,
* +ps.addEdgeToRoadmap+.
TIP: All classes and functions are implemented by the remote process +hppcorbaserver+ called a +server+.
Instructions in python terminal trigger computation on the server side that stores some objects.
Those objects, mainly +paths+, +roadmap+ can be accessed using the methods described at the end of this page.
Calls to method +ps.directPath+ creates a new path between two configurations. This path is stored in a vector on the server side and can be accessed by the
index in the vector.
See Section "Some useful methods" below.
Displaying a configuration or a path
-----------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
While running, your RRT algorithm will produce configurations and paths to store in the roadmap
edges. To display a configuration +q+ in the viewer, use
[source,python]
...
...
@@ -76,7 +72,7 @@ pp (pid)
----
Hint
----
~~~~
You can use methods of objects +robot+ and +ps+. To get the list of these
methods with documentation, type in the python terminal
<divclass="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><spanstyle="font-weight: bold"><spanstyle="color: #0000FF">print</span></span><spanstyle="color: #990000">(</span><spanstyle="color: #FF0000">"Method solveBiRRT is not implemented yet"</span><spanstyle="color: #990000">)</span></tt></pre></div></div>
<divclass="paragraph"><p>and implement RRT algorithm between markers</p></div>
<divclass="paragraph"><p>All classes and functions are implemented by the remote process <code>hppcorbaserver</code> called a <code>server</code>.
Instructions in python terminal trigger computation on the server side that stores some objects.
The server stores a <code>roadmap</code> composed of nodes and of edges. Nodes contain
configurations. Edges contain paths. The roadmap can be extended using methods</p></div>
<divclass="ulist"><ul>
<li>
<p>
<code>ps.addConfigToRoadmap</code>,
</p>
</li>
<li>
<p>
<code>ps.addEdgeToRoadmap</code>.
</p>
</li>
</ul></div>
<divclass="paragraph"><p>Calls to method <code>ps.directPath</code> creates a new path between two configurations. This path is stored in a vector on the server side and can be accessed by the
<spanstyle="font-style: italic"><spanstyle="color: #9A1900"># return: length of the path</span></span>
<spanstyle="font-style: italic"><spanstyle="color: #9A1900"># return: length of the path. The interval of definition of the path starts at</span></span>
<spanstyle="font-style: italic"><spanstyle="color: #9A1900"># 0 and ends at the path length.</span></span>