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

JPG files don't recording in the data folder #996

Closed
Anton890304 opened this issue Mar 9, 2022 · 10 comments
Closed

JPG files don't recording in the data folder #996

Anton890304 opened this issue Mar 9, 2022 · 10 comments

Comments

@Anton890304
Copy link

Anton890304 commented Mar 9, 2022

I found the issue in Donkey Car version 4.3.5 from the dev branch. Dataset writing doesn't work. JPG files don't recording in the data folder.
In the Donkey Car web interface, the (Start Recording [r]) button doesn't switch to recording mode. At that time in the JupyterLab terminal I see only: INFO:donkeycar.parts.web_controller.web:{'recording': False}
When toggling recording on/off on the gamepad in the JupyterLab terminal, I see only: recording: False

  • Hardware - JetsonNano
  • myconfig.py parameter AUTO_RECORD_ON_THROTTLE = True
@DocGarbanzo
Copy link
Contributor

Hi @Anton890304, are you also driving? Because you will only record images when you use throttle. Also, what do you mean by JupyterLab terminal?

@Anton890304
Copy link
Author

Anton890304 commented Mar 16, 2022

Hi @DocGarbanzo
I push the throttle, but recording doesn't work.
Yes i use JupyterLab + web interface - :8887/drive

@BrianHenryIE
Copy link
Contributor

BrianHenryIE commented Mar 20, 2022

I have the same issue on a fresh Donkey install on Jetson Nano (not a fresh Ubuntu install).

Same problem existed with PS4 controller, but this output is web controller. The only changes in myconfig.py are the camera and PCA9685_I2C_BUSNUM = 1.

(env) brian@briannano:~/projects/donkeycar$ python ~/mycar/manage.py drive 
________             ______                   _________              
___  __ \_______________  /___________  __    __  ____/_____ ________
__  / / /  __ \_  __ \_  //_/  _ \_  / / /    _  /    _  __ `/_  ___/
_  /_/ // /_/ /  / / /  ,<  /  __/  /_/ /     / /___  / /_/ /_  /    
/_____/ \____//_/ /_//_/|_| \___/_\__, /      \____/  \__,_/ /_/     
                                 /____/                              

using donkey v4.3.7 ...
WARNING:donkeycar.parts.pins:pigpio was not imported.
loading config file: /home/brian/mycar/config.py
loading personal config over-rides from myconfig.py
INFO:__main__:PID: 9427
cfg.CAMERA_TYPE CSIC
INFO:__main__:cfg.CAMERA_TYPE CSIC
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 5 
   Output Stream W = 1280 H = 720 
   seconds to Run    = 0 
   Frame Rate = 120.000005 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (933) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
INFO:donkeycar.parts.camera:CSICamera opened...
INFO:donkeycar.parts.camera:...warming camera
INFO:donkeycar.parts.camera:CSICamera ready.
INFO:donkeycar.vehicle:Adding part CSICamera.
Starting Donkey Server...... you can now go to briannano.local:8887 to drive your car.
INFO:donkeycar.vehicle:Adding part LocalWebController.
INFO:donkeycar.vehicle:Adding part ThrottleFilter.
INFO:donkeycar.vehicle:Adding part PilotCondition.
INFO:donkeycar.vehicle:Adding part RecordTracker.
INFO:donkeycar.vehicle:Adding part DriveMode.
INFO:donkeycar.vehicle:Adding part AiLaunch.
INFO:donkeycar.vehicle:Adding part AiRunCondition.
INFO:donkeycar.parts.actuator:PWM Steering created
INFO:donkeycar.parts.actuator:Init ESC
INFO:donkeycar.parts.actuator:PWM Throttle created
INFO:donkeycar.vehicle:Adding part PWMSteering.
INFO:donkeycar.vehicle:Adding part PWMThrottle.
Using catalog /home/brian/mycar/data/catalog_0.catalog
INFO:donkeycar.vehicle:Adding part TubWriter.
You can now go to <your hostname.local>:8887 to drive your car.
INFO:donkeycar.vehicle:Starting vehicle at 20 Hz
INFO:tornado.access:304 GET /drive (fe80::c75:5368:eb1a:3d6e%wlan0) 15.38ms
INFO:tornado.access:200 GET /static/jquery-3.1.1.min.js (fe80::c75:5368:eb1a:3d6e%wlan0) 17.98ms
INFO:tornado.access:200 GET /static/nipple.js (fe80::c75:5368:eb1a:3d6e%wlan0) 12.91ms
INFO:tornado.access:200 GET /static/bootstrap/3.3.7/js/bootstrap.min.js (fe80::c75:5368:eb1a:3d6e%wlan0) 13.96ms
INFO:tornado.access:200 GET /static/main.js (fe80::c75:5368:eb1a:3d6e%wlan0) 14.50ms
INFO:tornado.access:200 GET /static/ui/1.12.1/jquery-ui.min.js (fe80::c75:5368:eb1a:3d6e%wlan0) 82.18ms
INFO:tornado.access:101 GET /wsDrive (fe80::c75:5368:eb1a:3d6e%wlan0) 1.96ms
New client connected
^CINFO:donkeycar.vehicle:Shutting down vehicle and its parts...
INFO:donkeycar.parts.camera:Stopping CSICamera
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
INFO:donkeycar.vehicle:Part Profile Summary: (times in ms)
INFO:donkeycar.vehicle:
+--------------------+------+------+------+------+------+------+-------+
|        part        | max  | min  | avg  | 50%  | 90%  | 99%  | 99.9% |
+--------------------+------+------+------+------+------+------+-------+
|     CSICamera      | 0.46 | 0.02 | 0.03 | 0.03 | 0.04 | 0.07 |  0.19 |
| LocalWebController | 5.26 | 0.04 | 0.08 | 0.05 | 0.13 | 0.61 |  2.42 |
|   ThrottleFilter   | 0.07 | 0.02 | 0.02 | 0.02 | 0.02 | 0.04 |  0.07 |
|   PilotCondition   | 0.08 | 0.01 | 0.01 | 0.01 | 0.02 | 0.04 |  0.07 |
|   RecordTracker    | 0.14 | 0.01 | 0.01 | 0.01 | 0.02 | 0.03 |  0.10 |
|     DriveMode      | 0.17 | 0.02 | 0.02 | 0.02 | 0.03 | 0.05 |  0.16 |
|      AiLaunch      | 0.08 | 0.01 | 0.02 | 0.02 | 0.02 | 0.04 |  0.06 |
|   AiRunCondition   | 0.09 | 0.01 | 0.01 | 0.01 | 0.02 | 0.02 |  0.07 |
|    PWMSteering     | 0.11 | 0.02 | 0.03 | 0.03 | 0.04 | 0.06 |  0.10 |
|    PWMThrottle     | 0.07 | 0.01 | 0.02 | 0.02 | 0.03 | 0.04 |  0.07 |
+--------------------+------+------+------+------+------+------+-------+
(env) brian@briannano:~/projects/donkeycar$ ls -l ~/mycar/data
total 12
-rw-rw-r-- 1 brian brian    0 Mar 20 15:15 catalog_0.catalog
-rw-rw-r-- 1 brian brian  111 Mar 20 15:15 catalog_0.catalog_manifest
drwxrwxr-x 2 brian brian 4096 Mar 20 15:15 images
-rw-rw-r-- 1 brian brian  236 Mar 20 15:15 manifest.json
(env) brian@briannano:~/projects/donkeycar$ ls -l ~/mycar/data/images
total 0

The "start recording" button in the web interface never changed (brief flash) when I clicked it:

Screen Shot 2022-03-20 at 3 16 43 PM

And when I clicked the button on the PS4 controller in an earlier attempt, this was the output:

auto record on throttle is enabled.
recording: False

Edit: I just remembered, my Python environment isn't strictly per the docs. I have Tensorflow 2.7.0 installed (because I couldn't install an old enough version on my M1 Mac), and when I was installing the packages in "Step 5: Setup Python Dependencies" I removed the version requirements because I was working on Oak-D-Lite support which had higher version requirements (IIRC, on Numpy). I probably won't be able to test a clean environment for at least a month (I'm going to Ireland to visit my parents!).

@Anton890304
Copy link
Author

@BrianHenryIE
Did you install the Donkey Car following the instructions from docs.donkeycar.com or the instructions from https://github.com/autorope/donkeycar/blob/main/install/nano/install-jp44.sh ?

I installed Donkey Cart following the instructions https://github.com/autorope/donkeycar/blob/main/install/nano/install-jp44.sh

vftfbg

Consequently. I have installed the recommended versions, but the Recording does not work.

What do you think is the problem?

@BrianHenryIE
Copy link
Contributor

The /jp/v44 on that install .sh file is older than the docs which uses jp/v45, so I did not follow that.

For the most part, I did follow docs.donkeycar.com. But, as I said above, I'm trying to add a new part with higher requirements so I did not follow them strictly.

If I were you, I would follow docs.donkeycar.com instructions. It sounds like neither of use followed them properly, so it would be a good way to narrow down was it our own fault.

Best yet, if we export our broken environment with:

pip freeze > issue996.txt

Then once it is working we can figure what package difference caused the issue.

@Ezward
Copy link
Contributor

Ezward commented Mar 23, 2022

It's possible it is a bug that got added with this pull request #985 That PR was to make the webui and the game controllers play nice together. There was a lot of state passed around that had to be synchonized; it's possible I messed up the recording state.

@Ezward
Copy link
Contributor

Ezward commented Mar 23, 2022

I think the issue may be with that PR; line 258 of donkeycar/parts/web_controller/web.py; self.application.recording = data.get('recording', self.application.recording) should probably be

        if data.get('recording') is not None:
            self.application.recording = data['recording']
            self.application.recording_latch = self.application.recording

That value is not getting latched, and so it getting overwritten. @BrianHenryIE or @Anton890304 Please try making that change and see if it works for you.

@Ezward
Copy link
Contributor

Ezward commented Apr 5, 2022

There is a duplicate of this issue here: #1005

@Anton890304
Copy link
Author

@Ezward Thank you very much))))

DocGarbanzo pushed a commit that referenced this issue Apr 6, 2022
@Ezward
Copy link
Contributor

Ezward commented Apr 7, 2022

The fix is employed in this PR #1007 which is now merged.

@Ezward Ezward closed this as completed Apr 7, 2022
DocGarbanzo pushed a commit that referenced this issue Apr 24, 2022
- fix for #996
- version="4.3.10" (on main only, here it is 4.3.6.3).

(cherry picked from commit 6c9ecb9)
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

4 participants