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

1104 fix user angle in deep learning #1105

Merged
merged 3 commits into from Feb 27, 2023
Merged

Conversation

Ezward
Copy link
Contributor

@Ezward Ezward commented Feb 26, 2023

I added a serious bug in complete.py when I renamed the steering output from 'user/angle' to 'user/steering'. It turns out the the literal string 'user/angle' is used all over the place in the deep learning pipeline and DonkeyUI, so we can't change it.

This fix the fixes complete.py so it uses 'user/angle' and 'pilot/angle'. This has been tested doing data collection, training and inference in autopilot mode.

The fix works by renaming the 'user/steering' value to 'user/angle' so both are in memory. I found and fixed a bug in the Pipe() part that happens when renaming a single argument; Python's variable argument facility outputs a tuple with two elements when only a single argument was passed; I now check for that and explicitly send back the single argument.

- that had been renamed user/steering in the PR that
  merged the computer vision template.
- Much code in the deep learning pipeline explicitly
  hard-codes the literal `user/angle` so the deep learning
  code needs to continue to use that label.
- This fix uses the Pipe() part to rename 'user/steering'
  to 'user/angle' immediately after it is emitted by the
  controller part.
- Pipe.py would output a bad tuple if only one argument
  was being passed throught.  Now it explictly checks.
- This caused complete.py to have invalid 'user/angle' values.
@Ezward Ezward self-assigned this Feb 26, 2023
@Ezward Ezward mentioned this pull request Feb 26, 2023
@zlite
Copy link
Contributor

zlite commented Feb 27, 2023

LGTM. Nice use of Pipe to copy between two namespaces

@zlite zlite merged commit de4d97b into main Feb 27, 2023
@Ezward Ezward deleted the 1104-fix-user-angle-in-deep-learning branch February 27, 2023 00:56
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.

None yet

2 participants