Skip to content

Commit

Permalink
sync changes brought in with DexterOS (#204)
Browse files Browse the repository at this point in the history
* Feature/split easy libraries (#149)

* add vscode to gitignore

* split easygopigo3 into 2 files: easygopigo3 and easy_sensors

* Bit of linting

* split easygopigo3 library

* change print statement to a cleaner one

* remove I2C_mutex

* typo

* Split easygopigo3.py and create easysensors.py

* Feature/overall mutex (#152)

* add vscode to gitignore

* split easygopigo3 into 2 files: easygopigo3 and easy_sensors

* Bit of linting

* split easygopigo3 library

* change print statement to a cleaner one

* remove I2C_mutex

* typo

* Split easygopigo3.py and create easysensors.py

* upping version number to 1.2

* add a check for overall mutex need

* Add comments about overall_mutex support

* Notebooks for Mouse Controller project.  Change turn_degrees blocking default (#153)

* removing i2c_mutex which will be found in script_tools instead (#148)

* Revert "removing i2c_mutex which will be found in script_tools instead (#148)"

This reverts commit 1e9ba8f.

* Revert the removal of mock packages in the docs

* add 2 notebooks in Mouse Control Project

* change blocking default in turn_degrees to be consistent

* adjust documentation for turn_degrees blocking parameter

* better handling of mutex checking (#155)

* Bug/line follower (#156)

* better handling of mutex checking

* re-add Line Follower

* Fix/overallmutex (#157)

* add 2 notebooks in Mouse Control Project

* change blocking default in turn_degrees to be consistent

* adjust documentation for turn_degrees blocking parameter

* Check overall_mutex flag each time.

* Fix/trickle down use mutex value (#162)

* Trickle down use_mutex values when sensors are instantiated from easygopigo3

* new reconfig_bus() method (#167)

* add 2 notebooks in Mouse Control Project

* change blocking default in turn_degrees to be consistent

* adjust documentation for turn_degrees blocking parameter

* Trickle down use_mutex values when sensors are instantiated from easygopigo3

* new reconfig_bus method

* remove errant print

* feature - updated documentation for all the things we did (#168)

* feature - first major things to modify

* feature - use conda instead of pip

* feature - disable deb checker

* feature - being explicit is safer than being sorry

* feature - clean things up

* feature - more on autosummary stuff

* feature - create a new index for basic API

* feature - add cross-reference to disensors

* feature - lots of changes

* remove version support on RTD as we don't have a release system
* make EasyGoPiGo3 class's documentation up-to-date

* feature - small improvement to a sentence

* feature - further work on easygopigo3.py docstrings

* feature - add list of soon to be deprecated API

* feature - improve the "deprecated api" page

* feature - split the documentation into sections

* feature - add note to class graphic

* feature - fix description alignments

* feature - split functions/classes list into multiple lists

* feature - fix the tutorials section

* feature - make docs more pretty

* Fix/distance sensor (#169)

* add 2 notebooks in Mouse Control Project

* change blocking default in turn_degrees to be consistent

* adjust documentation for turn_degrees blocking parameter

* change the call to easyDistanceSensor

* Sync develop to master (#175)

* Hotfix/broken update mutex (#173)

* remove old libraries

* Use pip instead of brute force

* Bring Develop into Master (#174)

* Update C++ drivers for FW version 1.0.0

* Feature/split easy libraries (#149)

* add vscode to gitignore

* split easygopigo3 into 2 files: easygopigo3 and easy_sensors

* Bit of linting

* split easygopigo3 library

* change print statement to a cleaner one

* remove I2C_mutex

* typo

* Split easygopigo3.py and create easysensors.py

* Feature/overall mutex (#152)

* add vscode to gitignore

* split easygopigo3 into 2 files: easygopigo3 and easy_sensors

* Bit of linting

* split easygopigo3 library

* change print statement to a cleaner one

* remove I2C_mutex

* typo

* Split easygopigo3.py and create easysensors.py

* upping version number to 1.2

* add a check for overall mutex need

* Add comments about overall_mutex support

* Notebooks for Mouse Controller project.  Change turn_degrees blocking default (#153)

* removing i2c_mutex which will be found in script_tools instead (#148)

* Revert "removing i2c_mutex which will be found in script_tools instead (#148)"

This reverts commit 1e9ba8f.

* Revert the removal of mock packages in the docs

* add 2 notebooks in Mouse Control Project

* change blocking default in turn_degrees to be consistent

* adjust documentation for turn_degrees blocking parameter

* better handling of mutex checking (#155)

* Bug/line follower (#156)

* better handling of mutex checking

* re-add Line Follower

* Fix/overallmutex (#157)

* add 2 notebooks in Mouse Control Project

* change blocking default in turn_degrees to be consistent

* adjust documentation for turn_degrees blocking parameter

* Check overall_mutex flag each time.

* Add reset method

Add reset_motor_encoder as a simpler way to reset one or both motors'
encoders to 0.

* Fix/trickle down use mutex value (#162)

* Trickle down use_mutex values when sensors are instantiated from easygopigo3

* new reconfig_bus() method (#167)

* add 2 notebooks in Mouse Control Project

* change blocking default in turn_degrees to be consistent

* adjust documentation for turn_degrees blocking parameter

* Trickle down use_mutex values when sensors are instantiated from easygopigo3

* new reconfig_bus method

* remove errant print

* feature - updated documentation for all the things we did (#168)

* feature - first major things to modify

* feature - use conda instead of pip

* feature - disable deb checker

* feature - being explicit is safer than being sorry

* feature - clean things up

* feature - more on autosummary stuff

* feature - create a new index for basic API

* feature - add cross-reference to disensors

* feature - lots of changes

* remove version support on RTD as we don't have a release system
* make EasyGoPiGo3 class's documentation up-to-date

* feature - small improvement to a sentence

* feature - further work on easygopigo3.py docstrings

* feature - add list of soon to be deprecated API

* feature - improve the "deprecated api" page

* feature - split the documentation into sections

* feature - add note to class graphic

* feature - fix description alignments

* feature - split functions/classes list into multiple lists

* feature - fix the tutorials section

* feature - make docs more pretty

* Fix/distance sensor (#169)

* add 2 notebooks in Mouse Control Project

* change blocking default in turn_degrees to be consistent

* adjust documentation for turn_degrees blocking parameter

* change the call to easyDistanceSensor

* install control panel within install script (#177)

* Add Scratch into the Pi menu (#170)

* Fix/broken gui (#176)

* remove old libraries

* Fix control panel

* Fix/control panel (#178)

* install control panel within install script

* Add a delay after reset_all

* Rewrite the messages in the hardware test

* feature - change how the installation of the robot goes (#180)

* Update the GPG3 update and install scripts for Stretch

* Add Dexter Industries and GoPiGo3 graphics

* Cleanup

* Add control panel on desktop

* feature - replace non-existent variable & condition desktop file -> copy

* feature - fix quiet_mode not working

* feature - check if script is run with pi user

* feature - add some comments on top of each function

* feature - use exiting instead of aborting

* feature - edit the installation readme

* feature - adjust the readme in the root dir of the project

* feature - change RTD instructions accordingly

* feature - fix global variable issue

* feature - refactor the installation script yet again

* feature - replace non-existent variable with the right one

* feature - missing "s" letter in one word

* feature - add condition to dep checker

* fix deprecated distance sensor init for Scratch (#181)

* Remove confusion between left/right eyes (#182)

* fix deprecated distance sensor init for Scratch

* Rework Control Panel to remove confusion between left and right eye

* Error window in Control Panel if GPG3 not found (#184)

* fix deprecated distance sensor init for Scratch

* Rework Control Panel to remove confusion between left and right eye

* Pop error window if GPG3 not found, or firmware not set

* feature - changing the sources (#183)

* Update the GPG3 update and install scripts for Stretch

* Add Dexter Industries and GoPiGo3 graphics

* Cleanup

* Add control panel on desktop

* feature - replace non-existent variable & condition desktop file -> copy

* feature - fix quiet_mode not working

* feature - check if script is run with pi user

* feature - add some comments on top of each function

* feature - use exiting instead of aborting

* feature - edit the installation readme

* feature - adjust the readme in the root dir of the project

* feature - change RTD instructions accordingly

* feature - fix global variable issue

* feature - refactor the installation script yet again

* feature - replace non-existent variable with the right one

* feature - missing "s" letter in one word

* feature - add condition to dep checker

* feature - Desktop is a folder and not a file

* feature - change branches

* feature - go with variable-set branch instead

* fix - browser bot project (#187)

* feature - make browser bot project on Stretch

* fix - make the browser bot project work on jessie too

* hotfix - make use of dynamic sources for video stream and web POSTs

* feature - change script tools ref (#185)

* fix deprecated distance sensor init for Scratch

* Rework Control Panel to remove confusion between left and right eye

* Pop error window if GPG3 not found, or firmware not set

* feature - change refs for script_tools

* Use direct links instead of redirects

* fix - remove unnecessary instruction from install script (#188)

* fix - remove unnecessary instruction from install script

* fix - change which instruction to take out

* read line follower from left to right, and speed it up (#200)

* new methods: spin_left, spin_right, steer and orbit (#201)

* added spin_right, spin_left and steer methods

* add orbit() method; change order of methods

* can't do metric conversion

* Fix line follower examples (#202)

* Fix line follower examples

* add Readme

* fix - the documentation & update the copyright year (#203)

* fix - the documentation & fix a couple of things here and there

* fix - typo for listed method

* Update easygopigo3.py

* fix - remove whitespace around =s in prototype
  • Loading branch information
RobertLucian authored Sep 21, 2018
1 parent fe3aecc commit 5849047
Show file tree
Hide file tree
Showing 9 changed files with 244 additions and 289 deletions.
13 changes: 13 additions & 0 deletions Software/Python/Examples/Line_Sensor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# LINE FOLLOWER SENSOR

These files showcase how to use the line follower with a GoPiGo3.

For these files to work, the DI Sensors drivers must first be installed. On Raspbian for Robots they are pre-installed already.

## Installation
If you need to install the DI Sensors repo, this is how to do it:

`curl -kL dexterindustries.com/update_sensors | bash`

## More
See more at https://github.com/DexterInd/DI_Sensors
Empty file.
3 changes: 1 addition & 2 deletions Software/Python/Examples/Line_Sensor/basic_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@
'''
from __future__ import print_function
from __future__ import division
from builtins import input
# the above lines are meant for Python3 compatibility.
# they force the use of Python3 functionality for print(),
# the integer division and input()
# mind your parentheses!

import line_sensor
from line_follower import line_sensor
import time

def get_sensorval():
Expand Down
41 changes: 27 additions & 14 deletions Software/Python/Examples/Line_Sensor/line_follower-basic_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,37 @@
'''
from __future__ import print_function
from __future__ import division
from builtins import input
# the above lines are meant for Python3 compatibility.
# they force the use of Python3 functionality for print(),
# the integer division and input()
# mind your parentheses!

import line_sensor
import easygopigo3 as easy
import time

def get_sensorval():
while True:
val=line_sensor.read_sensor()
if val[0]!=-1:
return val
#else:
#Read once more to clear buffer and remove junk values
# val=line_sensor.read_sensor()
while True:
l0,l1,l2,l3,l4=get_sensorval()
print (l0,l1,l2,l3,l4)
#time.sleep(.05)
sensor_readings = None

gpg = easy.EasyGoPiGo3()

try:
my_linefollower = gpg.init_line_follower()
time.sleep(0.1)
except:
print('Line Follower not responding')
time.sleep(0.2)
exit()
my_linefollower.read_position()
my_linefollower.read_position()


# start
gpg.forward()
while not my_linefollower.read_position() == "black":
if my_linefollower.read_position() == 'center':
gpg.forward()
if my_linefollower.read_position() == 'left':
gpg.left()
if my_linefollower.read_position() == 'right':
gpg.right()
gpg.stop()

225 changes: 0 additions & 225 deletions Software/Python/Examples/Line_Sensor/line_sensor.py

This file was deleted.

Loading

0 comments on commit 5849047

Please sign in to comment.