mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-30 02:31:40 +00:00
Add message UUID and type names to hash and message defintion (#1409)
This commit is contained in:
@@ -26,17 +26,20 @@ import org.photonvision.utils.PacketUtils;
|
||||
// Assume that the base class lives here and we can import it
|
||||
import org.photonvision.targeting.*;
|
||||
|
||||
// WPILib imports (if any)
|
||||
import edu.wpi.first.util.struct.Struct;
|
||||
|
||||
|
||||
/**
|
||||
* Auto-generated serialization/deserialization helper for MultiTargetPNPResult
|
||||
*/
|
||||
public class MultiTargetPNPResultSerde implements PacketSerde<MultiTargetPNPResult> {
|
||||
// Message definition md5sum. See photon_packet.adoc for details
|
||||
public static final String MESSAGE_VERSION = "ffc1cb847deb6e796a583a5b1885496b";
|
||||
public static final String MESSAGE_FORMAT = "PnpResult estimatedPose;int16[?] fiducialIDsUsed;";
|
||||
|
||||
public final String getTypeString() { return MESSAGE_FORMAT; }
|
||||
public final String getInterfaceUUID() { return MESSAGE_VERSION; }
|
||||
@Override
|
||||
public final String getInterfaceUUID() { return "541096947e9f3ca2d3f425ff7b04aa7b"; }
|
||||
@Override
|
||||
public final String getSchema() { return "PnpResult:ae4d655c0a3104d88df4f5db144c1e86 estimatedPose;int16 fiducialIDsUsed[?];"; }
|
||||
@Override
|
||||
public final String getTypeName() { return "MultiTargetPNPResult"; }
|
||||
|
||||
@Override
|
||||
public int getMaxByteSize() {
|
||||
@@ -65,4 +68,17 @@ public class MultiTargetPNPResultSerde implements PacketSerde<MultiTargetPNPResu
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketSerde<?>[] getNestedPhotonMessages() {
|
||||
return new PacketSerde<?>[] {
|
||||
PnpResult.photonStruct
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Struct<?>[] getNestedWpilibMessages() {
|
||||
return new Struct<?>[] {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,17 +26,20 @@ import org.photonvision.utils.PacketUtils;
|
||||
// Assume that the base class lives here and we can import it
|
||||
import org.photonvision.targeting.*;
|
||||
|
||||
// WPILib imports (if any)
|
||||
import edu.wpi.first.util.struct.Struct;
|
||||
|
||||
|
||||
/**
|
||||
* Auto-generated serialization/deserialization helper for PhotonPipelineMetadata
|
||||
*/
|
||||
public class PhotonPipelineMetadataSerde implements PacketSerde<PhotonPipelineMetadata> {
|
||||
// Message definition md5sum. See photon_packet.adoc for details
|
||||
public static final String MESSAGE_VERSION = "2a7039527bda14d13028a1b9282d40a2";
|
||||
public static final String MESSAGE_FORMAT = "int64 sequenceID;int64 captureTimestampMicros;int64 publishTimestampMicros;";
|
||||
|
||||
public final String getTypeString() { return MESSAGE_FORMAT; }
|
||||
public final String getInterfaceUUID() { return MESSAGE_VERSION; }
|
||||
@Override
|
||||
public final String getInterfaceUUID() { return "626e70461cbdb274fb43ead09c255f4e"; }
|
||||
@Override
|
||||
public final String getSchema() { return "int64 sequenceID;int64 captureTimestampMicros;int64 publishTimestampMicros;"; }
|
||||
@Override
|
||||
public final String getTypeName() { return "PhotonPipelineMetadata"; }
|
||||
|
||||
@Override
|
||||
public int getMaxByteSize() {
|
||||
@@ -71,4 +74,16 @@ public class PhotonPipelineMetadataSerde implements PacketSerde<PhotonPipelineMe
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketSerde<?>[] getNestedPhotonMessages() {
|
||||
return new PacketSerde<?>[] {
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Struct<?>[] getNestedWpilibMessages() {
|
||||
return new Struct<?>[] {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,17 +26,20 @@ import org.photonvision.utils.PacketUtils;
|
||||
// Assume that the base class lives here and we can import it
|
||||
import org.photonvision.targeting.*;
|
||||
|
||||
// WPILib imports (if any)
|
||||
import edu.wpi.first.util.struct.Struct;
|
||||
|
||||
|
||||
/**
|
||||
* Auto-generated serialization/deserialization helper for PhotonPipelineResult
|
||||
*/
|
||||
public class PhotonPipelineResultSerde implements PacketSerde<PhotonPipelineResult> {
|
||||
// Message definition md5sum. See photon_packet.adoc for details
|
||||
public static final String MESSAGE_VERSION = "cb3e1605048ba49325888eb797399fe2";
|
||||
public static final String MESSAGE_FORMAT = "PhotonPipelineMetadata metadata;PhotonTrackedTarget[?] targets;MultiTargetPNPResult? multitagResult;";
|
||||
|
||||
public final String getTypeString() { return MESSAGE_FORMAT; }
|
||||
public final String getInterfaceUUID() { return MESSAGE_VERSION; }
|
||||
@Override
|
||||
public final String getInterfaceUUID() { return "5eeaa293d0c69aea90eaddea786a2b3b"; }
|
||||
@Override
|
||||
public final String getSchema() { return "PhotonPipelineMetadata:626e70461cbdb274fb43ead09c255f4e metadata;PhotonTrackedTarget:cc6dbb5c5c1e0fa808108019b20863f1 targets[?];optional MultiTargetPNPResult:541096947e9f3ca2d3f425ff7b04aa7b multitagResult;"; }
|
||||
@Override
|
||||
public final String getTypeName() { return "PhotonPipelineResult"; }
|
||||
|
||||
@Override
|
||||
public int getMaxByteSize() {
|
||||
@@ -71,4 +74,17 @@ public class PhotonPipelineResultSerde implements PacketSerde<PhotonPipelineResu
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketSerde<?>[] getNestedPhotonMessages() {
|
||||
return new PacketSerde<?>[] {
|
||||
PhotonPipelineMetadata.photonStruct,MultiTargetPNPResult.photonStruct,PhotonTrackedTarget.photonStruct
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Struct<?>[] getNestedWpilibMessages() {
|
||||
return new Struct<?>[] {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,17 +26,20 @@ import org.photonvision.utils.PacketUtils;
|
||||
// Assume that the base class lives here and we can import it
|
||||
import org.photonvision.targeting.*;
|
||||
|
||||
// WPILib imports (if any)
|
||||
import edu.wpi.first.util.struct.Struct;
|
||||
import edu.wpi.first.math.geometry.Transform3d;
|
||||
|
||||
/**
|
||||
* Auto-generated serialization/deserialization helper for PhotonTrackedTarget
|
||||
*/
|
||||
public class PhotonTrackedTargetSerde implements PacketSerde<PhotonTrackedTarget> {
|
||||
// Message definition md5sum. See photon_packet.adoc for details
|
||||
public static final String MESSAGE_VERSION = "8fdada56b9162f2e32bd24f0055d7b60";
|
||||
public static final String MESSAGE_FORMAT = "float64 yaw;float64 pitch;float64 area;float64 skew;int32 fiducialId;int32 objDetectId;float32 objDetectConf;Transform3d bestCameraToTarget;Transform3d altCameraToTarget;float64 poseAmbiguity;TargetCorner[?] minAreaRectCorners;TargetCorner[?] detectedCorners;";
|
||||
|
||||
public final String getTypeString() { return MESSAGE_FORMAT; }
|
||||
public final String getInterfaceUUID() { return MESSAGE_VERSION; }
|
||||
@Override
|
||||
public final String getInterfaceUUID() { return "cc6dbb5c5c1e0fa808108019b20863f1"; }
|
||||
@Override
|
||||
public final String getSchema() { return "float64 yaw;float64 pitch;float64 area;float64 skew;int32 fiducialId;int32 objDetectId;float32 objDetectConf;Transform3d bestCameraToTarget;Transform3d altCameraToTarget;float64 poseAmbiguity;TargetCorner:16f6ac0dedc8eaccb951f4895d9e18b6 minAreaRectCorners[?];TargetCorner:16f6ac0dedc8eaccb951f4895d9e18b6 detectedCorners[?];"; }
|
||||
@Override
|
||||
public final String getTypeName() { return "PhotonTrackedTarget"; }
|
||||
|
||||
@Override
|
||||
public int getMaxByteSize() {
|
||||
@@ -67,10 +70,8 @@ public class PhotonTrackedTargetSerde implements PacketSerde<PhotonTrackedTarget
|
||||
// field objDetectConf is of intrinsic type float32
|
||||
packet.encode((float) value.objDetectConf);
|
||||
|
||||
// field is shimmed!
|
||||
PacketUtils.packTransform3d(packet, value.bestCameraToTarget);
|
||||
|
||||
// field is shimmed!
|
||||
PacketUtils.packTransform3d(packet, value.altCameraToTarget);
|
||||
|
||||
// field poseAmbiguity is of intrinsic type float64
|
||||
@@ -108,10 +109,8 @@ public class PhotonTrackedTargetSerde implements PacketSerde<PhotonTrackedTarget
|
||||
// objDetectConf is of intrinsic type float32
|
||||
ret.objDetectConf = packet.decodeFloat();
|
||||
|
||||
// field is shimmed!
|
||||
ret.bestCameraToTarget = PacketUtils.unpackTransform3d(packet);
|
||||
|
||||
// field is shimmed!
|
||||
ret.altCameraToTarget = PacketUtils.unpackTransform3d(packet);
|
||||
|
||||
// poseAmbiguity is of intrinsic type float64
|
||||
@@ -125,4 +124,18 @@ public class PhotonTrackedTargetSerde implements PacketSerde<PhotonTrackedTarget
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketSerde<?>[] getNestedPhotonMessages() {
|
||||
return new PacketSerde<?>[] {
|
||||
TargetCorner.photonStruct
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Struct<?>[] getNestedWpilibMessages() {
|
||||
return new Struct<?>[] {
|
||||
Transform3d.struct
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,17 +26,20 @@ import org.photonvision.utils.PacketUtils;
|
||||
// Assume that the base class lives here and we can import it
|
||||
import org.photonvision.targeting.*;
|
||||
|
||||
// WPILib imports (if any)
|
||||
import edu.wpi.first.util.struct.Struct;
|
||||
import edu.wpi.first.math.geometry.Transform3d;
|
||||
|
||||
/**
|
||||
* Auto-generated serialization/deserialization helper for PnpResult
|
||||
*/
|
||||
public class PnpResultSerde implements PacketSerde<PnpResult> {
|
||||
// Message definition md5sum. See photon_packet.adoc for details
|
||||
public static final String MESSAGE_VERSION = "0d1f2546b00f24718e30f38d206d4491";
|
||||
public static final String MESSAGE_FORMAT = "Transform3d best;Transform3d alt;float64 bestReprojErr;float64 altReprojErr;float64 ambiguity;";
|
||||
|
||||
public final String getTypeString() { return MESSAGE_FORMAT; }
|
||||
public final String getInterfaceUUID() { return MESSAGE_VERSION; }
|
||||
@Override
|
||||
public final String getInterfaceUUID() { return "ae4d655c0a3104d88df4f5db144c1e86"; }
|
||||
@Override
|
||||
public final String getSchema() { return "Transform3d best;Transform3d alt;float64 bestReprojErr;float64 altReprojErr;float64 ambiguity;"; }
|
||||
@Override
|
||||
public final String getTypeName() { return "PnpResult"; }
|
||||
|
||||
@Override
|
||||
public int getMaxByteSize() {
|
||||
@@ -46,10 +49,8 @@ public class PnpResultSerde implements PacketSerde<PnpResult> {
|
||||
|
||||
@Override
|
||||
public void pack(Packet packet, PnpResult value) {
|
||||
// field is shimmed!
|
||||
PacketUtils.packTransform3d(packet, value.best);
|
||||
|
||||
// field is shimmed!
|
||||
PacketUtils.packTransform3d(packet, value.alt);
|
||||
|
||||
// field bestReprojErr is of intrinsic type float64
|
||||
@@ -66,10 +67,8 @@ public class PnpResultSerde implements PacketSerde<PnpResult> {
|
||||
public PnpResult unpack(Packet packet) {
|
||||
var ret = new PnpResult();
|
||||
|
||||
// field is shimmed!
|
||||
ret.best = PacketUtils.unpackTransform3d(packet);
|
||||
|
||||
// field is shimmed!
|
||||
ret.alt = PacketUtils.unpackTransform3d(packet);
|
||||
|
||||
// bestReprojErr is of intrinsic type float64
|
||||
@@ -83,4 +82,17 @@ public class PnpResultSerde implements PacketSerde<PnpResult> {
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketSerde<?>[] getNestedPhotonMessages() {
|
||||
return new PacketSerde<?>[] {
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Struct<?>[] getNestedWpilibMessages() {
|
||||
return new Struct<?>[] {
|
||||
Transform3d.struct
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,17 +26,20 @@ import org.photonvision.utils.PacketUtils;
|
||||
// Assume that the base class lives here and we can import it
|
||||
import org.photonvision.targeting.*;
|
||||
|
||||
// WPILib imports (if any)
|
||||
import edu.wpi.first.util.struct.Struct;
|
||||
|
||||
|
||||
/**
|
||||
* Auto-generated serialization/deserialization helper for TargetCorner
|
||||
*/
|
||||
public class TargetCornerSerde implements PacketSerde<TargetCorner> {
|
||||
// Message definition md5sum. See photon_packet.adoc for details
|
||||
public static final String MESSAGE_VERSION = "22b1ff7551d10215af6fb3672fe4eda8";
|
||||
public static final String MESSAGE_FORMAT = "float64 x;float64 y;";
|
||||
|
||||
public final String getTypeString() { return MESSAGE_FORMAT; }
|
||||
public final String getInterfaceUUID() { return MESSAGE_VERSION; }
|
||||
@Override
|
||||
public final String getInterfaceUUID() { return "16f6ac0dedc8eaccb951f4895d9e18b6"; }
|
||||
@Override
|
||||
public final String getSchema() { return "float64 x;float64 y;"; }
|
||||
@Override
|
||||
public final String getTypeName() { return "TargetCorner"; }
|
||||
|
||||
@Override
|
||||
public int getMaxByteSize() {
|
||||
@@ -65,4 +68,16 @@ public class TargetCornerSerde implements PacketSerde<TargetCorner> {
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketSerde<?>[] getNestedPhotonMessages() {
|
||||
return new PacketSerde<?>[] {
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Struct<?>[] getNestedWpilibMessages() {
|
||||
return new Struct<?>[] {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,11 +36,12 @@ namespace photon {
|
||||
template <>
|
||||
struct WPILIB_DLLEXPORT SerdeType<MultiTargetPNPResult> {
|
||||
static constexpr std::string_view GetSchemaHash() {
|
||||
return "ffc1cb847deb6e796a583a5b1885496b";
|
||||
return "541096947e9f3ca2d3f425ff7b04aa7b";
|
||||
}
|
||||
|
||||
static constexpr std::string_view GetSchema() {
|
||||
return "PnpResult estimatedPose;int16[?] fiducialIDsUsed;";
|
||||
return "PnpResult:ae4d655c0a3104d88df4f5db144c1e86 estimatedPose;int16 "
|
||||
"fiducialIDsUsed[?];";
|
||||
}
|
||||
|
||||
static photon::MultiTargetPNPResult Unpack(photon::Packet& packet);
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace photon {
|
||||
template <>
|
||||
struct WPILIB_DLLEXPORT SerdeType<PhotonPipelineMetadata> {
|
||||
static constexpr std::string_view GetSchemaHash() {
|
||||
return "2a7039527bda14d13028a1b9282d40a2";
|
||||
return "626e70461cbdb274fb43ead09c255f4e";
|
||||
}
|
||||
|
||||
static constexpr std::string_view GetSchema() {
|
||||
|
||||
@@ -39,12 +39,15 @@ namespace photon {
|
||||
template <>
|
||||
struct WPILIB_DLLEXPORT SerdeType<PhotonPipelineResult> {
|
||||
static constexpr std::string_view GetSchemaHash() {
|
||||
return "cb3e1605048ba49325888eb797399fe2";
|
||||
return "5eeaa293d0c69aea90eaddea786a2b3b";
|
||||
}
|
||||
|
||||
static constexpr std::string_view GetSchema() {
|
||||
return "PhotonPipelineMetadata metadata;PhotonTrackedTarget[?] "
|
||||
"targets;MultiTargetPNPResult? multitagResult;";
|
||||
return "PhotonPipelineMetadata:626e70461cbdb274fb43ead09c255f4e "
|
||||
"metadata;PhotonTrackedTarget:cc6dbb5c5c1e0fa808108019b20863f1 "
|
||||
"targets[?];optional "
|
||||
"MultiTargetPNPResult:541096947e9f3ca2d3f425ff7b04aa7b "
|
||||
"multitagResult;";
|
||||
}
|
||||
|
||||
static photon::PhotonPipelineResult Unpack(photon::Packet& packet);
|
||||
|
||||
@@ -37,15 +37,16 @@ namespace photon {
|
||||
template <>
|
||||
struct WPILIB_DLLEXPORT SerdeType<PhotonTrackedTarget> {
|
||||
static constexpr std::string_view GetSchemaHash() {
|
||||
return "8fdada56b9162f2e32bd24f0055d7b60";
|
||||
return "cc6dbb5c5c1e0fa808108019b20863f1";
|
||||
}
|
||||
|
||||
static constexpr std::string_view GetSchema() {
|
||||
return "float64 yaw;float64 pitch;float64 area;float64 skew;int32 "
|
||||
"fiducialId;int32 objDetectId;float32 objDetectConf;Transform3d "
|
||||
"bestCameraToTarget;Transform3d altCameraToTarget;float64 "
|
||||
"poseAmbiguity;TargetCorner[?] minAreaRectCorners;TargetCorner[?] "
|
||||
"detectedCorners;";
|
||||
"poseAmbiguity;TargetCorner:16f6ac0dedc8eaccb951f4895d9e18b6 "
|
||||
"minAreaRectCorners[?];TargetCorner:"
|
||||
"16f6ac0dedc8eaccb951f4895d9e18b6 detectedCorners[?];";
|
||||
}
|
||||
|
||||
static photon::PhotonTrackedTarget Unpack(photon::Packet& packet);
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace photon {
|
||||
template <>
|
||||
struct WPILIB_DLLEXPORT SerdeType<PnpResult> {
|
||||
static constexpr std::string_view GetSchemaHash() {
|
||||
return "0d1f2546b00f24718e30f38d206d4491";
|
||||
return "ae4d655c0a3104d88df4f5db144c1e86";
|
||||
}
|
||||
|
||||
static constexpr std::string_view GetSchema() {
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace photon {
|
||||
template <>
|
||||
struct WPILIB_DLLEXPORT SerdeType<TargetCorner> {
|
||||
static constexpr std::string_view GetSchemaHash() {
|
||||
return "22b1ff7551d10215af6fb3672fe4eda8";
|
||||
return "16f6ac0dedc8eaccb951f4895d9e18b6";
|
||||
}
|
||||
|
||||
static constexpr std::string_view GetSchema() {
|
||||
|
||||
Reference in New Issue
Block a user