photonvision icon indicating copy to clipboard operation
photonvision copied to clipboard

[Protobuf] Make MultiTarget result optional

Open srimanachanta opened this issue 2 years ago • 2 comments

Passing an isPresent prop in the PNPResult doesn't make much sense instead of just passing an Optional<PNPResult>.

Based on #974 because I am too lazy to reimplement Packet

Also combines the ProtobufMultitargetResult and PNPResult messages and makes ProtobufMultitargetResult optional on ProtoufPipelineResult. This should reduce total serialization byte size as less messages need to be packed and optional saves time.

srimanachanta avatar Nov 24 '23 20:11 srimanachanta

Optional Multitarget Protobuf:

Name Size (Bytes)
DriverMode 9 Bytes
Reflective (1 Target) 290 Bytes
AprilTag Normal (4 tags) 1417 Bytes
AprilTag Multitag (4 tags) 1597 Bytes
AprilTag Multitag (4 tags) + Always do SingleTag 1597 Bytes
Aruco Normal (4 tags) 1417 Bytes
Aruco Multitag (4 tags) 1597 Bytes
Aruco Multitag (4 tags) + Always do SingleTag 1597 Bytes

srimanachanta avatar Nov 26 '23 00:11 srimanachanta