Update documentation
This commit is contained in:
parent
afdfd3b85e
commit
f72550146d
19 changed files with 611 additions and 173 deletions
BIN
_images/chessboard.jpg
Normal file
BIN
_images/chessboard.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
BIN
_images/chessboard_detected.jpg
Normal file
BIN
_images/chessboard_detected.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 69 KiB |
BIN
_images/opencv_http_stream.png
Normal file
BIN
_images/opencv_http_stream.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 391 KiB |
BIN
_images/opencv_processed.png
Normal file
BIN
_images/opencv_processed.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 356 KiB |
102
_sources/lib/Vision.rst.txt
Normal file
102
_sources/lib/Vision.rst.txt
Normal file
|
@ -0,0 +1,102 @@
|
|||
.. _lib_vision:
|
||||
|
||||
Vision
|
||||
=====
|
||||
|
||||
This module provides an interface for grabbing an rtmp stream and using the images to do some processing in opencv.
|
||||
|
||||
How do I use this module?
|
||||
|
||||
1. Get frames from the raspberry pi camera
|
||||
2. -- here comes your own processing --
|
||||
3. Publish the processed frames on an http server
|
||||
4. You can view the http stream of your processed images in a web browser
|
||||
|
||||
Opencv Stream
|
||||
*************
|
||||
|
||||
Because of the rtmp stream needing to buffer some frames and waiting for P-Frames, importing this module might take up
|
||||
to 5 Seconds.
|
||||
|
||||
.. autoclass:: compLib.Vision.__Streaming
|
||||
:members:
|
||||
|
||||
Examples
|
||||
*********
|
||||
|
||||
Using the Vision Module
|
||||
---------------------
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import cv2
|
||||
from compLib import Vision
|
||||
|
||||
# get newest opencv frame from camera
|
||||
frame = Vision.Streaming.get_frame()
|
||||
|
||||
# do some processing with the frame.....
|
||||
|
||||
# publish frame to streaming server
|
||||
Vision.Streaming.publish_frame(frame)
|
||||
|
||||
Connect the raspberry pi to your internet and view the stream at: "http://your_raspi_ip:9898/". This should display
|
||||
your raspberry pi camera. Note: the stream will lag a little bit BUT the processing of the image will be done in
|
||||
realtime.
|
||||
|
||||
The output on the website should show whatever your raspberry pi cam records:
|
||||
|
||||
.. image:: images/opencv_http_stream.png
|
||||
:width: 680
|
||||
:alt: Processed frames from opencv
|
||||
|
||||
|
||||
Chessboard Detection
|
||||
------------------------------------------
|
||||
|
||||
In this example we process the captured stream of images and want to detect chessboards. Run this example and
|
||||
point your raspberry pi camera to a chessboard and it should be detected.
|
||||
|
||||
For testing you can point it at this image:
|
||||
|
||||
.. image:: images/chessboard.jpg
|
||||
:width: 680
|
||||
:alt: Chessboard for opencv processing
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import cv2
|
||||
from compLib import Vision
|
||||
|
||||
# get newest opencv frame from camera
|
||||
frame = Vision.Streaming.get_frame()
|
||||
|
||||
criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001)
|
||||
|
||||
# convert image to grayscale image
|
||||
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
|
||||
|
||||
# find the chessboard corners
|
||||
ret, corners = cv2.findChessboardCorners(gray, (6, 9), None)
|
||||
|
||||
# draw detected chessboard position onto the image
|
||||
cv2.drawChessboardCorners(frame, (6, 9), corners, ret)
|
||||
|
||||
# publish frame to streaming server
|
||||
Vision.Streaming.publish_frame(frame)
|
||||
|
||||
Connect the raspberry pi to your internet and view the stream at: "http://your_raspi_ip:9898/".
|
||||
|
||||
The output image should look like this:
|
||||
|
||||
.. image:: images/chessboard_detected.jpg
|
||||
:width: 680
|
||||
:alt: Processed frames from opencv
|
||||
|
||||
Here is a screenshot of the stream website while viewing the chessboard in this documentation.
|
||||
|
||||
.. image:: images/opencv_processed.png
|
||||
:width: 680
|
||||
:alt: Processed frames from opencv
|
||||
|
||||
|
|
@ -1,8 +1,3 @@
|
|||
pre { line-height: 125%; }
|
||||
td.linenos pre { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; }
|
||||
span.linenos { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; }
|
||||
td.linenos pre.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||
.highlight .hll { background-color: #ffffcc }
|
||||
.highlight { background: #f8f8f8; }
|
||||
.highlight .c { color: #408080; font-style: italic } /* Comment */
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>Index — CompLib 0.0.2 documentation</title>
|
||||
|
||||
|
@ -20,6 +20,9 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
@ -48,7 +51,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
<a href="index.html" class="icon icon-home"> CompLib
|
||||
|
||||
|
||||
|
||||
|
@ -88,6 +91,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="lib/IRSensor.html">Infrared Sensor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Motor.html">Motor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Servo.html">Servo</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Vision.html">Vision</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -128,6 +132,8 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
@ -155,7 +161,8 @@
|
|||
<h1 id="index">Index</h1>
|
||||
|
||||
<div class="genindex-jumpbox">
|
||||
<a href="#A"><strong>A</strong></a>
|
||||
<a href="#_"><strong>_</strong></a>
|
||||
| <a href="#A"><strong>A</strong></a>
|
||||
| <a href="#B"><strong>B</strong></a>
|
||||
| <a href="#D"><strong>D</strong></a>
|
||||
| <a href="#G"><strong>G</strong></a>
|
||||
|
@ -166,6 +173,14 @@
|
|||
| <a href="#T"><strong>T</strong></a>
|
||||
|
||||
</div>
|
||||
<h2 id="_">_</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Vision.html#compLib.Vision.__Streaming">__Streaming (class in compLib.Vision)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="A">A</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
|
@ -203,6 +218,8 @@
|
|||
<h2 id="G">G</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Vision.html#compLib.Vision.__Streaming.get_frame">get_frame() (compLib.Vision.__Streaming method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Api.html#compLib.Api.DoubleElim.get_goal">get_goal() (compLib.Api.DoubleElim static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Api.html#compLib.Api.DoubleElim.get_items">get_items() (compLib.Api.DoubleElim static method)</a>
|
||||
|
@ -246,6 +263,8 @@
|
|||
<li><a href="lib/Api.html#compLib.Api.Position">Position (class in compLib.Api)</a>
|
||||
</li>
|
||||
<li><a href="lib/Motor.html#compLib.Motor.Motor.power">power() (compLib.Motor.Motor static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Vision.html#compLib.Vision.__Streaming.publish_frame">publish_frame() (compLib.Vision.__Streaming method)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
@ -289,27 +308,24 @@
|
|||
</div>
|
||||
<footer>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2021, robo4you
|
||||
© Copyright 2021, robo4you.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
36
index.html
36
index.html
|
@ -3,9 +3,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>Robo4you Competition Library — CompLib 0.0.2 documentation</title>
|
||||
|
||||
|
@ -20,6 +20,9 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
@ -49,7 +52,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="#" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
<a href="#" class="icon icon-home"> CompLib
|
||||
|
||||
|
||||
|
||||
|
@ -89,6 +92,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="lib/IRSensor.html">Infrared Sensor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Motor.html">Motor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Servo.html">Servo</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Vision.html">Vision</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -129,6 +133,8 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
@ -202,6 +208,15 @@
|
|||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Servo.html">Servo</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Vision.html">Vision</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Vision.html#opencv-stream">Opencv Stream</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Vision.html#examples">Examples</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="lib/Vision.html#using-the-vision-module">Using the Vision Module</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="lib/Vision.html#chessboard-detection">Chessboard Detection</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -212,35 +227,28 @@
|
|||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="other/usage.html" class="btn btn-neutral float-right" title="Usage" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="other/usage.html" class="btn btn-neutral float-right" title="Usage" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2021, robo4you
|
||||
© Copyright 2021, robo4you.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
46
lib/Api.html
46
lib/Api.html
|
@ -3,9 +3,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>Api — CompLib 0.0.2 documentation</title>
|
||||
|
||||
|
@ -20,6 +20,9 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
@ -50,7 +53,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
<a href="../index.html" class="icon icon-home"> CompLib
|
||||
|
||||
|
||||
|
||||
|
@ -100,6 +103,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="IRSensor.html">Infrared Sensor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Motor.html">Motor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Servo.html">Servo</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Vision.html">Vision</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -140,6 +144,8 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
@ -299,14 +305,14 @@
|
|||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.Api</span> <span class="kn">import</span> <span class="n">Seeding</span>
|
||||
|
||||
<span class="n">park</span> <span class="o">=</span> <span class="n">Seeding</span><span class="o">.</span><span class="n">get_park</span><span class="p">()</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"I should move to parking position: </span><span class="si">{</span><span class="n">park</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span>
|
||||
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">"I should move to parking position: {park}"</span><span class="p">)</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">park</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"I can't move to this position yet :("</span><span class="p">)</span>
|
||||
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">"I can't move to this position yet :("</span><span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">park</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Moving to position 1!"</span><span class="p">)</span>
|
||||
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">"Moving to position 1!"</span><span class="p">)</span>
|
||||
<span class="c1"># drive to parking position using Motors module...</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Now hopefully at position 1"</span><span class="p">)</span>
|
||||
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">"Now hopefully at position 1"</span><span class="p">)</span>
|
||||
<span class="c1"># drive back using Motors module...</span>
|
||||
<span class="k">elif</span> <span class="n">park</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
|
||||
<span class="c1"># do something similar to park == 1..</span>
|
||||
|
@ -315,9 +321,9 @@
|
|||
|
||||
<span class="n">success</span> <span class="o">=</span> <span class="n">Seeding</span><span class="o">.</span><span class="n">pay_park</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="n">success</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"We scored some points!"</span><span class="p">)</span>
|
||||
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">"We scored some points!"</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"We failed :("</span><span class="p">)</span>
|
||||
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">"We failed :("</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -326,10 +332,10 @@
|
|||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.Api</span> <span class="kn">import</span> <span class="n">DoubleElim</span>
|
||||
|
||||
<span class="n">position</span> <span class="o">=</span> <span class="n">DoubleElim</span><span class="o">.</span><span class="n">get_position</span><span class="p">()</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Position of my robot is: x=</span><span class="si">{</span><span class="n">position</span><span class="o">.</span><span class="n">x</span><span class="si">}</span><span class="s2">, y=</span><span class="si">{</span><span class="n">position</span><span class="o">.</span><span class="n">y</span><span class="si">}</span><span class="s2"> and rotation is: </span><span class="si">{</span><span class="n">position</span><span class="o">.</span><span class="n">degrees</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span>
|
||||
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">"Position of my robot is: x={position.x}, y={position.y} and rotation is: {position.degrees}"</span><span class="p">)</span>
|
||||
|
||||
<span class="n">goal</span> <span class="o">=</span> <span class="n">DoubleElim</span><span class="o">.</span><span class="n">get_goal</span><span class="p">()</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Goal is at: x=</span><span class="si">{</span><span class="n">goal</span><span class="o">.</span><span class="n">x</span><span class="si">}</span><span class="s2">, y=</span><span class="si">{</span><span class="n">goal</span><span class="o">.</span><span class="n">y</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span>
|
||||
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">"Goal is at: x={goal.x}, y={goal.y}"</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -341,37 +347,29 @@
|
|||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="Battery.html" class="btn btn-neutral float-right" title="Battery" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="../other/usage.html" class="btn btn-neutral float-left" title="Usage" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
<a href="Battery.html" class="btn btn-neutral float-right" title="Battery" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="../other/usage.html" class="btn btn-neutral float-left" title="Usage" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2021, robo4you
|
||||
© Copyright 2021, robo4you.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>Battery — CompLib 0.0.2 documentation</title>
|
||||
|
||||
|
@ -20,6 +20,9 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
@ -50,7 +53,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
<a href="../index.html" class="icon icon-home"> CompLib
|
||||
|
||||
|
||||
|
||||
|
@ -97,6 +100,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="IRSensor.html">Infrared Sensor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Motor.html">Motor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Servo.html">Servo</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Vision.html">Vision</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -137,6 +141,8 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
@ -193,7 +199,7 @@
|
|||
<h3>Printing percentage<a class="headerlink" href="#printing-percentage" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.Battery</span> <span class="kn">import</span> <span class="n">Battery</span>
|
||||
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">Battery</span><span class="o">.</span><span class="n">percent</span><span class="p">())</span>
|
||||
<span class="k">print</span><span class="p">(</span><span class="n">Battery</span><span class="o">.</span><span class="n">percent</span><span class="p">())</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -205,37 +211,29 @@
|
|||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="Buzzer.html" class="btn btn-neutral float-right" title="Buzzer" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="Api.html" class="btn btn-neutral float-left" title="Api" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
<a href="Buzzer.html" class="btn btn-neutral float-right" title="Buzzer" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="Api.html" class="btn btn-neutral float-left" title="Api" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2021, robo4you
|
||||
© Copyright 2021, robo4you.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>Buzzer — CompLib 0.0.2 documentation</title>
|
||||
|
||||
|
@ -20,6 +20,9 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
@ -50,7 +53,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
<a href="../index.html" class="icon icon-home"> CompLib
|
||||
|
||||
|
||||
|
||||
|
@ -97,6 +100,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="IRSensor.html">Infrared Sensor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Motor.html">Motor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Servo.html">Servo</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Vision.html">Vision</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -137,6 +141,8 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
@ -191,9 +197,9 @@
|
|||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">time</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Buzzer</span> <span class="kn">import</span> <span class="n">Buzzer</span>
|
||||
|
||||
<span class="n">Buzzer</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="kc">True</span><span class="p">)</span>
|
||||
<span class="n">Buzzer</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="bp">True</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
|
||||
<span class="n">Buzzer</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="kc">False</span><span class="p">)</span>
|
||||
<span class="n">Buzzer</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -205,37 +211,29 @@
|
|||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="IRSensor.html" class="btn btn-neutral float-right" title="Infrared Sensor" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="Battery.html" class="btn btn-neutral float-left" title="Battery" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
<a href="IRSensor.html" class="btn btn-neutral float-right" title="Infrared Sensor" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="Battery.html" class="btn btn-neutral float-left" title="Battery" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2021, robo4you
|
||||
© Copyright 2021, robo4you.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>Infrared Sensor — CompLib 0.0.2 documentation</title>
|
||||
|
||||
|
@ -20,6 +20,9 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
@ -50,7 +53,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
<a href="../index.html" class="icon icon-home"> CompLib
|
||||
|
||||
|
||||
|
||||
|
@ -90,6 +93,7 @@
|
|||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Infrared Sensor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Motor.html">Motor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Servo.html">Servo</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Vision.html">Vision</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -130,6 +134,8 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
@ -240,37 +246,29 @@
|
|||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="Motor.html" class="btn btn-neutral float-right" title="Motor" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="Buzzer.html" class="btn btn-neutral float-left" title="Buzzer" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
<a href="Motor.html" class="btn btn-neutral float-right" title="Motor" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="Buzzer.html" class="btn btn-neutral float-left" title="Buzzer" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2021, robo4you
|
||||
© Copyright 2021, robo4you.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>Motor — CompLib 0.0.2 documentation</title>
|
||||
|
||||
|
@ -20,6 +20,9 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
@ -50,7 +53,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
<a href="../index.html" class="icon icon-home"> CompLib
|
||||
|
||||
|
||||
|
||||
|
@ -97,6 +100,7 @@
|
|||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Servo.html">Servo</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Vision.html">Vision</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -137,6 +141,8 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
@ -212,37 +218,29 @@
|
|||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="Servo.html" class="btn btn-neutral float-right" title="Servo" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="IRSensor.html" class="btn btn-neutral float-left" title="Infrared Sensor" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
<a href="Servo.html" class="btn btn-neutral float-right" title="Servo" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="IRSensor.html" class="btn btn-neutral float-left" title="Infrared Sensor" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2021, robo4you
|
||||
© Copyright 2021, robo4you.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>Servo — CompLib 0.0.2 documentation</title>
|
||||
|
||||
|
@ -20,6 +20,9 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
@ -35,6 +38,7 @@
|
|||
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Vision" href="Vision.html" />
|
||||
<link rel="prev" title="Motor" href="Motor.html" />
|
||||
</head>
|
||||
|
||||
|
@ -49,7 +53,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
<a href="../index.html" class="icon icon-home"> CompLib
|
||||
|
||||
|
||||
|
||||
|
@ -89,6 +93,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="IRSensor.html">Infrared Sensor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Motor.html">Motor</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Servo</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Vision.html">Vision</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -129,6 +134,8 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
@ -189,35 +196,29 @@
|
|||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
|
||||
<a href="Motor.html" class="btn btn-neutral float-left" title="Motor" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
<a href="Vision.html" class="btn btn-neutral float-right" title="Vision" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="Motor.html" class="btn btn-neutral float-left" title="Motor" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2021, robo4you
|
||||
© Copyright 2021, robo4you.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
326
lib/Vision.html
Normal file
326
lib/Vision.html
Normal file
|
@ -0,0 +1,326 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>Vision — CompLib 0.0.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="prev" title="Servo" href="Servo.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home"> CompLib
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Robo4you Competition Library</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Api.html">Api</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Battery.html">Battery</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Buzzer.html">Buzzer</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="IRSensor.html">Infrared Sensor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Motor.html">Motor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Servo.html">Servo</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Vision</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#opencv-stream">Opencv Stream</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#examples">Examples</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#using-the-vision-module">Using the Vision Module</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#chessboard-detection">Chessboard Detection</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../index.html">CompLib</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Vision</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../_sources/lib/Vision.rst.txt" rel="nofollow"> View page source</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="vision">
|
||||
<span id="lib-vision"></span><h1>Vision<a class="headerlink" href="#vision" title="Permalink to this headline">¶</a></h1>
|
||||
<p>This module provides an interface for grabbing an rtmp stream and using the images to do some processing in opencv.</p>
|
||||
<p>How do I use this module?</p>
|
||||
<ol class="arabic simple">
|
||||
<li><p>Get frames from the raspberry pi camera</p></li>
|
||||
<li><p>– here comes your own processing –</p></li>
|
||||
<li><p>Publish the processed frames on an http server</p></li>
|
||||
<li><p>You can view the http stream of your processed images in a web browser</p></li>
|
||||
</ol>
|
||||
<div class="section" id="opencv-stream">
|
||||
<h2>Opencv Stream<a class="headerlink" href="#opencv-stream" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Because of the rtmp stream needing to buffer some frames and waiting for P-Frames, importing this module might take up
|
||||
to 5 Seconds.</p>
|
||||
<dl class="py class">
|
||||
<dt id="compLib.Vision.__Streaming">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">compLib.Vision.</code><code class="sig-name descname">__Streaming</code><a class="headerlink" href="#compLib.Vision.__Streaming" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Class that handles rtmp streaming for opencv.</p>
|
||||
<p>DO NOT CREATE AN INSTANCE OF THIS CLASS YOURSELF!</p>
|
||||
<p>This is automatically done when importing this module. Use Vision.Streaming which is
|
||||
an instance of this class!</p>
|
||||
<p>grab frames -> do your own processing -> publish frame -> view on http server</p>
|
||||
<dl class="py method">
|
||||
<dt id="compLib.Vision.__Streaming.get_frame">
|
||||
<code class="sig-name descname">get_frame</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Vision.__Streaming.get_frame" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Grab the newest frame from the rtmp stream.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>An opencv frame</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="compLib.Vision.__Streaming.publish_frame">
|
||||
<code class="sig-name descname">publish_frame</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">image</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Vision.__Streaming.publish_frame" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Publish an opencv frame to the http webserver.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>image</strong> – Opencv frame that will be published</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p>None</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
<div class="section" id="examples">
|
||||
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="section" id="using-the-vision-module">
|
||||
<h3>Using the Vision Module<a class="headerlink" href="#using-the-vision-module" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">cv2</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib</span> <span class="kn">import</span> <span class="n">Vision</span>
|
||||
|
||||
<span class="c1"># get newest opencv frame from camera</span>
|
||||
<span class="n">frame</span> <span class="o">=</span> <span class="n">Vision</span><span class="o">.</span><span class="n">Streaming</span><span class="o">.</span><span class="n">get_frame</span><span class="p">()</span>
|
||||
|
||||
<span class="c1"># do some processing with the frame.....</span>
|
||||
|
||||
<span class="c1"># publish frame to streaming server</span>
|
||||
<span class="n">Vision</span><span class="o">.</span><span class="n">Streaming</span><span class="o">.</span><span class="n">publish_frame</span><span class="p">(</span><span class="n">frame</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Connect the raspberry pi to your internet and view the stream at: “<a class="reference external" href="http://your_raspi_ip:9898/">http://your_raspi_ip:9898/</a>”. This should display
|
||||
your raspberry pi camera. Note: the stream will lag a little bit BUT the processing of the image will be done in
|
||||
realtime.</p>
|
||||
<p>The output on the website should show whatever your raspberry pi cam records:</p>
|
||||
<a class="reference internal image-reference" href="../_images/opencv_http_stream.png"><img alt="Processed frames from opencv" src="../_images/opencv_http_stream.png" style="width: 680px;" /></a>
|
||||
</div>
|
||||
<div class="section" id="chessboard-detection">
|
||||
<h3>Chessboard Detection<a class="headerlink" href="#chessboard-detection" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In this example we process the captured stream of images and want to detect chessboards. Run this example and
|
||||
point your raspberry pi camera to a chessboard and it should be detected.</p>
|
||||
<p>For testing you can point it at this image:</p>
|
||||
<a class="reference internal image-reference" href="../_images/chessboard.jpg"><img alt="Chessboard for opencv processing" src="../_images/chessboard.jpg" style="width: 680px;" /></a>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">cv2</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib</span> <span class="kn">import</span> <span class="n">Vision</span>
|
||||
|
||||
<span class="c1"># get newest opencv frame from camera</span>
|
||||
<span class="n">frame</span> <span class="o">=</span> <span class="n">Vision</span><span class="o">.</span><span class="n">Streaming</span><span class="o">.</span><span class="n">get_frame</span><span class="p">()</span>
|
||||
|
||||
<span class="n">criteria</span> <span class="o">=</span> <span class="p">(</span><span class="n">cv2</span><span class="o">.</span><span class="n">TERM_CRITERIA_EPS</span> <span class="o">+</span> <span class="n">cv2</span><span class="o">.</span><span class="n">TERM_CRITERIA_MAX_ITER</span><span class="p">,</span> <span class="mi">30</span><span class="p">,</span> <span class="mf">0.001</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># convert image to grayscale image</span>
|
||||
<span class="n">gray</span> <span class="o">=</span> <span class="n">cv2</span><span class="o">.</span><span class="n">cvtColor</span><span class="p">(</span><span class="n">frame</span><span class="p">,</span> <span class="n">cv2</span><span class="o">.</span><span class="n">COLOR_BGR2GRAY</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># find the chessboard corners</span>
|
||||
<span class="n">ret</span><span class="p">,</span> <span class="n">corners</span> <span class="o">=</span> <span class="n">cv2</span><span class="o">.</span><span class="n">findChessboardCorners</span><span class="p">(</span><span class="n">gray</span><span class="p">,</span> <span class="p">(</span><span class="mi">6</span><span class="p">,</span> <span class="mi">9</span><span class="p">),</span> <span class="bp">None</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># draw detected chessboard position onto the image</span>
|
||||
<span class="n">cv2</span><span class="o">.</span><span class="n">drawChessboardCorners</span><span class="p">(</span><span class="n">frame</span><span class="p">,</span> <span class="p">(</span><span class="mi">6</span><span class="p">,</span> <span class="mi">9</span><span class="p">),</span> <span class="n">corners</span><span class="p">,</span> <span class="n">ret</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># publish frame to streaming server</span>
|
||||
<span class="n">Vision</span><span class="o">.</span><span class="n">Streaming</span><span class="o">.</span><span class="n">publish_frame</span><span class="p">(</span><span class="n">frame</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Connect the raspberry pi to your internet and view the stream at: “<a class="reference external" href="http://your_raspi_ip:9898/">http://your_raspi_ip:9898/</a>”.</p>
|
||||
<p>The output image should look like this:</p>
|
||||
<a class="reference internal image-reference" href="../_images/chessboard_detected.jpg"><img alt="Processed frames from opencv" src="../_images/chessboard_detected.jpg" style="width: 680px;" /></a>
|
||||
<p>Here is a screenshot of the stream website while viewing the chessboard in this documentation.</p>
|
||||
<a class="reference internal image-reference" href="../_images/opencv_processed.png"><img alt="Processed frames from opencv" src="../_images/opencv_processed.png" style="width: 680px;" /></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="Servo.html" class="btn btn-neutral float-left" title="Servo" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2021, robo4you.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
BIN
objects.inv
BIN
objects.inv
Binary file not shown.
|
@ -3,9 +3,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>Usage — CompLib 0.0.2 documentation</title>
|
||||
|
||||
|
@ -20,6 +20,9 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
@ -50,7 +53,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
<a href="../index.html" class="icon icon-home"> CompLib
|
||||
|
||||
|
||||
|
||||
|
@ -90,6 +93,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="../lib/IRSensor.html">Infrared Sensor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/Motor.html">Motor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/Servo.html">Servo</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/Vision.html">Vision</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -130,6 +134,8 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
@ -169,7 +175,7 @@
|
|||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="n">port</span><span class="p">,</span> <span class="o">-</span><span class="mi">30</span><span class="p">);</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"hallo ich bin ein roboter beep buup"</span><span class="p">)</span>
|
||||
<span class="k">print</span><span class="p">(</span><span class="s2">"hallo ich bin ein roboter beep buup"</span><span class="p">)</span>
|
||||
|
||||
<span class="n">forward</span><span class="p">()</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
|
||||
|
@ -187,37 +193,29 @@
|
|||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="../lib/Api.html" class="btn btn-neutral float-right" title="Api" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="../index.html" class="btn btn-neutral float-left" title="Robo4you Competition Library" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
<a href="../lib/Api.html" class="btn btn-neutral float-right" title="Api" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="../index.html" class="btn btn-neutral float-left" title="Robo4you Competition Library" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2021, robo4you
|
||||
© Copyright 2021, robo4you.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
24
search.html
24
search.html
|
@ -3,9 +3,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>Search — CompLib 0.0.2 documentation</title>
|
||||
|
||||
|
@ -21,6 +21,9 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
@ -35,6 +38,7 @@
|
|||
|
||||
|
||||
<script type="text/javascript" src="_static/searchtools.js"></script>
|
||||
<script type="text/javascript" src="_static/language_data.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="#" />
|
||||
</head>
|
||||
|
@ -50,7 +54,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
<a href="index.html" class="icon icon-home"> CompLib
|
||||
|
||||
|
||||
|
||||
|
@ -90,6 +94,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="lib/IRSensor.html">Infrared Sensor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Motor.html">Motor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Servo.html">Servo</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Vision.html">Vision</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -130,6 +135,8 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
@ -141,8 +148,6 @@
|
|||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -171,27 +176,24 @@
|
|||
</div>
|
||||
<footer>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2021, robo4you
|
||||
© Copyright 2021, robo4you.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Search.setIndex({docnames:["index","lib/Api","lib/Battery","lib/Buzzer","lib/IRSensor","lib/Motor","lib/Servo","other/usage"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["index.rst","lib/Api.rst","lib/Battery.rst","lib/Buzzer.rst","lib/IRSensor.rst","lib/Motor.rst","lib/Servo.rst","other/usage.rst"],objects:{"compLib.Api":{DoubleElim:[1,0,1,""],Position:[1,0,1,""],Seeding:[1,0,1,""]},"compLib.Api.DoubleElim":{get_goal:[1,1,1,""],get_items:[1,1,1,""],get_opponent:[1,1,1,""],get_position:[1,1,1,""]},"compLib.Api.Seeding":{get_park:[1,1,1,""],pay_park:[1,1,1,""],simon_says:[1,1,1,""]},"compLib.Battery":{Battery:[2,0,1,""]},"compLib.Battery.Battery":{percent:[2,1,1,""]},"compLib.Buzzer":{Buzzer:[3,0,1,""]},"compLib.Buzzer.Buzzer":{set:[3,1,1,""]},"compLib.IRSensor":{IRSensor:[4,0,1,""]},"compLib.IRSensor.IRSensor":{bottom_left:[4,1,1,""],bottom_middle:[4,1,1,""],bottom_right:[4,1,1,""],top_left_percent:[4,1,1,""],top_right_percent:[4,1,1,""]},"compLib.Motor":{Motor:[5,0,1,""]},"compLib.Motor.Motor":{all_off:[5,1,1,""],power:[5,1,1,""]},"compLib.Servo":{Servo:[6,0,1,""]},"compLib.Servo.Servo":{set_position:[6,1,1,""],setup_position:[6,1,1,""]}},objnames:{"0":["py","class","Python class"],"1":["py","method","Python method"]},objtypes:{"0":"py:class","1":"py:method"},terms:{"100":[2,4,5],"2021":0,"class":[0,1,4,6],"import":[1,2,3,5,7],"int":[1,2,4,5,6],"return":[1,2,4],"static":[1,2,3,4,5,6],"true":[1,3,4],Used:[2,3],__main__:7,__name__:7,access:4,after:1,all:[1,5],all_off:5,alwai:1,angl:6,api:0,back:1,backward:7,batteri:0,beep:7,between:[1,2,4,5,6],bin:7,bool:[1,3,4],bottom:4,bottom_left:4,bottom_middl:4,bottom_right:4,buup:7,buzzer:0,call:0,can:1,channel:6,commun:1,complib:[0,1,2,3,4,5,6,7],connect:[5,6],control:[5,6],coordin:1,current:1,datastructur:1,def:7,degre:1,detect:4,dictionari:1,differ:4,document:0,doubl:0,doubleelim:1,drive:[0,1],dure:6,ein:7,elif:1,elimin:0,els:1,exampl:0,fail:1,fals:[1,3],field:1,forward:7,from:[1,2,3,5,7],game:1,get:[1,2,4],get_goal:1,get_item:1,get_oppon:1,get_park:1,get_posit:1,goal:1,hallo:7,hold:1,hopefulli:1,ich:7,infrar:0,interact:[2,3],irsensor:4,item:1,left:[4,5],like:1,list:1,look:1,main:7,make:1,max:5,mayb:0,middl:4,modul:1,motor:[0,1,7],move:1,next:1,now:1,object:1,off:0,oppon:1,pai:1,paramet:[3,5,6],park:1,parkingsapc:1,pay_park:1,percent:[2,5],percentag:[0,4,5],point:1,port:[5,6,7],posit:[0,6],power:[5,7],print:[0,1,7],process:6,rang:[5,7],request:1,right:[4,5],robot:[1,4,6,7],rotat:1,sai:1,score:1,seed:0,sensor:0,servo:0,set:[3,5,6],set_posit:6,setup:6,setup_posit:6,should:1,signal:4,similar:1,simon:1,simon_sai:1,sleep:[3,7],some:1,someth:1,specifi:5,speed:5,statu:4,straight:0,success:1,thi:1,time:[1,3,7],top:[4,5],top_left_perc:4,top_right_perc:4,turn:[0,5],type:[1,2,4],usag:0,used:[0,1,5,6],using:1,which:5,yet:1,zone:1},titles:["Robo4you Competition Library","Api","Battery","Buzzer","Infrared Sensor","Motor","Servo","Usage"],titleterms:{"class":[2,3,5],api:1,batteri:2,buzzer:3,call:1,competit:0,content:0,document:[2,3,5],doubl:1,drive:5,elimin:1,exampl:[1,2,3,5],infrar:4,librari:0,mayb:5,motor:5,off:3,percentag:2,posit:1,print:2,robo4y:0,seed:1,sensor:4,servo:6,straight:5,turn:3,usag:7}})
|
||||
Search.setIndex({docnames:["index","lib/Api","lib/Battery","lib/Buzzer","lib/IRSensor","lib/Motor","lib/Servo","lib/Vision","other/usage"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["index.rst","lib/Api.rst","lib/Battery.rst","lib/Buzzer.rst","lib/IRSensor.rst","lib/Motor.rst","lib/Servo.rst","lib/Vision.rst","other/usage.rst"],objects:{"compLib.Api":{DoubleElim:[1,0,1,""],Position:[1,0,1,""],Seeding:[1,0,1,""]},"compLib.Api.DoubleElim":{get_goal:[1,1,1,""],get_items:[1,1,1,""],get_opponent:[1,1,1,""],get_position:[1,1,1,""]},"compLib.Api.Seeding":{get_park:[1,1,1,""],pay_park:[1,1,1,""],simon_says:[1,1,1,""]},"compLib.Battery":{Battery:[2,0,1,""]},"compLib.Battery.Battery":{percent:[2,1,1,""]},"compLib.Buzzer":{Buzzer:[3,0,1,""]},"compLib.Buzzer.Buzzer":{set:[3,1,1,""]},"compLib.IRSensor":{IRSensor:[4,0,1,""]},"compLib.IRSensor.IRSensor":{bottom_left:[4,1,1,""],bottom_middle:[4,1,1,""],bottom_right:[4,1,1,""],top_left_percent:[4,1,1,""],top_right_percent:[4,1,1,""]},"compLib.Motor":{Motor:[5,0,1,""]},"compLib.Motor.Motor":{all_off:[5,1,1,""],power:[5,1,1,""]},"compLib.Servo":{Servo:[6,0,1,""]},"compLib.Servo.Servo":{set_position:[6,1,1,""],setup_position:[6,1,1,""]},"compLib.Vision":{__Streaming:[7,0,1,""]},"compLib.Vision.__Streaming":{get_frame:[7,1,1,""],publish_frame:[7,1,1,""]}},objnames:{"0":["py","class","Python class"],"1":["py","method","Python method"]},objtypes:{"0":"py:class","1":"py:method"},terms:{"001":7,"100":[2,4,5],"2021":0,"9898":7,"class":[0,1,4,6,7],"import":[1,2,3,5,7,8],"int":[1,2,4,5,6],"return":[1,2,4,7],"static":[1,2,3,4,5,6],"true":[1,3,4],"while":7,BUT:7,For:7,NOT:7,The:7,Use:7,Used:[2,3],Using:0,__main__:8,__name__:8,__stream:7,access:4,after:1,all:[1,5],all_off:5,alwai:1,angl:6,api:0,automat:7,back:1,backward:8,batteri:0,becaus:7,beep:8,between:[1,2,4,5,6],bin:8,bit:7,bool:[1,3,4],bottom:4,bottom_left:4,bottom_middl:4,bottom_right:4,browser:7,buffer:7,buup:8,buzzer:0,call:0,cam:7,camera:7,can:[1,7],captur:7,channel:6,chessboard:0,color_bgr2grai:7,come:7,commun:1,complib:[0,1,2,3,4,5,6,7,8],connect:[5,6,7],control:[5,6],convert:7,coordin:1,corner:7,creat:7,criteria:7,current:1,cv2:7,cvtcolor:7,datastructur:1,def:8,degre:1,detect:[0,4],dictionari:1,differ:4,displai:7,document:[0,7],done:7,doubl:0,doubleelim:1,draw:7,drawchessboardcorn:7,drive:[0,1],dure:6,ein:8,elif:1,elimin:0,els:1,exampl:0,fail:1,fals:[1,3],field:1,find:7,findchessboardcorn:7,forward:8,frame:7,from:[1,2,3,5,7,8],game:1,get:[1,2,4,7],get_fram:7,get_goal:1,get_item:1,get_oppon:1,get_park:1,get_posit:1,goal:1,grab:7,grai:7,grayscal:7,hallo:8,handl:7,here:7,hold:1,hopefulli:1,how:7,http:7,ich:8,imag:7,infrar:0,instanc:7,interact:[2,3],interfac:7,internet:7,irsensor:4,item:1,lag:7,left:[4,5],like:[1,7],list:1,littl:7,look:[1,7],main:8,make:1,max:5,mayb:0,middl:4,might:7,modul:[0,1],motor:[0,1,8],move:1,need:7,newest:7,next:1,none:7,note:7,now:1,object:1,off:0,onto:7,opencv:0,oppon:1,output:7,own:7,pai:1,paramet:[3,5,6,7],park:1,parkingsapc:1,pay_park:1,percent:[2,5],percentag:[0,4,5],point:[1,7],port:[5,6,8],posit:[0,6,7],power:[5,8],print:[0,1,8],process:[6,7],provid:7,publish:7,publish_fram:7,rang:[5,8],raspberri:7,realtim:7,record:7,request:1,ret:7,right:[4,5],robot:[1,4,6,8],rotat:1,rtmp:7,run:7,sai:1,score:1,screenshot:7,second:7,seed:0,sensor:0,server:7,servo:0,set:[3,5,6],set_posit:6,setup:6,setup_posit:6,should:[1,7],show:7,signal:4,similar:1,simon:1,simon_sai:1,sleep:[3,8],some:[1,7],someth:1,specifi:5,speed:5,statu:4,straight:0,stream:0,success:1,take:7,term_criteria_ep:7,term_criteria_max_it:7,test:7,thi:[1,7],time:[1,3,8],top:[4,5],top_left_perc:4,top_right_perc:4,turn:[0,5],type:[1,2,4],usag:0,use:7,used:[0,1,5,6],using:[1,7],view:7,vision:0,wait:7,want:7,web:7,webserv:7,websit:7,whatev:7,when:7,which:[5,7],yet:1,you:7,your:7,your_raspi_ip:7,yourself:7,zone:1},titles:["Robo4you Competition Library","Api","Battery","Buzzer","Infrared Sensor","Motor","Servo","Vision","Usage"],titleterms:{"class":[2,3,5],Using:7,api:1,batteri:2,buzzer:3,call:1,chessboard:7,competit:0,content:0,detect:7,document:[2,3,5],doubl:1,drive:5,elimin:1,exampl:[1,2,3,5,7],infrar:4,librari:0,mayb:5,modul:7,motor:5,off:3,opencv:7,percentag:2,posit:1,print:2,robo4y:0,seed:1,sensor:4,servo:6,straight:5,stream:7,turn:3,usag:8,vision:7}})
|
Reference in a new issue