Skip to content

Commit

Permalink
Keep only stubs for pymp; The rest should keep docstrings in *.py files
Browse files Browse the repository at this point in the history
  • Loading branch information
KolinGuo committed Jan 15, 2024
1 parent 8c7c75f commit 1d27108
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 280 deletions.
4 changes: 2 additions & 2 deletions dev/generate_stub_and_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ docker run -it --rm \

echo_info "Removing previous stubs under 'mplib/'"
find mplib -name "*.pyi" -exec rm -v {} \;
echo_info "Moving generated stubs into 'mplib/'"
mv -v stubs/mplib/* mplib
echo_info "Moving generated stubs into 'mplib/pymp'"
mv -v stubs/mplib/pymp mplib
echo_info "Removing 'stubs/'"
rm -rfv stubs/

Expand Down
14 changes: 7 additions & 7 deletions docs/mplib/planner.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ <h1 class="modulename">
</span><span id="L-28"><a href="#L-28"><span class="linenos"> 28</span></a> <span class="n">joint_acc_limits</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">Sequence</span><span class="p">[</span><span class="nb">float</span><span class="p">],</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">]</span> <span class="o">=</span> <span class="p">[],</span>
</span><span id="L-29"><a href="#L-29"><span class="linenos"> 29</span></a> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
</span><span id="L-30"><a href="#L-30"><span class="linenos"> 30</span></a> <span class="p">):</span>
</span><span id="L-31"><a href="#L-31"><span class="linenos"> 31</span></a><span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Motion planner for robots.</span>
</span><span id="L-31"><a href="#L-31"><span class="linenos"> 31</span></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Motion planner for robots.</span>
</span><span id="L-32"><a href="#L-32"><span class="linenos"> 32</span></a>
</span><span id="L-33"><a href="#L-33"><span class="linenos"> 33</span></a><span class="sd"> Args:</span>
</span><span id="L-34"><a href="#L-34"><span class="linenos"> 34</span></a><span class="sd"> urdf: Unified Robot Description Format file.</span>
Expand Down Expand Up @@ -1040,7 +1040,7 @@ <h1 class="modulename">
</span><span id="Planner-29"><a href="#Planner-29"><span class="linenos"> 29</span></a> <span class="n">joint_acc_limits</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">Sequence</span><span class="p">[</span><span class="nb">float</span><span class="p">],</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">]</span> <span class="o">=</span> <span class="p">[],</span>
</span><span id="Planner-30"><a href="#Planner-30"><span class="linenos"> 30</span></a> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
</span><span id="Planner-31"><a href="#Planner-31"><span class="linenos"> 31</span></a> <span class="p">):</span>
</span><span id="Planner-32"><a href="#Planner-32"><span class="linenos"> 32</span></a><span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Motion planner for robots.</span>
</span><span id="Planner-32"><a href="#Planner-32"><span class="linenos"> 32</span></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Motion planner for robots.</span>
</span><span id="Planner-33"><a href="#Planner-33"><span class="linenos"> 33</span></a>
</span><span id="Planner-34"><a href="#Planner-34"><span class="linenos"> 34</span></a><span class="sd"> Args:</span>
</span><span id="Planner-35"><a href="#Planner-35"><span class="linenos"> 35</span></a><span class="sd"> urdf: Unified Robot Description Format file.</span>
Expand Down Expand Up @@ -1857,7 +1857,7 @@ <h1 class="modulename">
<input id="Planner.__init__-view-source" class="view-source-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<div class="attr function">

<span class="name">Planner</span><span class="signature pdoc-code multiline">(<span class="param"> <span class="n">urdf</span><span class="p">:</span> <span class="nb">str</span>,</span><span class="param"> <span class="n">move_group</span><span class="p">:</span> <span class="nb">str</span>,</span><span class="param"> <span class="n">srdf</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span>,</span><span class="param"> <span class="n">package_keyword_replacement</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span>,</span><span class="param"> <span class="n">user_link_names</span><span class="p">:</span> <span class="n">Sequence</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span>,</span><span class="param"> <span class="n">user_joint_names</span><span class="p">:</span> <span class="n">Sequence</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span>,</span><span class="param"> <span class="n">joint_vel_limits</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">Sequence</span><span class="p">[</span><span class="nb">float</span><span class="p">],</span> <span class="n">numpy</span><span class="o">.</span><span class="n">ndarray</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span>,</span><span class="param"> <span class="n">joint_acc_limits</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">Sequence</span><span class="p">[</span><span class="nb">float</span><span class="p">],</span> <span class="n">numpy</span><span class="o">.</span><span class="n">ndarray</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span>,</span><span class="param"> <span class="o">**</span><span class="n">kwargs</span></span>)</span>
<span class="name">Planner</span><span class="signature pdoc-code multiline">(<span class="param"> <span class="n">urdf</span><span class="p">:</span> <span class="nb">str</span>,</span><span class="param"> <span class="n">move_group</span><span class="p">:</span> <span class="nb">str</span>,</span><span class="param"> <span class="n">srdf</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span>,</span><span class="param"> <span class="n">package_keyword_replacement</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span>,</span><span class="param"> <span class="n">user_link_names</span><span class="p">:</span> <span class="n">Sequence</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="bp">Ellipsis</span>,</span><span class="param"> <span class="n">user_joint_names</span><span class="p">:</span> <span class="n">Sequence</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="bp">Ellipsis</span>,</span><span class="param"> <span class="n">joint_vel_limits</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">Sequence</span><span class="p">[</span><span class="nb">float</span><span class="p">],</span> <span class="n">numpy</span><span class="o">.</span><span class="n">ndarray</span><span class="p">]</span> <span class="o">=</span> <span class="bp">Ellipsis</span>,</span><span class="param"> <span class="n">joint_acc_limits</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">Sequence</span><span class="p">[</span><span class="nb">float</span><span class="p">],</span> <span class="n">numpy</span><span class="o">.</span><span class="n">ndarray</span><span class="p">]</span> <span class="o">=</span> <span class="bp">Ellipsis</span>,</span><span class="param"> <span class="o">**</span><span class="n">kwargs</span></span>)</span>

<label class="view-source-button" for="Planner.__init__-view-source"><span>View Source</span></label>

Expand All @@ -1875,7 +1875,7 @@ <h1 class="modulename">
</span><span id="Planner.__init__-29"><a href="#Planner.__init__-29"><span class="linenos"> 29</span></a> <span class="n">joint_acc_limits</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">Sequence</span><span class="p">[</span><span class="nb">float</span><span class="p">],</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">]</span> <span class="o">=</span> <span class="p">[],</span>
</span><span id="Planner.__init__-30"><a href="#Planner.__init__-30"><span class="linenos"> 30</span></a> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
</span><span id="Planner.__init__-31"><a href="#Planner.__init__-31"><span class="linenos"> 31</span></a> <span class="p">):</span>
</span><span id="Planner.__init__-32"><a href="#Planner.__init__-32"><span class="linenos"> 32</span></a><span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Motion planner for robots.</span>
</span><span id="Planner.__init__-32"><a href="#Planner.__init__-32"><span class="linenos"> 32</span></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Motion planner for robots.</span>
</span><span id="Planner.__init__-33"><a href="#Planner.__init__-33"><span class="linenos"> 33</span></a>
</span><span id="Planner.__init__-34"><a href="#Planner.__init__-34"><span class="linenos"> 34</span></a><span class="sd"> Args:</span>
</span><span id="Planner.__init__-35"><a href="#Planner.__init__-35"><span class="linenos"> 35</span></a><span class="sd"> urdf: Unified Robot Description Format file.</span>
Expand Down Expand Up @@ -2560,7 +2560,7 @@ <h1 class="modulename">
<div class="attr function">

<span class="def">def</span>
<span class="name">IK</span><span class="signature pdoc-code multiline">(<span class="param"> <span class="bp">self</span>,</span><span class="param"> <span class="n">goal_pose</span>,</span><span class="param"> <span class="n">start_qpos</span>,</span><span class="param"> <span class="n">mask</span><span class="o">=</span><span class="p">[]</span>,</span><span class="param"> <span class="n">n_init_qpos</span><span class="o">=</span><span class="mi">20</span>,</span><span class="param"> <span class="n">threshold</span><span class="o">=</span><span class="mf">0.001</span></span><span class="return-annotation">):</span></span>
<span class="name">IK</span><span class="signature pdoc-code multiline">(<span class="param"> <span class="bp">self</span>,</span><span class="param"> <span class="n">goal_pose</span>,</span><span class="param"> <span class="n">start_qpos</span>,</span><span class="param"> <span class="n">mask</span><span class="o">=</span><span class="bp">Ellipsis</span>,</span><span class="param"> <span class="n">n_init_qpos</span><span class="o">=</span><span class="mi">20</span>,</span><span class="param"> <span class="n">threshold</span><span class="o">=</span><span class="mf">0.001</span></span><span class="return-annotation">):</span></span>

<label class="view-source-button" for="Planner.IK-view-source"><span>View Source</span></label>

Expand Down Expand Up @@ -2932,7 +2932,7 @@ <h1 class="modulename">
<div class="attr function">

<span class="def">def</span>
<span class="name">plan_qpos_to_qpos</span><span class="signature pdoc-code multiline">(<span class="param"> <span class="bp">self</span>,</span><span class="param"> <span class="n">goal_qposes</span><span class="p">:</span> <span class="nb">list</span>,</span><span class="param"> <span class="n">current_qpos</span>,</span><span class="param"> <span class="n">time_step</span><span class="o">=</span><span class="mf">0.1</span>,</span><span class="param"> <span class="n">rrt_range</span><span class="o">=</span><span class="mf">0.1</span>,</span><span class="param"> <span class="n">planning_time</span><span class="o">=</span><span class="mi">1</span>,</span><span class="param"> <span class="n">fix_joint_limits</span><span class="o">=</span><span class="kc">True</span>,</span><span class="param"> <span class="n">use_point_cloud</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">use_attach</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">verbose</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">planner_name</span><span class="o">=</span><span class="s1">&#39;RRTConnect&#39;</span>,</span><span class="param"> <span class="n">no_simplification</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">constraint_function</span><span class="o">=</span><span class="kc">None</span>,</span><span class="param"> <span class="n">constraint_jacobian</span><span class="o">=</span><span class="kc">None</span>,</span><span class="param"> <span class="n">constraint_tolerance</span><span class="o">=</span><span class="mf">0.001</span>,</span><span class="param"> <span class="n">fixed_joint_indices</span><span class="o">=</span><span class="p">[]</span></span><span class="return-annotation">):</span></span>
<span class="name">plan_qpos_to_qpos</span><span class="signature pdoc-code multiline">(<span class="param"> <span class="bp">self</span>,</span><span class="param"> <span class="n">goal_qposes</span><span class="p">:</span> <span class="nb">list</span>,</span><span class="param"> <span class="n">current_qpos</span>,</span><span class="param"> <span class="n">time_step</span><span class="o">=</span><span class="mf">0.1</span>,</span><span class="param"> <span class="n">rrt_range</span><span class="o">=</span><span class="mf">0.1</span>,</span><span class="param"> <span class="n">planning_time</span><span class="o">=</span><span class="mi">1</span>,</span><span class="param"> <span class="n">fix_joint_limits</span><span class="o">=</span><span class="kc">True</span>,</span><span class="param"> <span class="n">use_point_cloud</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">use_attach</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">verbose</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">planner_name</span><span class="o">=</span><span class="s1">&#39;RRTConnect&#39;</span>,</span><span class="param"> <span class="n">no_simplification</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">constraint_function</span><span class="o">=</span><span class="kc">None</span>,</span><span class="param"> <span class="n">constraint_jacobian</span><span class="o">=</span><span class="kc">None</span>,</span><span class="param"> <span class="n">constraint_tolerance</span><span class="o">=</span><span class="mf">0.001</span>,</span><span class="param"> <span class="n">fixed_joint_indices</span><span class="o">=</span><span class="bp">Ellipsis</span></span><span class="return-annotation">):</span></span>

<label class="view-source-button" for="Planner.plan_qpos_to_qpos-view-source"><span>View Source</span></label>

Expand Down Expand Up @@ -3070,7 +3070,7 @@ <h1 class="modulename">
<div class="attr function">

<span class="def">def</span>
<span class="name">plan_qpos_to_pose</span><span class="signature pdoc-code multiline">(<span class="param"> <span class="bp">self</span>,</span><span class="param"> <span class="n">goal_pose</span>,</span><span class="param"> <span class="n">current_qpos</span>,</span><span class="param"> <span class="n">mask</span><span class="o">=</span><span class="p">[]</span>,</span><span class="param"> <span class="n">time_step</span><span class="o">=</span><span class="mf">0.1</span>,</span><span class="param"> <span class="n">rrt_range</span><span class="o">=</span><span class="mf">0.1</span>,</span><span class="param"> <span class="n">planning_time</span><span class="o">=</span><span class="mi">1</span>,</span><span class="param"> <span class="n">fix_joint_limits</span><span class="o">=</span><span class="kc">True</span>,</span><span class="param"> <span class="n">use_point_cloud</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">use_attach</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">verbose</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">wrt_world</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">planner_name</span><span class="o">=</span><span class="s1">&#39;RRTConnect&#39;</span>,</span><span class="param"> <span class="n">no_simplification</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">constraint_function</span><span class="o">=</span><span class="kc">None</span>,</span><span class="param"> <span class="n">constraint_jacobian</span><span class="o">=</span><span class="kc">None</span>,</span><span class="param"> <span class="n">constraint_tolerance</span><span class="o">=</span><span class="mf">0.001</span></span><span class="return-annotation">):</span></span>
<span class="name">plan_qpos_to_pose</span><span class="signature pdoc-code multiline">(<span class="param"> <span class="bp">self</span>,</span><span class="param"> <span class="n">goal_pose</span>,</span><span class="param"> <span class="n">current_qpos</span>,</span><span class="param"> <span class="n">mask</span><span class="o">=</span><span class="bp">Ellipsis</span>,</span><span class="param"> <span class="n">time_step</span><span class="o">=</span><span class="mf">0.1</span>,</span><span class="param"> <span class="n">rrt_range</span><span class="o">=</span><span class="mf">0.1</span>,</span><span class="param"> <span class="n">planning_time</span><span class="o">=</span><span class="mi">1</span>,</span><span class="param"> <span class="n">fix_joint_limits</span><span class="o">=</span><span class="kc">True</span>,</span><span class="param"> <span class="n">use_point_cloud</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">use_attach</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">verbose</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">wrt_world</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">planner_name</span><span class="o">=</span><span class="s1">&#39;RRTConnect&#39;</span>,</span><span class="param"> <span class="n">no_simplification</span><span class="o">=</span><span class="kc">False</span>,</span><span class="param"> <span class="n">constraint_function</span><span class="o">=</span><span class="kc">None</span>,</span><span class="param"> <span class="n">constraint_jacobian</span><span class="o">=</span><span class="kc">None</span>,</span><span class="param"> <span class="n">constraint_tolerance</span><span class="o">=</span><span class="mf">0.001</span></span><span class="return-annotation">):</span></span>

<label class="view-source-button" for="Planner.plan_qpos_to_pose-view-source"><span>View Source</span></label>

Expand Down
Loading

0 comments on commit 1d27108

Please sign in to comment.