Closed skeltoh closed 3 years ago
I think I see what's going on here --
the camera module checks if the picamera package is present: https://github.com/wehr-lab/autopilot/blob/d352feef3b8aac8699fbc4c27270580d0a48ab0f/autopilot/hardware/cameras.py#L37-L41
and then if it isn't detected, the PiCamera class bails on initializing: https://github.com/wehr-lab/autopilot/blob/d352feef3b8aac8699fbc4c27270580d0a48ab0f/autopilot/hardware/cameras.py#L655-L657
and an exception is logged but not raised.
So all this that follows & sets up the object doesn't happen, but the object is still created: https://github.com/wehr-lab/autopilot/blob/d352feef3b8aac8699fbc4c27270580d0a48ab0f/autopilot/hardware/cameras.py#L659-L668
Which would explain all the above behavior.
does this fix? https://github.com/wehr-lab/autopilot/commit/9637ec771f4ce181a6b5139a0f8d67eb7d341803
Looks like the real problem was I didn't have PiCamera installed, but that bug fix alerts if it isn't. Thanks!
The example code for capturing video here (https://docs.auto-pi-lot.com/en/latest/guide/quickstart.html) produces an error (I added the name to avoid a warning):
If I change the code to
Then I get:
If I add:
Then I get:
If I add:
Then I get:
At this point, it seems like something strange is going on with getters/setter methods in this class. It seems kind of odd since I see
self._picam_writer = None
in PiCamera.init.As a note, I actually had another error before I installed ffmpeg with apt. Maybe that should be added to the setup scripts.