Skip to content

Commit f4c09a6

Browse files
authored
Merge pull request #270 from SimonRohou/codac2_dev
Updated manual + Ctc py binding
2 parents d628b85 + bd2328a commit f4c09a6

39 files changed

Lines changed: 1100 additions & 562 deletions

doc/manual/_static/css/custom.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,8 @@ dl.cpp:not(dl.cpp dl.cpp) { /* for displaying a border on doxygen blocks */
146146

147147
#how-to-cite-codac pre {
148148
font-size: 60%;
149+
}
150+
151+
a .download:before {
152+
content: "⬇️ ";
149153
}

doc/manual/conf.py.in

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ extensions = [
2020
'sphinx.ext.mathjax',
2121
'sphinx_tabs.tabs',
2222
'breathe',
23+
'sphinx_togglebutton',
2324
]
2425

2526
templates_path = ['_templates']
@@ -60,6 +61,7 @@ html_theme_options = {
6061
"color-link--visited": "var(--color-link)",
6162

6263
"header-height": "2rem",
64+
"admonition-font-size": "100%",
6365
},
6466

6567
"dark_css_variables": {
@@ -79,6 +81,7 @@ html_theme_options = {
7981
"color-link--hover": "#77C8F6",
8082

8183
"header-height": "2rem",
84+
"admonition-font-size": "100%",
8285
},
8386

8487
"announcement": "You are currently reading the new Codac documentation, which is currently in preparation. <a href=\"http://codac.io\">See the v1 website</a>.",
@@ -94,4 +97,7 @@ mathjax3_config = {
9497

9598
breathe_projects = {
9699
"codac": "../api/xml"
97-
}
100+
}
101+
102+
togglebutton_hint = "<strong style=\"color: #009945;\">Reveal the solution.</strong>"
103+
togglebutton_hint_hide = "Hide the solution"

doc/manual/development/info_dev.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To build this manual using Sphinx, follow these steps:
1212

1313
.. code-block:: bash
1414
15-
pip install sphinx sphinx_rtd_theme furo sphinx-math-dollar sphinx_tabs breathe
15+
pip install sphinx sphinx_rtd_theme furo sphinx-math-dollar sphinx_tabs breathe sphinx_togglebutton
1616
1717
2. **Building the manual**: After configuring the CMake project, the manual can be build with:
1818

doc/manual/index.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ User manual
242242
* CtcInverseNotIn
243243
* Geometric contractors
244244
* :ref:`sec-ctc-geom-ctcdist`
245-
* CtcPolar
245+
* :ref:`sec-ctc-geom-ctcpolar`
246246
* CtcSegment
247247
* CtcPolygon
248248
* CtcPointCloud
@@ -435,6 +435,14 @@ Development
435435
.. howto/dynamical/index.rst
436436
437437
438+
.. toctree::
439+
:hidden:
440+
:caption: Tutorial
441+
:maxdepth: 3
442+
443+
tuto/cp_robotics/index.rst
444+
445+
438446
.. toctree::
439447
:hidden:
440448
:caption: Development
26.6 KB
Loading
27.9 KB
Loading
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
.. _sec-ctc-geom-ctcpolar:
2+
3+
The CtcPolar contractor
4+
=======================
5+
6+
Main authors: Benoît Desrochers, `Simon Rohou <https://www.simon-rohou.fr/research/>`_
7+
8+
.. image:: ctcpolar_scheme.png
9+
:alt: Illustration of the polar constraint
10+
:align: right
11+
:width: 290px
12+
13+
.. doxygenclass:: codac2::CtcPolar
14+
:project: codac
15+
16+
Methods
17+
-------
18+
19+
.. doxygenfunction:: codac2::CtcPolar::contract(IntervalVector&) const
20+
:project: codac
21+
22+
.. tabs::
23+
24+
.. group-tab:: Python
25+
26+
.. literalinclude:: src.py
27+
:language: py
28+
:start-after: [ctcpolar-1-beg]
29+
:end-before: [ctcpolar-1-end]
30+
:dedent: 4
31+
32+
.. group-tab:: C++
33+
34+
.. literalinclude:: src.cpp
35+
:language: c++
36+
:start-after: [ctcpolar-1-beg]
37+
:end-before: [ctcpolar-1-end]
38+
:dedent: 4
39+
40+
.. doxygenfunction:: codac2::CtcPolar::contract(Interval&,Interval&,Interval&,Interval&) const
41+
:project: codac
42+
43+
.. tabs::
44+
45+
.. group-tab:: Python
46+
47+
.. literalinclude:: src.py
48+
:language: py
49+
:start-after: [ctcpolar-2-beg]
50+
:end-before: [ctcpolar-2-end]
51+
:dedent: 4
52+
53+
.. group-tab:: C++
54+
55+
.. literalinclude:: src.cpp
56+
:language: c++
57+
:start-after: [ctcpolar-2-beg]
58+
:end-before: [ctcpolar-2-end]
59+
:dedent: 4
60+
61+
62+
.. figure:: ./CtcPolar.png
63+
64+
Illustration of several contracted boxes and pies with the ``CtcPolar`` contractor. The blue boxes :math:`[x^i]\times[y^i]` have been contracted as well as the pies :math:`[\rho^i]\times[\theta^i]`. The above script examples are displayed in this figure.
65+
66+
67+
Related content
68+
---------------
69+
70+
.. |polar-pdf| replace:: **Download the paper**
71+
.. _polar-pdf: https://www.ensta-bretagne.fr/jaulin/paper_polar.pdf
72+
73+
.. admonition:: Related publication
74+
75+
| **A Minimal contractor for the Polar equation: application to robot localization**
76+
| B. Desrochers, L. Jaulin
77+
| *Engineering Applications of Artificial Intelligence*, 55(Supplement C):83–92, Oct. 2016.
78+
| |polar-pdf|_
79+
80+
81+
.. admonition:: Technical documentation
82+
83+
See the `C++ API documentation of this class <../../../api/html/classcodac2_1_1_ctc_polar.html>`_.
31.4 KB
Binary file not shown.
41.8 KB
Loading

doc/manual/manual/contractors/geometric/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Geometric contractors
44
.. toctree::
55

66
ctcdist.rst
7-
CtcPolar <http://codac.io>
7+
ctcpolar.rst
88
CtcSegment <http://codac.io>
99
CtcPolygon <http://codac.io>
1010
CtcEllipse <http://codac.io>

0 commit comments

Comments
 (0)