Skip to content

Commit

Permalink
Add references for additional reading
Browse files Browse the repository at this point in the history
  • Loading branch information
toshan-luktuke committed Aug 16, 2022
1 parent 15be792 commit dca3eee
Show file tree
Hide file tree
Showing 10 changed files with 264 additions and 165 deletions.
2 changes: 2 additions & 0 deletions Blocks/ContourDetector.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def main(inputs, outputs, parameters, synchronise):
`while` loop is the part of the program that is executed continuously.
It is enabled by default but can be disabled by passing in 0 through the enable wire.
[Further reading](https://docs.opencv.org/4.x/d4/d73/tutorial_py_contours_begin.html)
'''
auto_enable = False
try:
Expand Down
2 changes: 1 addition & 1 deletion Blocks/Dilation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def main(inputs, outputs, parameters, synchronise):
using the `cv2.dilate()` function.\n
Finaly we convert from `GRAY` back to `BGR` and output the image through the `share_image()` function.
[Further reading](https://docs.opencv.org/4.x/d9/d61/tutorial_py_morphological_ops.html)
'''
kernel = np.array([int(x.strip()) for x in parameters.read_string("Kernel").split(",")])
kernel = np.ones(kernel, np.uint8)
Expand Down
2 changes: 2 additions & 0 deletions Blocks/Erosion.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ def main(inputs, outputs, parameters, synchronise):
We first convert the colour of the image from `BGR` to `GRAY` then we apply erosion on it
using the `cv2.erode()` function.\n
Finaly we convert from `GRAY` back to `BGR` and output the image through the `share_image()` function.
[Further reading]([Further reading](https://docs.opencv.org/4.x/d9/d61/tutorial_py_morphological_ops.html))
'''
kernel = np.array([int(x.strip()) for x in parameters.read_string("Kernel").split(",")])
kernel = np.ones(kernel, np.uint8)
Expand Down
4 changes: 3 additions & 1 deletion Blocks/Threshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ def main(inputs, outputs, parameters, synchronise):
Based on these values it converts the input image form `BGR` into `GRAY` and applies the `cv2.threshold()` function on it.
The image is then converted back into `BGR` and shared to the output wire using the
`share_image()` function.
`share_image()` function.
[Further reading](https://docs.opencv.org/4.x/d7/d4d/tutorial_py_thresholding.html)
'''
lower = parameters.read_number("LowerThreshold")
upper = parameters.read_number("UpperThreshold")
Expand Down
77 changes: 75 additions & 2 deletions blockDocs/Blocks.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@
<input type="search" placeholder="Search..." role="searchbox" aria-label="search"
pattern=".+" required>

<h2>Contents</h2>
<ul>
<li><a href="#visual-circuit">Visual Circuit</a>
<ul>
<li><a href="#setup">Setup</a></li>
<li><a href="#contributing">Contributing</a></li>
</ul></li>
</ul>


<h2>Submodules</h2>
<ul>
Expand Down Expand Up @@ -62,7 +71,71 @@ <h2>Submodules</h2>
<h1 class="modulename">
Blocks </h1>

<div class="docstring"><p></p>
<div class="docstring"><div id="top"></div>

<p><a href="https://jderobot.github.io/"><img src="docs/assets/gif/logo.gif" width="150" align="right" /></a></p>

<h1 id="visual-circuit">Visual Circuit</h1>

<p><a href="https://github.com/JdeRobot/VisualCircuit/graphs/contributors"><img src="https://img.shields.io/github/contributors/JdeRobot/VisualCircuit.svg?style=plastic" alt="Contributors" /></a>
<a href="https://github.com/JdeRobot/VisualCircuit/network/members"><img src="https://img.shields.io/github/forks/JdeRobot/VisualCircuit.svg?style=plastic" alt="Forks" /></a>
<a href="https://github.com/JdeRobot/VisualCircuit/stargazers"><img src="https://img.shields.io/github/stars/JdeRobot/VisualCircuit.svg?style=plastic" alt="Stargazers" /></a>
<a href="https://github.com/JdeRobot/VisualCircuit/issues"><img src="https://img.shields.io/github/issues/JdeRobot/VisualCircuit.svg?style=plastic" alt="Issues" /></a>
<a href="http://opensource.org/licenses/GPL-2.0"><img src="http://img.shields.io/:license-gpl-blue.svg" alt="License" /></a></p>

<p>Visual Circuit is an <strong>open source</strong> tool to develop robotic applications. It aims to make developing applications for ROS and Gazebo simple and user friendly by its intuitive block-based interface. Users have the ablity to drag and drop blocks to develop their logic. Users are also able to build completely custom blocks as well as edit code in the existing blocks, this makes Visual Circuit a robust and powerful tool to develop even complicated applications. </p>

<p>For more information visit our site <a href="https://jderobot.github.io/VisualCircuit/">VisualCircuit</a></p>

<h2 id="setup">Setup</h2>

<h3 id="front-end">Front-end</h3>

<p>For more specific instructions check the frontend <a href="./frontend/README.md">readme</a> </p>

<ol>
<li>Clone the repository <a href="https://github.com/JdeRobot/VisualCircuit.git">https://github.com/JdeRobot/VisualCircuit.git</a></li>
<li>Change directory to <code>frontend</code></li>
<li>Run <code>npm install</code></li>
<li>Run <code>npm start</code></li>
<li>Open <a href="http://localhost:3000/">http://localhost:3000/</a> in browser.</li>
</ol>

<h3 id="back-end">Back-end</h3>

<p>For more specific instructions check the backend <a href="./backend/README.md">readme</a></p>

<ol>
<li>Clone the repository <a href="https://github.com/JdeRobot/VisualCircuit.git">https://github.com/JdeRobot/VisualCircuit.git</a></li>
<li>Change directory to <code>backend</code></li>
<li>Create a Python3 virtual environment using venv.
For eg. <code>python -m venv .venv</code> </li>
<li>After activating the virtual environment, install the dependencies by running
<code>pip install -r requirements.txt</code></li>
<li>Add <code>.env</code> file to the <code>backend</code> folder. And add the variables as defined in <a href="./.env.template">.env.template</a></li>
<li>Create the static files to serve during execution by <code>python manage.py collectstatic</code></li>
<li>Start the server by running <code>python manage.py runserver 8000</code></li>
</ol>

<!-- CONTRIBUTING -->

<h2 id="contributing">Contributing</h2>

<p>Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are <strong>greatly appreciated</strong>. For more info on how to design a block, refer to <a href="https://jderobot.github.io/VisualCircuit/tutorials/">this link</a></p>

<p>If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!</p>

<ol>
<li>Fork the Project</li>
<li>Create your Feature Branch (<code>git checkout -b feature/AmazingFeature</code>)</li>
<li>Commit your Changes (<code>git commit -m 'Add some AmazingFeature'</code>)</li>
<li>Push to the Branch (<code>git push origin feature/AmazingFeature</code>)</li>
<li>Open a Pull Request</li>
</ol>

<p><!-- MARKDOWN LINKS &amp; IMAGES -->
<!-- <a href="https://www.markdownguide.org/basic-syntax/#reference-style-links">https://www.markdownguide.org/basic-syntax/#reference-style-links</a> --></p>
</div>


Expand All @@ -71,7 +144,7 @@ <h1 class="modulename">
<label class="view-source-button" for="Blocks-view-source"><span>View Source</span></label>

<div class="pdoc-code codehilite"><pre><span></span><span id="L-1"><a href="#L-1"><span class="linenos">1</span></a><span class="sd">&quot;&quot;&quot;</span>
</span><span id="L-2"><a href="#L-2"><span class="linenos">2</span></a><span class="sd">.. include:: ../../README.md</span>
</span><span id="L-2"><a href="#L-2"><span class="linenos">2</span></a><span class="sd">.. include:: ../README.md</span>
</span><span id="L-3"><a href="#L-3"><span class="linenos">3</span></a><span class="sd">&quot;&quot;&quot;</span>
</span></pre></div>

Expand Down
Loading

0 comments on commit dca3eee

Please sign in to comment.