Skip to content

Line following improvements #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Line following improvements #132

wants to merge 11 commits into from

Conversation

ksiegall
Copy link
Member

General wording and explanation improvements.
Fixes #66, #74, #75, and #76.

One sensor proportional control still needs video.

error = reflectance.get_left() - 0.5
# Input your threshold value here:
threshold = 0.5
error = reflectance.get_right() - threshold

.. tab-item:: Blockly

.. image:: media/set_error.png
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong block

Let's do a quick check to make sure the code makes sense. We assume base_effort
= 0.5 and KP = 1. If the reflectance reads whitish-grey and yields a value of
around 0.25, the error would be -0.25, meaning that the left motor's effort is:
.. code-block:: python
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too small


.. tab-item:: Blockly

.. image:: media/one_edge_line_follow.png
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

broken


Just to review, let's take this code line-by-line and make sure we understand what's going on.

:code:`threshold = 0.5` sets the threshold value to 0.5.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inline blockly?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would rather not, i think it's intuitive enough to be able to compare side by side - using sphinx to do inline images is really tedious

Copy link
Contributor

@AnselChang AnselChang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you never made changes and also you need to fix merge conflict

@ksiegall
Copy link
Member Author

Made all non-blockly related changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Understanding the line sensor - needs web server exxplanation first
2 participants