Skip to content
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

Limit ranges of angle and speed in car monitor. #2

Closed
wroscoe opened this issue Dec 20, 2016 · 0 comments
Closed

Limit ranges of angle and speed in car monitor. #2

wroscoe opened this issue Dec 20, 2016 · 0 comments

Comments

@wroscoe
Copy link
Collaborator

wroscoe commented Dec 20, 2016

Currently the user can move make the angles and speed go well beyond range the car can implement. This makes it hard to correct once these ranges are way out of range. This could be accomplished by only increasing/decreasing ranges if the value is below the max / above the min.

@wroscoe wroscoe closed this as completed Dec 23, 2016
paasovaara added a commit to paasovaara/donkey that referenced this issue Dec 27, 2018
Update docs to point to the latest Tensorflow version in osx
tawnkramer pushed a commit that referenced this issue Dec 21, 2019
Bring Robotics Masters Donkey Car up to date with latest changes.  Merging in AutoRope Donkey Car Repository
tawnkramer pushed a commit that referenced this issue May 11, 2020
tikurahul added a commit to tikurahul/donkey that referenced this issue Oct 18, 2020
tikurahul added a commit that referenced this issue Jan 4, 2021
* Update nano install docs - python3-opencv vs libopencv-python

* change slack to discord on readme

* Donkeycar 4.x release.  (#644)

## Major Improvements

- New Datastore.
- More ways to pre-process image data for training. 
- Use the 2.x version of Tensorflow. 
- Lots of other minor improvements.

* Improvements to the car app and handling of KerasPilot parts: (#648)

* Improvements to the car app and handling of KerasPilot parts:
* Created a simpler webserver or joystick car app by modifying and renaming the basic_web into basic template and switched this on as default. Also renamed the target from 'manage.py' to 'drive.py' because there is only driving and no training included
* Simplified the handling of uint8 and float32 numpy image arrays. KerasPilot.run() now expects uint8 data, transforms into float32 and delegates to its children. The corresponding rescaling step is gone from the car app
* smaller updates/fixes to environment and config files
* added support for tflite pilots in makemovie

* Improvements to the car app and handling of KerasPilot parts:
* Added docstring to KerasPilot methods
* Fixed bad merge for model types in complete config

* Add configuration to allow creating sub directories for each tub (like the legacy tub) or by default store all recordings in the data directory directly. (#649)

* Update setup.py with progress module for pi (#650)

* Update setup.py

* Update setup.py

Made changes online.

* Add testing for training: (#651)

* added example tub data as tar.gz in tests with 1000 records
* check validation data size in train
* created new test_train.py
* added support for read-only tub, required to create r/o tub in tmp dir
* changed loss in categorical model to equally weight throttle and steering
* changed mod on scripts to u+x

* Rename `drive.py` to `manage.py` to preserve CLI compat. (#656)

* Train still prompts you to move to then new entry point.
* Also fixes #655

* Cleanup exit handlers in the new datastore. (#657)

* Minor datastore_v2 improvements. (#658)

* Add __exit__ handlers again.
* Use `os.linesep` to deal with line separators consistently.

* Be explicit about newline characters (#660)

* Be explicit about newline characters #2 (#661)

* Remove the extra flush(). Windows is less forgiving (#662)

* Remove redundant code (#663)

* Windows Doc Updates (#668)

Added more options for Installing Donkey Car on Windows.  

- Anaconda
- Native
- Windows Subsystem for Linux (WSL) - experiential

These options give more flexibility and could make deployment easier for some individuals.  I personally always install donkey car natively onto Python installed on the System.  I will be looking more into WSL going forward as it has some interesting benefits.

* Integrate osx into travis. (#665)

* add in --user flag for MakeMovie so that you can select if you want to draw the line on the video or not.  default: true

* updated args.draw_user_input

* update to include recommendations

* added in brake functionality for simulator only

fix typo in drivemode return which checked pilot/throttle instead of brake

* fix autorope/issue #671 (#672)

* Jonathans changes from issue #634 and PR #646 (#676)

* Bump version to 4.0.1 (#677)

* Fix template docopt, as it's called managed.py and not drive.py

* Allow overriding WEB_CONTROL_PORT from env variable

* - Add simulator support to basic.py (#682)

- Update cfg_basic.py with simulator parameters

* Switch to using memory-mapped files when reading. (#691)

* This makes reading a 100x faster.

* new: mqtt telemetry support (#688)

* A configurable training pipeline. (#693)

* Implement a Lazy transformable pipeline.
* Implement basic batching. However, this will need to be improved
  further for models with multiple outputs.
* Replace the old `Sequence` implementation used with a new `Pipeline`.

Test: Ran end to end tests.

* The telemetry mqtt test is breaking w/ a timeout on the connection to the server.

* change the public mqtt server name to one that's listening

* * Overriding inference in TensorRT as pass as it is not needed here. (#698)

* Need to implement inference to run on the normalised image (#699)

* Fix sequence iterators (#704)

* Change training pipeline from tf.Sequence to tf.data (#701)

* Improve pipeline use: move from building list of pipelines of single transforms to building a single pipeline with a list of transforms (actually just looping through function to go from TubRecord -> image -> augment -> normalise -> x and TubRecord -> y).

Fixed TfmIterators and TfmIterables.
* Iterables are the containers and are sized - these are the user objects
* Iterators are protocol objects to allow iteration, they have no logic and are local to the Iterables
* build/map_pipeline both return sized Iterables
* removed all batch logic, this is not required
* still commented but left code that uses generator based pipeline as this is simpler code

Using new small temporary pipeline generator
* this keeps the TubSequence lazy and avoids to roll out the pipeline into a list
* added a test to check consistency of the pipeline
* remove empty (after moved) augmentation file
* removed augmentation from old tub (as it's not needed and we removed the old augmentation)

New pipeline changes:
* moved augmentation into own class that is used above and can be used a  threaded or non-threaded part
* moved train functionality out of template and added 'donkey train', train.py just a simple dummy script for backward compatibility

* Address code reviews:
* Re-base on current dev to use un-altered sequence.py
* Add iterator consistency test to pipeline tests
* Undo changes in fast_stretch.py
* better tf shape manipulation
* small code improvements in training.py
* remove sleep in augment part

* Address code reviews:
* Add clearing of tubrecord list and minor renamings

* * Add support for multi-dimensional model input and making the x, y interface symmetrical on the model / training interface: (#707)

- x/y_transform extract x, y as numpy arrays or floats out of the record
  - x/y_translate convert the numpy arrays of floats into tf-readable dictionaries used in tf data.
* Simplify model interface by implementing output_types() directly in the base class using output_shapes() dictionary.
* Adding developer guide for own model development
* Updated donkey command documentation
* Improve asserts and type hints in keras.py
* Added missing __init__.py in parts module.
* Add cool ascii text for donkey init and update yml and setup files including mypy
* Remove model training test from Travis and change the test to relative convergence. This avoids random fall overs in CI.
* Added test of tf.data as used in the training pipeline through re-implementation of data transformation from tub records to tf expected dictionaries, for all currently supported models.

* Minor changes for 4.1 in tub conversion script and developer doc (#708)

* Minor changes for 4.1
* Update conversion script to translate discontinuous data.
* In developer guide add disclaimer for version and correct intra-page links.

* * Update doc with donkey train command.
* Update doc with developer section for building own models in donkey 4.1
* Integrate changes from PR feedback

* Incorporate PR feedback
* Add empty records concept to tub
* Minor updates to conversion script

* Incorporate PR feedback
* Add empty record type into conversion script

* docs: fix simple typo, unfarmilar -> unfamiliar (#714)

There is a small typo in docs/guide/host_pc/setup_windows.md.

Should read `unfamiliar` rather than `unfarmilar`.

* Added the ability to train PyTorch models (#706)

* Added in PyTorch and PyTorch Lightning to train a DC model

Successfully able to train a ResNet18-based model using PyTorch
Lightning.

* Removed hard-coded max number of epochs (used for debugging)

* Added an inference transform to ResNet18 to convert PIL -> tensor

* Unsqueezed input tensor during inference for batch dimension

* Reshaped ResNet output from (1, 2) to (2,)

* Added the ability to resume training from a checkpoint

* Added helper print message when tensorboard logging is enabled

* Updated docopt arguments for train.py. Made checkpoint optional

* Changed TorchTubDataset from sub-classing Dataset to IterableDataset

This was done in response to #706 (comment)

* Renamed load_image_arr to load_image. Updated load_pil_image

load_pil_image will now handle converting the image to greyscale
(vs. this being done in load_image).

* Updated enviroments for Mac and Ubuntu. Set Python=3.7

* Updated installation documentation. Added script to setup Nano

Updated the installation instructions for Ubuntu, Mac, and Windows.
Clarified a common issue that occurs when running pip install -e .[pc]
with ZSH.

Also added a script to setup the Jetson Nano and updated the documentation
for the Nano (it previously was installing tensorflow 1.x).

* Added torch flag to setup.py to install pytorch

* Moved pytorch training into base.py and removed from train.py

* Moved Jetson Nano python package installation into requirements.txt

* Formatted with PEP8 to clean up pytorch code

* Updated docs to provide work-around for ZSH pip install -e .[pc]

* Removed duplicate dependencies in conda env files

* ResNet18 torch model now returns training loss history

* Added test file for PyTorch training

Still need to make sure this passes Travis CI.

* Added lightning_logs to .gitignore

* You can now specify the default AI framework to use in config.py

This reduces the number of command line arguments you are required
to provide.

* get_model_by_type for PyTorch now lazy imports ResNet18

* Added help message to torch_train. Got rid of linear model type

* Updated pytorch tests and fixed some syntax errors

* ResNet18 example input shape updated to be (B, 3, 224, 224)

Also now passing output_shape to load_resnet18 to modify how many
output classes are used

* No longer pinning requirement versions for Jetson Nano

* Fixed formatting in setup.py

* update configuration so that IMAGE_H and IMAGE_W are passed through to the simulator (#674)

Co-authored-by: Jordan Whited <jordan@jordanwhited.com>
Co-authored-by: Tawn Kramer <tawnkramer@gmail.com>
Co-authored-by: wallarug <wallarug@coliemore.com.au>
Co-authored-by: sctse999 <jonathan@tsez.net>
Co-authored-by: DGarbanzo <47540921+DocGarbanzo@users.noreply.github.com>
Co-authored-by: Craig <cfox570@mac.com>
Co-authored-by: DocGarbanzo <dirk.prange@web.de>
Co-authored-by: Meir Tseitlin <meir.tech@gmail.com>
Co-authored-by: Tim Gates <tim.gates@iress.com>
Co-authored-by: Eric Wiener <ericwiener3@gmail.com>
tikurahul added a commit that referenced this issue Mar 20, 2021
* - Update tensorflow version to 1.15.0
- Add doc for Jetpack 4.4
- Remove opencv installation

* Add dataset and pre-trained model page

* fix issue #634 (#646)

- remove jquery dependency
- add clearTimeout

* Allow overriding WEB_CONTROL_PORT from env variable

* pin h5py version

* fix h5py version for mac

* * Update doc with donkey train command. (#709)

* Update doc with developer section for building own models in donkey 4.1
* Integrate changes from PR feedback

* Donkey 4.x is now official (#723)

* Update nano install docs - python3-opencv vs libopencv-python

* change slack to discord on readme

* Donkeycar 4.x release.  (#644)

## Major Improvements

- New Datastore.
- More ways to pre-process image data for training. 
- Use the 2.x version of Tensorflow. 
- Lots of other minor improvements.

* Improvements to the car app and handling of KerasPilot parts: (#648)

* Improvements to the car app and handling of KerasPilot parts:
* Created a simpler webserver or joystick car app by modifying and renaming the basic_web into basic template and switched this on as default. Also renamed the target from 'manage.py' to 'drive.py' because there is only driving and no training included
* Simplified the handling of uint8 and float32 numpy image arrays. KerasPilot.run() now expects uint8 data, transforms into float32 and delegates to its children. The corresponding rescaling step is gone from the car app
* smaller updates/fixes to environment and config files
* added support for tflite pilots in makemovie

* Improvements to the car app and handling of KerasPilot parts:
* Added docstring to KerasPilot methods
* Fixed bad merge for model types in complete config

* Add configuration to allow creating sub directories for each tub (like the legacy tub) or by default store all recordings in the data directory directly. (#649)

* Update setup.py with progress module for pi (#650)

* Update setup.py

* Update setup.py

Made changes online.

* Add testing for training: (#651)

* added example tub data as tar.gz in tests with 1000 records
* check validation data size in train
* created new test_train.py
* added support for read-only tub, required to create r/o tub in tmp dir
* changed loss in categorical model to equally weight throttle and steering
* changed mod on scripts to u+x

* Rename `drive.py` to `manage.py` to preserve CLI compat. (#656)

* Train still prompts you to move to then new entry point.
* Also fixes #655

* Cleanup exit handlers in the new datastore. (#657)

* Minor datastore_v2 improvements. (#658)

* Add __exit__ handlers again.
* Use `os.linesep` to deal with line separators consistently.

* Be explicit about newline characters (#660)

* Be explicit about newline characters #2 (#661)

* Remove the extra flush(). Windows is less forgiving (#662)

* Remove redundant code (#663)

* Windows Doc Updates (#668)

Added more options for Installing Donkey Car on Windows.  

- Anaconda
- Native
- Windows Subsystem for Linux (WSL) - experiential

These options give more flexibility and could make deployment easier for some individuals.  I personally always install donkey car natively onto Python installed on the System.  I will be looking more into WSL going forward as it has some interesting benefits.

* Integrate osx into travis. (#665)

* add in --user flag for MakeMovie so that you can select if you want to draw the line on the video or not.  default: true

* updated args.draw_user_input

* update to include recommendations

* added in brake functionality for simulator only

fix typo in drivemode return which checked pilot/throttle instead of brake

* fix autorope/issue #671 (#672)

* Jonathans changes from issue #634 and PR #646 (#676)

* Bump version to 4.0.1 (#677)

* Fix template docopt, as it's called managed.py and not drive.py

* Allow overriding WEB_CONTROL_PORT from env variable

* - Add simulator support to basic.py (#682)

- Update cfg_basic.py with simulator parameters

* Switch to using memory-mapped files when reading. (#691)

* This makes reading a 100x faster.

* new: mqtt telemetry support (#688)

* A configurable training pipeline. (#693)

* Implement a Lazy transformable pipeline.
* Implement basic batching. However, this will need to be improved
  further for models with multiple outputs.
* Replace the old `Sequence` implementation used with a new `Pipeline`.

Test: Ran end to end tests.

* The telemetry mqtt test is breaking w/ a timeout on the connection to the server.

* change the public mqtt server name to one that's listening

* * Overriding inference in TensorRT as pass as it is not needed here. (#698)

* Need to implement inference to run on the normalised image (#699)

* Fix sequence iterators (#704)

* Change training pipeline from tf.Sequence to tf.data (#701)

* Improve pipeline use: move from building list of pipelines of single transforms to building a single pipeline with a list of transforms (actually just looping through function to go from TubRecord -> image -> augment -> normalise -> x and TubRecord -> y).

Fixed TfmIterators and TfmIterables.
* Iterables are the containers and are sized - these are the user objects
* Iterators are protocol objects to allow iteration, they have no logic and are local to the Iterables
* build/map_pipeline both return sized Iterables
* removed all batch logic, this is not required
* still commented but left code that uses generator based pipeline as this is simpler code

Using new small temporary pipeline generator
* this keeps the TubSequence lazy and avoids to roll out the pipeline into a list
* added a test to check consistency of the pipeline
* remove empty (after moved) augmentation file
* removed augmentation from old tub (as it's not needed and we removed the old augmentation)

New pipeline changes:
* moved augmentation into own class that is used above and can be used a  threaded or non-threaded part
* moved train functionality out of template and added 'donkey train', train.py just a simple dummy script for backward compatibility

* Address code reviews:
* Re-base on current dev to use un-altered sequence.py
* Add iterator consistency test to pipeline tests
* Undo changes in fast_stretch.py
* better tf shape manipulation
* small code improvements in training.py
* remove sleep in augment part

* Address code reviews:
* Add clearing of tubrecord list and minor renamings

* * Add support for multi-dimensional model input and making the x, y interface symmetrical on the model / training interface: (#707)

- x/y_transform extract x, y as numpy arrays or floats out of the record
  - x/y_translate convert the numpy arrays of floats into tf-readable dictionaries used in tf data.
* Simplify model interface by implementing output_types() directly in the base class using output_shapes() dictionary.
* Adding developer guide for own model development
* Updated donkey command documentation
* Improve asserts and type hints in keras.py
* Added missing __init__.py in parts module.
* Add cool ascii text for donkey init and update yml and setup files including mypy
* Remove model training test from Travis and change the test to relative convergence. This avoids random fall overs in CI.
* Added test of tf.data as used in the training pipeline through re-implementation of data transformation from tub records to tf expected dictionaries, for all currently supported models.

* Minor changes for 4.1 in tub conversion script and developer doc (#708)

* Minor changes for 4.1
* Update conversion script to translate discontinuous data.
* In developer guide add disclaimer for version and correct intra-page links.

* * Update doc with donkey train command.
* Update doc with developer section for building own models in donkey 4.1
* Integrate changes from PR feedback

* Incorporate PR feedback
* Add empty records concept to tub
* Minor updates to conversion script

* Incorporate PR feedback
* Add empty record type into conversion script

* docs: fix simple typo, unfarmilar -> unfamiliar (#714)

There is a small typo in docs/guide/host_pc/setup_windows.md.

Should read `unfamiliar` rather than `unfarmilar`.

* Added the ability to train PyTorch models (#706)

* Added in PyTorch and PyTorch Lightning to train a DC model

Successfully able to train a ResNet18-based model using PyTorch
Lightning.

* Removed hard-coded max number of epochs (used for debugging)

* Added an inference transform to ResNet18 to convert PIL -> tensor

* Unsqueezed input tensor during inference for batch dimension

* Reshaped ResNet output from (1, 2) to (2,)

* Added the ability to resume training from a checkpoint

* Added helper print message when tensorboard logging is enabled

* Updated docopt arguments for train.py. Made checkpoint optional

* Changed TorchTubDataset from sub-classing Dataset to IterableDataset

This was done in response to #706 (comment)

* Renamed load_image_arr to load_image. Updated load_pil_image

load_pil_image will now handle converting the image to greyscale
(vs. this being done in load_image).

* Updated enviroments for Mac and Ubuntu. Set Python=3.7

* Updated installation documentation. Added script to setup Nano

Updated the installation instructions for Ubuntu, Mac, and Windows.
Clarified a common issue that occurs when running pip install -e .[pc]
with ZSH.

Also added a script to setup the Jetson Nano and updated the documentation
for the Nano (it previously was installing tensorflow 1.x).

* Added torch flag to setup.py to install pytorch

* Moved pytorch training into base.py and removed from train.py

* Moved Jetson Nano python package installation into requirements.txt

* Formatted with PEP8 to clean up pytorch code

* Updated docs to provide work-around for ZSH pip install -e .[pc]

* Removed duplicate dependencies in conda env files

* ResNet18 torch model now returns training loss history

* Added test file for PyTorch training

Still need to make sure this passes Travis CI.

* Added lightning_logs to .gitignore

* You can now specify the default AI framework to use in config.py

This reduces the number of command line arguments you are required
to provide.

* get_model_by_type for PyTorch now lazy imports ResNet18

* Added help message to torch_train. Got rid of linear model type

* Updated pytorch tests and fixed some syntax errors

* ResNet18 example input shape updated to be (B, 3, 224, 224)

Also now passing output_shape to load_resnet18 to modify how many
output classes are used

* No longer pinning requirement versions for Jetson Nano

* Fixed formatting in setup.py

* update configuration so that IMAGE_H and IMAGE_W are passed through to the simulator (#674)

Co-authored-by: Jordan Whited <jordan@jordanwhited.com>
Co-authored-by: Tawn Kramer <tawnkramer@gmail.com>
Co-authored-by: wallarug <wallarug@coliemore.com.au>
Co-authored-by: sctse999 <jonathan@tsez.net>
Co-authored-by: DGarbanzo <47540921+DocGarbanzo@users.noreply.github.com>
Co-authored-by: Craig <cfox570@mac.com>
Co-authored-by: DocGarbanzo <dirk.prange@web.de>
Co-authored-by: Meir Tseitlin <meir.tech@gmail.com>
Co-authored-by: Tim Gates <tim.gates@iress.com>
Co-authored-by: Eric Wiener <ericwiener3@gmail.com>

* Updated path follower with Intel T265 (#729)

Properly rebased on Master this time, I hope

Co-authored-by: Chris Anderson <gca2@earthlink.net>

* Remove '-dev' from version output (#734)

* Updated training instructions. (#744)

* Make clear how to call "run" vs "run_threaded"

Derived from Tawn Kramer's excellent video
https://www.youtube.com/watch?v=YZ4ESrtfShs

* Discuss update function

* Added Tawn's video

* More explanation of inputs and outputs

* Explain shutdown

* typo

* typo

* Make clear that threaded parts can run faster

* Remove part about running faster than main loop.

It appears that the main loop block threaded parts from running faster

* Replace Travis CI with GitHub Actions (#801)

* Add github action files and remove travis files

* Suppress train tests in github actions

* Improvements in workflow, allow linter failure and don't stop build matrix on single os failure and add missing linter trigger on PRs

* Replace Travis CI with GitHub Actions (#801)

* Add missing pc.yml

* Add "./" before shell script so it will run (#805)

* Add "./" before shell script so it will run

* Add automatic pushing of docs (#806)

* Adding auto push donkey docs for changes to docs in master

* Add missing checkout.

* Fix heading in faq

* Add force and verbose flag to mkdocs

* Fix link to roll-your-own in faq.md

* Fix minor typos in faq.md

* Fixed import for tub writer

* Revert unintended changes to code from merge from master.

* Added "DRIVE_TRAIN" back to compete template, too (#809)

Again, apologies to everyone whose installation has been failing. Blame Travis!

* Added DRIVE_TRAIN back (#808)

This was causing everyone's installations to fail

Co-authored-by: Jonathan Tse <jonathan@tsez.net>
Co-authored-by: Tawn Kramer <tawnkramer@gmail.com>
Co-authored-by: Rahul Ravikumar <tikurahul@gmail.com>
Co-authored-by: Jordan Whited <jordan@jordanwhited.com>
Co-authored-by: wallarug <wallarug@coliemore.com.au>
Co-authored-by: Craig <cfox570@mac.com>
Co-authored-by: Meir Tseitlin <meir.tech@gmail.com>
Co-authored-by: Tim Gates <tim.gates@iress.com>
Co-authored-by: Eric Wiener <ericwiener3@gmail.com>
Co-authored-by: Chris Anderson <analoguedevices@gmail.com>
Co-authored-by: Chris Anderson <gca2@earthlink.net>
DocGarbanzo added a commit that referenced this issue Apr 29, 2021
* - Update tensorflow version to 1.15.0
- Add doc for Jetpack 4.4
- Remove opencv installation

* Add dataset and pre-trained model page

* fix issue #634 (#646)

- remove jquery dependency
- add clearTimeout

* Allow overriding WEB_CONTROL_PORT from env variable

* pin h5py version

* fix h5py version for mac

* * Update doc with donkey train command. (#709)

* Update doc with developer section for building own models in donkey 4.1
* Integrate changes from PR feedback

* Donkey 4.x is now official (#723)

* Update nano install docs - python3-opencv vs libopencv-python

* change slack to discord on readme

* Donkeycar 4.x release.  (#644)

## Major Improvements

- New Datastore.
- More ways to pre-process image data for training. 
- Use the 2.x version of Tensorflow. 
- Lots of other minor improvements.

* Improvements to the car app and handling of KerasPilot parts: (#648)

* Improvements to the car app and handling of KerasPilot parts:
* Created a simpler webserver or joystick car app by modifying and renaming the basic_web into basic template and switched this on as default. Also renamed the target from 'manage.py' to 'drive.py' because there is only driving and no training included
* Simplified the handling of uint8 and float32 numpy image arrays. KerasPilot.run() now expects uint8 data, transforms into float32 and delegates to its children. The corresponding rescaling step is gone from the car app
* smaller updates/fixes to environment and config files
* added support for tflite pilots in makemovie

* Improvements to the car app and handling of KerasPilot parts:
* Added docstring to KerasPilot methods
* Fixed bad merge for model types in complete config

* Add configuration to allow creating sub directories for each tub (like the legacy tub) or by default store all recordings in the data directory directly. (#649)

* Update setup.py with progress module for pi (#650)

* Update setup.py

* Update setup.py

Made changes online.

* Add testing for training: (#651)

* added example tub data as tar.gz in tests with 1000 records
* check validation data size in train
* created new test_train.py
* added support for read-only tub, required to create r/o tub in tmp dir
* changed loss in categorical model to equally weight throttle and steering
* changed mod on scripts to u+x

* Rename `drive.py` to `manage.py` to preserve CLI compat. (#656)

* Train still prompts you to move to then new entry point.
* Also fixes #655

* Cleanup exit handlers in the new datastore. (#657)

* Minor datastore_v2 improvements. (#658)

* Add __exit__ handlers again.
* Use `os.linesep` to deal with line separators consistently.

* Be explicit about newline characters (#660)

* Be explicit about newline characters #2 (#661)

* Remove the extra flush(). Windows is less forgiving (#662)

* Remove redundant code (#663)

* Windows Doc Updates (#668)

Added more options for Installing Donkey Car on Windows.  

- Anaconda
- Native
- Windows Subsystem for Linux (WSL) - experiential

These options give more flexibility and could make deployment easier for some individuals.  I personally always install donkey car natively onto Python installed on the System.  I will be looking more into WSL going forward as it has some interesting benefits.

* Integrate osx into travis. (#665)

* add in --user flag for MakeMovie so that you can select if you want to draw the line on the video or not.  default: true

* updated args.draw_user_input

* update to include recommendations

* added in brake functionality for simulator only

fix typo in drivemode return which checked pilot/throttle instead of brake

* fix autorope/issue #671 (#672)

* Jonathans changes from issue #634 and PR #646 (#676)

* Bump version to 4.0.1 (#677)

* Fix template docopt, as it's called managed.py and not drive.py

* Allow overriding WEB_CONTROL_PORT from env variable

* - Add simulator support to basic.py (#682)

- Update cfg_basic.py with simulator parameters

* Switch to using memory-mapped files when reading. (#691)

* This makes reading a 100x faster.

* new: mqtt telemetry support (#688)

* A configurable training pipeline. (#693)

* Implement a Lazy transformable pipeline.
* Implement basic batching. However, this will need to be improved
  further for models with multiple outputs.
* Replace the old `Sequence` implementation used with a new `Pipeline`.

Test: Ran end to end tests.

* The telemetry mqtt test is breaking w/ a timeout on the connection to the server.

* change the public mqtt server name to one that's listening

* * Overriding inference in TensorRT as pass as it is not needed here. (#698)

* Need to implement inference to run on the normalised image (#699)

* Fix sequence iterators (#704)

* Change training pipeline from tf.Sequence to tf.data (#701)

* Improve pipeline use: move from building list of pipelines of single transforms to building a single pipeline with a list of transforms (actually just looping through function to go from TubRecord -> image -> augment -> normalise -> x and TubRecord -> y).

Fixed TfmIterators and TfmIterables.
* Iterables are the containers and are sized - these are the user objects
* Iterators are protocol objects to allow iteration, they have no logic and are local to the Iterables
* build/map_pipeline both return sized Iterables
* removed all batch logic, this is not required
* still commented but left code that uses generator based pipeline as this is simpler code

Using new small temporary pipeline generator
* this keeps the TubSequence lazy and avoids to roll out the pipeline into a list
* added a test to check consistency of the pipeline
* remove empty (after moved) augmentation file
* removed augmentation from old tub (as it's not needed and we removed the old augmentation)

New pipeline changes:
* moved augmentation into own class that is used above and can be used a  threaded or non-threaded part
* moved train functionality out of template and added 'donkey train', train.py just a simple dummy script for backward compatibility

* Address code reviews:
* Re-base on current dev to use un-altered sequence.py
* Add iterator consistency test to pipeline tests
* Undo changes in fast_stretch.py
* better tf shape manipulation
* small code improvements in training.py
* remove sleep in augment part

* Address code reviews:
* Add clearing of tubrecord list and minor renamings

* * Add support for multi-dimensional model input and making the x, y interface symmetrical on the model / training interface: (#707)

- x/y_transform extract x, y as numpy arrays or floats out of the record
  - x/y_translate convert the numpy arrays of floats into tf-readable dictionaries used in tf data.
* Simplify model interface by implementing output_types() directly in the base class using output_shapes() dictionary.
* Adding developer guide for own model development
* Updated donkey command documentation
* Improve asserts and type hints in keras.py
* Added missing __init__.py in parts module.
* Add cool ascii text for donkey init and update yml and setup files including mypy
* Remove model training test from Travis and change the test to relative convergence. This avoids random fall overs in CI.
* Added test of tf.data as used in the training pipeline through re-implementation of data transformation from tub records to tf expected dictionaries, for all currently supported models.

* Minor changes for 4.1 in tub conversion script and developer doc (#708)

* Minor changes for 4.1
* Update conversion script to translate discontinuous data.
* In developer guide add disclaimer for version and correct intra-page links.

* * Update doc with donkey train command.
* Update doc with developer section for building own models in donkey 4.1
* Integrate changes from PR feedback

* Incorporate PR feedback
* Add empty records concept to tub
* Minor updates to conversion script

* Incorporate PR feedback
* Add empty record type into conversion script

* docs: fix simple typo, unfarmilar -> unfamiliar (#714)

There is a small typo in docs/guide/host_pc/setup_windows.md.

Should read `unfamiliar` rather than `unfarmilar`.

* Added the ability to train PyTorch models (#706)

* Added in PyTorch and PyTorch Lightning to train a DC model

Successfully able to train a ResNet18-based model using PyTorch
Lightning.

* Removed hard-coded max number of epochs (used for debugging)

* Added an inference transform to ResNet18 to convert PIL -> tensor

* Unsqueezed input tensor during inference for batch dimension

* Reshaped ResNet output from (1, 2) to (2,)

* Added the ability to resume training from a checkpoint

* Added helper print message when tensorboard logging is enabled

* Updated docopt arguments for train.py. Made checkpoint optional

* Changed TorchTubDataset from sub-classing Dataset to IterableDataset

This was done in response to #706 (comment)

* Renamed load_image_arr to load_image. Updated load_pil_image

load_pil_image will now handle converting the image to greyscale
(vs. this being done in load_image).

* Updated enviroments for Mac and Ubuntu. Set Python=3.7

* Updated installation documentation. Added script to setup Nano

Updated the installation instructions for Ubuntu, Mac, and Windows.
Clarified a common issue that occurs when running pip install -e .[pc]
with ZSH.

Also added a script to setup the Jetson Nano and updated the documentation
for the Nano (it previously was installing tensorflow 1.x).

* Added torch flag to setup.py to install pytorch

* Moved pytorch training into base.py and removed from train.py

* Moved Jetson Nano python package installation into requirements.txt

* Formatted with PEP8 to clean up pytorch code

* Updated docs to provide work-around for ZSH pip install -e .[pc]

* Removed duplicate dependencies in conda env files

* ResNet18 torch model now returns training loss history

* Added test file for PyTorch training

Still need to make sure this passes Travis CI.

* Added lightning_logs to .gitignore

* You can now specify the default AI framework to use in config.py

This reduces the number of command line arguments you are required
to provide.

* get_model_by_type for PyTorch now lazy imports ResNet18

* Added help message to torch_train. Got rid of linear model type

* Updated pytorch tests and fixed some syntax errors

* ResNet18 example input shape updated to be (B, 3, 224, 224)

Also now passing output_shape to load_resnet18 to modify how many
output classes are used

* No longer pinning requirement versions for Jetson Nano

* Fixed formatting in setup.py

* update configuration so that IMAGE_H and IMAGE_W are passed through to the simulator (#674)

Co-authored-by: Jordan Whited <jordan@jordanwhited.com>
Co-authored-by: Tawn Kramer <tawnkramer@gmail.com>
Co-authored-by: wallarug <wallarug@coliemore.com.au>
Co-authored-by: sctse999 <jonathan@tsez.net>
Co-authored-by: DGarbanzo <47540921+DocGarbanzo@users.noreply.github.com>
Co-authored-by: Craig <cfox570@mac.com>
Co-authored-by: DocGarbanzo <dirk.prange@web.de>
Co-authored-by: Meir Tseitlin <meir.tech@gmail.com>
Co-authored-by: Tim Gates <tim.gates@iress.com>
Co-authored-by: Eric Wiener <ericwiener3@gmail.com>

* Updated path follower with Intel T265 (#729)

Properly rebased on Master this time, I hope

Co-authored-by: Chris Anderson <gca2@earthlink.net>

* Remove '-dev' from version output (#734)

* Updated training instructions. (#744)

* Make clear how to call "run" vs "run_threaded"

Derived from Tawn Kramer's excellent video
https://www.youtube.com/watch?v=YZ4ESrtfShs

* Discuss update function

* Added Tawn's video

* More explanation of inputs and outputs

* Explain shutdown

* typo

* typo

* Make clear that threaded parts can run faster

* Remove part about running faster than main loop.

It appears that the main loop block threaded parts from running faster

* Replace Travis CI with GitHub Actions (#801)

* Add github action files and remove travis files

* Suppress train tests in github actions

* Improvements in workflow, allow linter failure and don't stop build matrix on single os failure and add missing linter trigger on PRs

* Replace Travis CI with GitHub Actions (#801)

* Add missing pc.yml

* Add "./" before shell script so it will run (#805)

* Add "./" before shell script so it will run

* Add automatic pushing of docs (#806)

* Adding auto push donkey docs for changes to docs in master

* Add missing checkout.

* Fix heading in faq

* Add force and verbose flag to mkdocs

* Fix link to roll-your-own in faq.md

* Fix minor typos in faq.md

* Fixed import for tub writer

* Added "DRIVE_TRAIN" back to compete template, too (#809)

Again, apologies to everyone whose installation has been failing. Blame Travis!

* Added DRIVE_TRAIN back (#808)

This was causing everyone's installations to fail

* ubuntu.yml was renamed pc.yml (#819)

* Push an important change (for a PC conda file should be pc.yml, not ubuntu.yml) from Dev to Master (#822)

* Added manual installation of Tensorflow with --user flag

Conda says not to put "--user" in yml scripts so we'll have the users do this manually until we get to the bottom of the TF 2.2 installation errors on Windows

* Changed pc.yml to windows.yml as per PR review

Avoids ambiguity between computer type and OS type (PCs can run both Windows and Ubuntu)

* Take out Tensorflow from automated windows installation (#824)

* Take out Tensorflow from automated windows installation because it's causing …  …an error with latest conda
* Changed pc.yml to windows.yml
* Rename pc.yml to windows.yml
* Create ubuntu.yml

* Update python-package-conda.yml

Update workflow after rename of ubuntu conda file.

* Fix ubuntu yml file and update ubuntu install docs.

* some more changes (#831)

* Fix typo (#836)

* Add link to parts guide (#841)

* Fixed markdown typo (#843)

* Fixed markdown typo

* Create docs.md

* Added link

* Update docs.md

* Fixed typo.

* Removed mkdocs and gh actions referring to docs.

* Release 4.2 (#849)

* Copied release_4_2 which itself is a copy of dev and removed 2 accidental merges 61f4742, cb50317
* Fixed small bug in UI
* Merged from master

Co-authored-by: Jonathan Tse <jonathan@tsez.net>
Co-authored-by: Tawn Kramer <tawnkramer@gmail.com>
Co-authored-by: Rahul Ravikumar <tikurahul@gmail.com>
Co-authored-by: Jordan Whited <jordan@jordanwhited.com>
Co-authored-by: wallarug <wallarug@coliemore.com.au>
Co-authored-by: Craig <cfox570@mac.com>
Co-authored-by: Meir Tseitlin <meir.tech@gmail.com>
Co-authored-by: Tim Gates <tim.gates@iress.com>
Co-authored-by: Eric Wiener <ericwiener3@gmail.com>
Co-authored-by: Chris Anderson <analoguedevices@gmail.com>
Co-authored-by: Chris Anderson <gca2@earthlink.net>
Co-authored-by: Joep B <joepbarmentlo@gmail.com>
Co-authored-by: Maxime Ellerbach <maxime@ellerbach.net>
Ezward added a commit that referenced this issue Feb 4, 2023
- I used the wrong symbol for adding the #2 isr
Ezward added a commit that referenced this issue Feb 14, 2023
- I used the wrong symbol for adding the #2 isr
DocGarbanzo pushed a commit that referenced this issue Feb 16, 2023
* Add tachometer, odometer and kinematics part
- tachometer takes an encoder and returns revolutions
- odometer coverts revolutions to distance and velocity
- kinematics converts odometry to pose estimates
- BicyclePose part implements the pose estimation pipeline for a
  car-like vehicle (fixed back wheels, turnable front wheels)
- UnicyclePose part implements the pose estimation pipeline
  for differential drive vehicles.

* refactor pose estimation into a single part
- UnicyclePose handles encoder/tachometer/odometer/kinematics
  for differential drive.
- BicyclePose handles encoder/tachometer/odomter/kinematics
  for car-like vehicle
- add a mock encoder that is driven by throttle and steering
  input.  This allows use to simulate the vehicle without
  a full-on simulator.
- Fix the drawing of the path so that it handles the
  fact that Y increases going north.

* comment out logging of pose to quiet the console

* add arduino encoder sketches

* remove unicode characters that prevent compilation of arduino sketch

* clean up comments a little

* Add more documentation to the quadrature_encoder.ino sketch

* Add interrupt mode to the mono encoder
- Interrupts mode can handle much higher tick rates, but does
  a poor job of debouncing.  It is appropriate for high resolution
  optical encoders.

* Remove spurious unicode beta character

It was at the end of `#define ENCODER_OPTIMIZE_INTERRUPTS` and so could have been causing the #define to be unrecognized.

* removed digital write high in mono encoder

* Fix syntax error if only using one channel in int mode
- there was a syntax error if only one pin was defined
  and it was being used in interrupt mode; that is fixed.
- Add more documentation to the mono_encoder.ino sketch

* Added a quadrature encoder sketch with no libraries
- The sketch counts ticks on a quadrature encoder without
  using 3rd party libraries.
- This is done 1) to make is simpler to compile and download
  the sketch; the user does not need to figure out what
  library to use. 2) the library that was in use only worked
  on AVR hardware and causes compilation errors on other hardware.
- if USE_ENCODER_INTERRUPTS is defined when the sketch is compiled,
  then the interrupt driven tick counting will be used.  This has
  no debounce logic, so it is not suitable for mechanical encoder,
  but is appropriate for optical or hall effect encoders.
- if USE_ENCODER_INTERRUPTS is NOT defined, then this used
  polling mode with debouncing, which is suitable for
  mechanical encoders, but may be to slow for high resolution
  optical or hall effect encoders.

* Fix bug in mono encoder sketch
- it had literal 2 for size of encoders array, so when there
  was only one encoder we got memory overwrites.

* Fix bug in quadrature nolib sketch
- I used the wrong symbol for adding the #2 isr

* minor change to quadrature nolib
- use array rather than pointer in readEncoders() argument.

* Updated quadrature_encoder.ino to not require library
- the library we used was only for AVR microcontrollers,
  so the code could not work on RPi Pico for instance.
- I reimplemented the sketch to have explicit polling
  mode logic that is suitable for noisy mechanical encoders.
- To that I added an interrupt driven mode that works if
  there is one interrupt capable pin available for each encoder.
  This is suitable for optical or hall effect encoders that
  do not need to be debounced.

* fix merge error in path_follow.py

* Fix RPi_GPIO_Servo part so it does not need GPIO in constructor
- the constructor has a default for pin_scheme based on the GPIO object.  The GPIO object will not be defined on a PC.
- this change use None as a default and then checks for it and set the GPIO default if it is None.
- This fixes a bug in the actuator unit test.

* added non-threaded run() to UnicyclePose and BicyclePose for testing

* Improved accuracy of MockEncoder by propagating fractional ticks

* Updated add_odometry() so we could add as non-threaded for testing.

* Vehicle loop prints out number of iterations and total time
- The vehicle loop now counts frames accurately; prior to
  this change the counter would be one more than the actual
  number of executed frames
- When the vehicle loop terminates the number of executed
  iterations and the total time are printed and returned
  to the caller.
- This was used for the kinematics tests because we needed
  to know how long the vehicle drive loop executed so
  we could calculate the expected distance that the
  mock vehicle drove.

* Rewrite of the kinematics unit tests
- We dramatically changed how a mock drivetrain handles
  odometry.  Now is uses a velocity based on encoder
  ticks per second scaled by throttle.  This is a more
  realistic mock, but it is harder to test.
- The tests setup a vehicle with a mock encoder, then
  run the vehicle loop for a set number of iterations.
  The vehicle loop now returns how long the loop ran and
  this is used along with the configuration for ticks_per_second
  from the mock encoder to calculate how far the vehicle travelled.
  Then the kinematics model is applied to see if the resulting
  ending pose matches the expected pose.

* Adjust bicycle kinematics to use front wheel reference
- the code now uses the front wheels as the reference
  point for the calculations
- this fixes the unit test, which were using the front wheels
  while the code used the back wheels.

* relax orientation test to 3% accuracy

* updated based on PR feedback

* removed hard-coded logging level

* Update vehicle.py

- change print statement to a log

* Update setup.py version="4.4.dev5"

version="4.4.dev5"
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

No branches or pull requests

1 participant