photonvision
photonvision copied to clipboard
[Protobuf] Make MultiTarget result optional
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.
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 |