RoboCup-SSL / ssl-vision

Shared Vision System For The RoboCup Small Size League
GNU General Public License v3.0
88 stars 109 forks source link

Use the camera time by syncing it with the system time #179

Closed g3force closed 3 years ago

g3force commented 3 years ago

Some camera APIs provide a camera-internal time for each image. This is much more accurate than using the system time.

The camera-internal time must be converted to unix time, because consumers of the ssl-vision message expect the timestamp to be in unix time. This is especially important when using multiple ssl-vision instances.

g3force commented 3 years ago

Tested with the Spinnaker camera on a SSL NUC

Using system time: image

Using new TimeSync: image

g3force commented 3 years ago

@rolfvdhulst Could you test if it compiles and runs with the Basler module? I do not have the SDK installed.

rolfvdhulst commented 3 years ago

Do want to say I really appreciate this work though, I think this will help vision quality during matches a lot (at least, we saw notable differences).

g3force commented 3 years ago

Thx. I've reverted the removal of the camera frequency.

If it does not work, could you apply your suggested fixes? I think, as a reviewer you should even have push access to the branch :thinking:

rolfvdhulst commented 3 years ago

Compiles properly now! We cannot physically test with the Basler Camera's for a while (altleast a few months), so I suggest merging this. In the case of any issues a new PR could be made.