Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey Folk maintainers!
I had some problems getting my camera (Logitech C270) to work. Other cameras could also hit these code paths, so I'm sharing the fix here.
Problem and identified causes
When I was setting up my folk instance, I got stuck at the calibration step. Although the device was showing up in the cameras list, the camera preview was not showing anything on the
/setupand/calibratepages. Looking at the Folk log I could see that camera selection was failing:After a bit of experimentation, it looks like my camera was too slow to start up. Extending the timeout to 2 seconds and adding a retry mechanism fixed this issue for me. The C270 often only starts streaming on the second attempt with my fix:
At this point I could now see the camera preview on
/setupand/calibrate, but when I started the calibration process, the AprilTags weren't being recognised at all. The tag grid was showing but nothing happened when I positioned the calibration board correctly.Looking at the logs I was now seeing lots of these messages:
Turns out that this Turbo jpeg message was actually a warning rather than a fatal error. I guess my particular camera streams slightly weird data. Folk treated the warning as a fatal error hence no AprilTag detection.