autorope / donkeycar

Open source hardware and software platform to build a small scale self driving car.
http://www.donkeycar.com
MIT License
3.17k stars 1.3k forks source link

KeyError: 'user/angle' #1103

Closed Ahrovan closed 1 year ago

Ahrovan commented 1 year ago

Command : donkey train --tub ./data --model ./models/mypilot.h5

ERROR : 2023-02-26 22:35:30.444913: W tensorflow/core/framework/op_kernel.cc:1755] Unknown: KeyError: 'user/angle'

How to solve:

Why occurred ? donkey car web controller saved all steering values as "user/angle" not "user/steering" image

Ezward commented 1 year ago

This is my error. I just merged a change that renamed 'user/angle' to 'user/steering' as part of a larger change, forgetting that this would obsolete old data. I will work on a fix immediately.

Ezward commented 1 year ago

@Ahrovan I've made a change in this branch; https://github.com/autorope/donkeycar/tree/1104-fix-user-angle-in-deep-learning It will now again save steering data with the 'user/angle' label ratehr than 'user/steering' However this does not fix data that was saved with 'user/steering',but you say you have a work-around for data that was erroneously saved using 'user/steering':

Please give the branch a test and let me know here is this fixes the data recording issue. Thanks and sorry for the trouble.

You will need to

  1. from the root folder of your donkeycar repo: checkout the branch
    git checkout 1104-fix-user-angle-in-deep-learning
  2. make sure the donkeycar python environment is active, then from your mycar folder (the folder where you are running the car from), recreate the manage.py file by overwriting it;
    donkey createcar --overwrite --path=.

    we can use --path=. because we are already in the mycar folder.

  3. Now you can run the car and save data and verify that it is saving steering as 'user/angle'
Ezward commented 1 year ago

See PR https://github.com/autorope/donkeycar/pull/1105 for a fix

Ezward commented 1 year ago

That PR merged. I've tested in by collecting data, training and driving on autopilot.