Update documentation
This commit is contained in:
parent
d2498e8a04
commit
99e3a06d39
24 changed files with 3016 additions and 12756 deletions
200
lib/Api.html
200
lib/Api.html
|
@ -1,14 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Api — 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" />
|
||||
<title>Api — CompLib 0.0.2 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
|
||||
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
@ -83,20 +86,181 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="api">
|
||||
<section id="api">
|
||||
<span id="lib-api"></span><h1>Api<a class="headerlink" href="#api" title="Permalink to this headline"></a></h1>
|
||||
<div class="section" id="seeding">
|
||||
<section id="seeding">
|
||||
<h2>Seeding<a class="headerlink" href="#seeding" title="Permalink to this headline"></a></h2>
|
||||
</div>
|
||||
<div class="section" id="double-elimination">
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="compLib.Api.Seeding">
|
||||
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Api.</span></span><span class="sig-name descname"><span class="pre">Seeding</span></span><a class="headerlink" href="#compLib.Api.Seeding" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Class used for communicating with seeding api.</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Api.Seeding.getCargo">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">getCargo</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.Seeding.getCargo" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Makes the /api/listCargo call to the api.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>color</strong> – Color parameter which specifies which cargo should be taken. (A string which is either “green”, “red”, “yellow” or “blue”</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p>Json Object and status code as returned by the api.</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Return type</dt>
|
||||
<dd class="field-odd"><p>Tuple[Dict, int]</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Api.Seeding.get_delivery">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_delivery</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.Seeding.get_delivery" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Makes the /api/getDelivery call to the api.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>Json Object and status code as returned by the api.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Return type</dt>
|
||||
<dd class="field-even"><p>Tuple[Dict, int]</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Api.Seeding.get_garbage">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_garbage</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.Seeding.get_garbage" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Makes the /api/getGarbage call to the api.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>Json Object and status code as returned by the api.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Return type</dt>
|
||||
<dd class="field-even"><p>Tuple[Dict, int]</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Api.Seeding.get_material">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_material</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.Seeding.get_material" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Makes the /api/getMaterial call to the api.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>Json Object and status code as returned by the api.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Return type</dt>
|
||||
<dd class="field-even"><p>Tuple[Dict, int]</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Api.Seeding.list_cargo">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">list_cargo</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.Seeding.list_cargo" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Makes the /api/listCargo call to the api.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>Json Object and status code as returned by the api.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Return type</dt>
|
||||
<dd class="field-even"><p>Tuple[Dict, int]</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="double-elimination">
|
||||
<h2>Double Elimination<a class="headerlink" href="#double-elimination" title="Permalink to this headline"></a></h2>
|
||||
</div>
|
||||
<div class="section" id="position">
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="compLib.Api.DoubleElim">
|
||||
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Api.</span></span><span class="sig-name descname"><span class="pre">DoubleElim</span></span><a class="headerlink" href="#compLib.Api.DoubleElim" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Class used for communicating with double elimination api</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Api.DoubleElim.get_goal">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_goal</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#compLib.Api.Position" title="compLib.Api.Position"><span class="pre">compLib.Api.Position</span></a><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.DoubleElim.get_goal" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Get position of the goal.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>A Position object with x and y coordinates of the goal, rotation is always -1</p>
|
||||
</dd>
|
||||
<dt class="field-even">Return type</dt>
|
||||
<dd class="field-even"><p>Tuple[<a class="reference internal" href="#compLib.Api.Position" title="compLib.Api.Position">Position</a>, int]</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Api.DoubleElim.get_items">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_items</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.DoubleElim.get_items" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Get a list with all current items.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>A list will all items currently on the game field. Items are dictionaries that look like: {“id”: 0, “x”: 0, “y”: 0}</p>
|
||||
</dd>
|
||||
<dt class="field-even">Return type</dt>
|
||||
<dd class="field-even"><p>Tuple[List[Dict], int]</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Api.DoubleElim.get_opponent">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_opponent</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#compLib.Api.Position" title="compLib.Api.Position"><span class="pre">compLib.Api.Position</span></a><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.DoubleElim.get_opponent" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Get position of the opponents robot.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>A Position object with opponents robot position</p>
|
||||
</dd>
|
||||
<dt class="field-even">Return type</dt>
|
||||
<dd class="field-even"><p>Tuple[<a class="reference internal" href="#compLib.Api.Position" title="compLib.Api.Position">Position</a>, int]</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Api.DoubleElim.get_position">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_position</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#compLib.Api.Position" title="compLib.Api.Position"><span class="pre">compLib.Api.Position</span></a><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.DoubleElim.get_position" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Get position of the robot.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>A Position object with robot position</p>
|
||||
</dd>
|
||||
<dt class="field-even">Return type</dt>
|
||||
<dd class="field-even"><p>Tuple[<a class="reference internal" href="#compLib.Api.Position" title="compLib.Api.Position">Position</a>, int]</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Api.DoubleElim.get_scores">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_scores</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.DoubleElim.get_scores" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Get the current scores.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>A dictionary with all scores included like: {“self”:2,”opponent”:0}</p>
|
||||
</dd>
|
||||
<dt class="field-even">Return type</dt>
|
||||
<dd class="field-even"><p>Tuple[Dict, int]</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="position">
|
||||
<h2>Position<a class="headerlink" href="#position" title="Permalink to this headline"></a></h2>
|
||||
</div>
|
||||
<div class="section" id="examples">
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="compLib.Api.Position">
|
||||
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Api.</span></span><span class="sig-name descname"><span class="pre">Position</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">degrees</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Api.Position" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Datastructure for holding a position.</p>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="examples">
|
||||
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
|
||||
<div class="section" id="calling-seeding-api">
|
||||
<section id="calling-seeding-api">
|
||||
<h3>Calling Seeding API<a class="headerlink" href="#calling-seeding-api" 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.Api</span> <span class="kn">import</span> <span class="n">Seeding</span>
|
||||
|
||||
|
@ -127,8 +291,8 @@
|
|||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"We failed :("</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="calling-double-elimination-api">
|
||||
</section>
|
||||
<section id="calling-double-elimination-api">
|
||||
<h3>Calling Double Elimination API<a class="headerlink" href="#calling-double-elimination-api" 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.Api</span> <span class="kn">import</span> <span class="n">DoubleElim</span>
|
||||
|
||||
|
@ -139,9 +303,9 @@
|
|||
<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">, the server responded with status code: </span><span class="si">{</span><span class="n">status</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Aruco — 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" />
|
||||
<title>Aruco — CompLib 0.0.2 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
|
||||
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
@ -79,11 +82,11 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="aruco">
|
||||
<section id="aruco">
|
||||
<span id="lib-vision"></span><h1>Aruco<a class="headerlink" href="#aruco" title="Permalink to this headline"></a></h1>
|
||||
<div class="section" id="examples">
|
||||
<section id="examples">
|
||||
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
|
||||
<div class="section" id="recognizing-aruco-tags">
|
||||
<section id="recognizing-aruco-tags">
|
||||
<h3>Recognizing ArUco tags<a class="headerlink" href="#recognizing-aruco-tags" 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">time</span>
|
||||
<span class="kn">import</span> <span class="nn">cv2</span>
|
||||
|
@ -155,9 +158,9 @@
|
|||
You can specify an ID of the tag you want to use and if it’s found, the coordinates of the center are returned.
|
||||
With the normalized function this is very easy: The x-coordinate is -1 on the left, 1 on the right and 0 in the center of the screen, same for y.
|
||||
This way it is quite simple to act on the position of the tag.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Display — 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" />
|
||||
<title>Display — CompLib 0.0.2 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
|
||||
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
@ -80,14 +83,44 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="display">
|
||||
<section id="display">
|
||||
<span id="lib-display"></span><h1>Display<a class="headerlink" href="#display" title="Permalink to this headline"></a></h1>
|
||||
<div class="section" id="class-documentation">
|
||||
<section id="class-documentation">
|
||||
<h2>Class Documentation<a class="headerlink" href="#class-documentation" title="Permalink to this headline"></a></h2>
|
||||
</div>
|
||||
<div class="section" id="examples">
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="compLib.Display.Display">
|
||||
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Display.</span></span><span class="sig-name descname"><span class="pre">Display</span></span><a class="headerlink" href="#compLib.Display.Display" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Access the display on the robot.
|
||||
The display is split into 4 Rows and 16 Columns. Each function call changes one line at a time.</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Display.Display.clear">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">clear</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Display.Display.clear" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Clear the display</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Display.Display.write">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">write</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">line</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Display.Display.write" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Write a string of text to the integrated display.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>line</strong> – Line to write. Between 1 and 4</p></li>
|
||||
<li><p><strong>text</strong> – Text to write. Up to 16 characters</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p>IndexError</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="examples">
|
||||
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
|
||||
<div class="section" id="write-a-line-to-the-display">
|
||||
<section id="write-a-line-to-the-display">
|
||||
<h3>Write a line to the display<a class="headerlink" href="#write-a-line-to-the-display" 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">time</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Display</span> <span class="kn">import</span> <span class="n">Display</span>
|
||||
|
@ -95,9 +128,9 @@
|
|||
<span class="n">Display</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s2">"Hello World!"</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Encoder — 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" />
|
||||
<title>Encoder — CompLib 0.0.2 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
|
||||
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
@ -76,12 +79,72 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="encoder">
|
||||
<section id="encoder">
|
||||
<span id="lib-encoder"></span><h1>Encoder<a class="headerlink" href="#encoder" title="Permalink to this headline"></a></h1>
|
||||
<div class="section" id="class-documentation">
|
||||
<section id="class-documentation">
|
||||
<h2>Class Documentation<a class="headerlink" href="#class-documentation" title="Permalink to this headline"></a></h2>
|
||||
</div>
|
||||
</div>
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="compLib.Encoder.Encoder">
|
||||
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Encoder.</span></span><span class="sig-name descname"><span class="pre">Encoder</span></span><a class="headerlink" href="#compLib.Encoder.Encoder" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Class used to read the encoders</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Encoder.Encoder.clear">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">clear</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Encoder.Encoder.clear" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Reset encoder position to 0</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>port</strong> – Port, which the motor is connected to. Between 1 and 4</p>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p>IndexError</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Encoder.Encoder.clear_all">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">clear_all</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Encoder.Encoder.clear_all" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Reset all encoder positions to 0</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Encoder.Encoder.read">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">read</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">int</span></span></span><a class="headerlink" href="#compLib.Encoder.Encoder.read" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Read encoder from a specified port</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>port</strong> – Port, which the motor is connected to. Between 1 and 4</p>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p>IndexError</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>Current encoder position</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Encoder.Encoder.read_raw">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">read_raw</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">int</span></span></span><a class="headerlink" href="#compLib.Encoder.Encoder.read_raw" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Read raw encoder from a specified port. Will not be reset to 0 at start.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>port</strong> – Port, which the motor is connected to. Between 1 and 4</p>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p>IndexError</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>Current encoder position</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Infrared Sensor — 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" />
|
||||
<title>Infrared Sensor — CompLib 0.0.2 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
|
||||
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
@ -79,11 +82,51 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="infrared-sensor">
|
||||
<section id="infrared-sensor">
|
||||
<span id="lib-irsensor"></span><h1>Infrared Sensor<a class="headerlink" href="#infrared-sensor" title="Permalink to this headline"></a></h1>
|
||||
<div class="section" id="examples">
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="compLib.IRSensor.IRSensor">
|
||||
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.IRSensor.</span></span><span class="sig-name descname"><span class="pre">IRSensor</span></span><a class="headerlink" href="#compLib.IRSensor.IRSensor" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Access the different IR Sensors of the robot</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.IRSensor.IRSensor.read">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">read</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sensor</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">int</span></span></span><a class="headerlink" href="#compLib.IRSensor.IRSensor.read" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Read one infrared sensor</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>sensor</strong> – Which sensor to read. Between 1 and 5</p>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p>IndexError</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>Sensor value. 10 bit accuracy</p>
|
||||
</dd>
|
||||
<dt class="field-even">Return type</dt>
|
||||
<dd class="field-even"><p>int</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.IRSensor.IRSensor.set">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">set</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sensor</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">on</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">bool</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.IRSensor.IRSensor.set" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Turn on / off a IR emitter</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>sensor</strong> – Which sensor to read. Between 1 and 5</p>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p>IndexError</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<section id="examples">
|
||||
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
|
||||
<div class="section" id="testing-analog-sensors">
|
||||
<section id="testing-analog-sensors">
|
||||
<h3>Testing analog sensors<a class="headerlink" href="#testing-analog-sensors" 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</span> <span class="kn">import</span> <span class="n">IRSensor</span>
|
||||
|
||||
|
@ -91,9 +134,9 @@
|
|||
<span class="nb">print</span> <span class="p">(</span><span class="s2">"left: </span><span class="si">{}</span><span class="s2"> middle: </span><span class="si">{}</span><span class="s2"> right: </span><span class="si">{}</span><span class="s2">"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">IRSensor</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="mi">1</span><span class="p">),</span> <span class="n">IRSensor</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="mi">3</span><span class="p">),</span> <span class="n">IRSensor</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="mi">5</span><span class="p">)))</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Linefollower Examples — 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" />
|
||||
<title>Linefollower Examples — CompLib 0.0.2 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
|
||||
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
@ -76,9 +79,9 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="linefollower-examples">
|
||||
<section id="linefollower-examples">
|
||||
<span id="lib-linefollower"></span><h1>Linefollower Examples<a class="headerlink" href="#linefollower-examples" title="Permalink to this headline"></a></h1>
|
||||
<div class="section" id="simple-linefollower">
|
||||
<section id="simple-linefollower">
|
||||
<h2>Simple Linefollower<a class="headerlink" href="#simple-linefollower" title="Permalink to this headline"></a></h2>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Display</span> <span class="kn">import</span> <span class="n">Display</span>
|
||||
|
@ -153,8 +156,8 @@
|
|||
<span class="n">main</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Logging — 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" />
|
||||
<title>Logging — CompLib 0.0.2 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
|
||||
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
@ -80,23 +83,50 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="logging">
|
||||
<section id="logging">
|
||||
<span id="lib-logging"></span><h1>Logging<a class="headerlink" href="#logging" title="Permalink to this headline"></a></h1>
|
||||
<div class="section" id="class-documentation">
|
||||
<section id="class-documentation">
|
||||
<h2>Class Documentation<a class="headerlink" href="#class-documentation" title="Permalink to this headline"></a></h2>
|
||||
</div>
|
||||
<div class="section" id="examples">
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="compLib.LogstashLogging.Logging">
|
||||
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.LogstashLogging.</span></span><span class="sig-name descname"><span class="pre">Logging</span></span><a class="headerlink" href="#compLib.LogstashLogging.Logging" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Can be used to manually use the logger or turn up the logging level used for debugging this library.</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.LogstashLogging.Logging.get_logger">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_logger</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">logging.Logger</span></span></span><a class="headerlink" href="#compLib.LogstashLogging.Logging.get_logger" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Get the logger object used to communicate with logstash</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>Python logger</p>
|
||||
</dd>
|
||||
<dt class="field-even">Return type</dt>
|
||||
<dd class="field-even"><p>logging.Logger</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.LogstashLogging.Logging.set_debug">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">set_debug</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.LogstashLogging.Logging.set_debug" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Turns up the logging level of the library to debug. Should be used, when debugging with the
|
||||
Competition organizers</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="examples">
|
||||
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
|
||||
<div class="section" id="turn-up-the-logging">
|
||||
<section id="turn-up-the-logging">
|
||||
<h3>Turn up the logging<a class="headerlink" href="#turn-up-the-logging" 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.LogstashLogging</span> <span class="kn">import</span> <span class="n">Logging</span>
|
||||
|
||||
<span class="n">Logging</span><span class="o">.</span><span class="n">set_debug</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
133
lib/Motor.html
133
lib/Motor.html
|
@ -1,14 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Motor — 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" />
|
||||
<title>Motor — CompLib 0.0.2 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
|
||||
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
@ -80,14 +83,120 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="motor">
|
||||
<section id="motor">
|
||||
<span id="lib-motor"></span><h1>Motor<a class="headerlink" href="#motor" title="Permalink to this headline"></a></h1>
|
||||
<div class="section" id="class-documentation">
|
||||
<section id="class-documentation">
|
||||
<h2>Class Documentation<a class="headerlink" href="#class-documentation" title="Permalink to this headline"></a></h2>
|
||||
</div>
|
||||
<div class="section" id="examples">
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="compLib.Motor.Motor">
|
||||
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Motor.</span></span><span class="sig-name descname"><span class="pre">Motor</span></span><a class="headerlink" href="#compLib.Motor.Motor" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Class used to control the motors</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Motor.Motor.active_break">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">active_break</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.active_break" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Actively break with a specific motor</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>port</strong> – Port, which the motor is connected to. 1-4</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Motor.Motor.all_off">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">all_off</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.all_off" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Turns of all motors</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Motor.Motor.get_motor_curve">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_motor_curve</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.get_motor_curve" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Get the currently active motor curve. Check set_motor_curve() for more info.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>current motor curve</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Motor.Motor.power">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">power</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">percent</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">float</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.power" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Set specified motor to percentage power, percentage is linearized
|
||||
so that it’s roughly proportional to the speed</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>port</strong> – Port, which the motor is connected to. 1-4</p></li>
|
||||
<li><p><strong>percent</strong> – Percentage of max speed. between -100 and 100</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p>IndexError</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Motor.Motor.power_raw">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">power_raw</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">percent</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">float</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">log_metric</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.power_raw" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Set specified motor to percentage power</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>port</strong> – Port, which the motor is connected to. 1-4</p></li>
|
||||
<li><p><strong>percent</strong> – Percentage of max speed. between -100 and 100</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p>IndexError</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Motor.Motor.pwm">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">pwm</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pwm</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">compLib.Motor.MotorMode</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.pwm" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Set specified motor to a specific pwm value and motor mode</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>port</strong> – Port, which the motor is connected to. 1-4 allowed</p></li>
|
||||
<li><p><strong>pwm</strong> – Raw PWM value which the motor should be set to. From 0 to 2^16 - 1</p></li>
|
||||
<li><p><strong>mode</strong> – Motor mode. See enum MotorMode for more info</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p>IndexError</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Motor.Motor.set_motor_curve">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">set_motor_curve</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">curve</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.set_motor_curve" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Set the global motor curve, must be a float array with exactly 21 elements.
|
||||
[0] = x ticks/s (0% power)
|
||||
[1] = x ticks/s (5% power)
|
||||
[2] = x ticks/s (10% power)
|
||||
…
|
||||
[20] = x ticks/s (100% power)</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>curve</strong> – float array with 21 elements</p>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p>ValueError</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="examples">
|
||||
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
|
||||
<div class="section" id="driving-straight-maybe">
|
||||
<section id="driving-straight-maybe">
|
||||
<h3>Driving straight (maybe)<a class="headerlink" href="#driving-straight-maybe" 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.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
|
||||
|
@ -95,9 +204,9 @@
|
|||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">50</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Servo — 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" />
|
||||
<title>Servo — CompLib 0.0.2 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
|
||||
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
@ -73,9 +76,35 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="servo">
|
||||
<section id="servo">
|
||||
<span id="lib-servo"></span><h1>Servo<a class="headerlink" href="#servo" title="Permalink to this headline"></a></h1>
|
||||
</div>
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="compLib.Servo.Servo">
|
||||
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Servo.</span></span><span class="sig-name descname"><span class="pre">Servo</span></span><a class="headerlink" href="#compLib.Servo.Servo" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Control the servo ports on the robot</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Servo.Servo.set_position">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">set_position</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">float</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">offset</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">float</span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">90.0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Servo.Servo.set_position" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Set position of servo connected to port</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>port</strong> – port between 1 and 8</p></li>
|
||||
<li><p><strong>angle</strong> – Angle of servo</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Servo.Servo.setup_position">
|
||||
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">setup_position</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Servo.Servo.setup_position" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Set position of servos to the position used during the setup process</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<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" />
|
||||
<title>Vision — CompLib 0.0.2 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
|
||||
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
@ -80,7 +83,7 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="vision">
|
||||
<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>
|
||||
|
@ -90,14 +93,49 @@
|
|||
<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">
|
||||
<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>
|
||||
</div>
|
||||
<div class="section" id="examples">
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="compLib.Vision.__Streaming">
|
||||
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Vision.</span></span><span class="sig-name descname"><span class="pre">__Streaming</span></span><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 class="sig sig-object py" id="compLib.Vision.__Streaming.get_frame">
|
||||
<span class="sig-name descname"><span class="pre">get_frame</span></span><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 class="sig sig-object py" id="compLib.Vision.__Streaming.publish_frame">
|
||||
<span class="sig-name descname"><span class="pre">publish_frame</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">image</span></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>
|
||||
|
||||
</section>
|
||||
<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">
|
||||
<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>
|
||||
|
@ -117,8 +155,8 @@ your raspberry pi camera. Note: the stream will lag a little bit BUT the process
|
|||
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">
|
||||
</section>
|
||||
<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>
|
||||
|
@ -151,9 +189,9 @@ point your raspberry pi camera to a chessboard and it should be detected.</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>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
Reference in a new issue