osrf / ovc

the Open Vision Computer
Apache License 2.0
198 stars 42 forks source link

OVC5 parallel ethernet interfaces #82

Closed luca-della-vedova closed 2 years ago

luca-della-vedova commented 2 years ago

This PR is a major rework and performance improvement on OVC5, specifically:

Upgraded from Debian Buster to Bullseye, it doesn't break anything so why not.

The architecture changes from a single socket and a manual queue of images to one socket per imager and fully multithreaded publish, where each imager waits for its interrupt and sends the frame on the matching socket. The six imagers / sockets have been split into three per USB interface, going to the onboard USB hub. The USB hub is capable of sending at least 6.4Gbps (2x 3.2Gbps, tested with iperf3).

The imager integration now requires the imager in CAM0 to be set as "primary", where it will be generating a trigger output and all the sensors from 1-5 will be "secondary" and using the trigger to synchronize the exposure. CAM5's trigger has been inverted for a quirk of one of the sensor we use (that has active low trigger line).

Support for time of flight has also been added to the host library, it expects a frame made of four concatenated phase frames and converts it to a distance frame. Tested with an heterogeneous set of 6 imagers (including rolling shutter, global shutter, time of flight) which sadly can't be made open source because of their documentation not being publicly available. Still, they all follow the same template as the pi camera, with the added feature of the primary / secondary configuration that can't be done for Picam v2 since it doesn't expose the trigger line to the connector.