PhotonVision Packets returning 0 for some values?

We’ve been using PhotoVision to track april tags and its been working great!

However, I’ve noticed in the Packet class some values which are used to compute ‘bestCameraToTarget’ are 0 when they shouldn’t be (getting real yaw values would indicate that these values…should definitely not be blank).

o were getting some good target information back from our Camera. The Yaw, Pitch, Area, Id all look good.

However, the BestCameraToTarget transform is blank (which ruins our calculations in the RobotPoseEstimator too). The values decoded from the packet are all 0s. I can’t understand why. I’d suspect we are missing some configuration with our system, but I’d also suspect that all that info is already used to calculate yaw correctly wherever it is that.

It looks like my java version and my photoVision version running on my rpi are equivalent. My camera has a FOV set.

Any ideas why all the bytes used to decode that packet are zero? what am I doing wrong?

` public Packet createFromPacket(Packet packet) {
this.yaw = packet.decodeDouble();
this.pitch = packet.decodeDouble();
this.area = packet.decodeDouble();
this.skew = packet.decodeDouble();
this.fiducialId = packet.decodeInt();

    this.bestCameraToTarget = decodeTransform(packet);
    this.altCameraToTarget = decodeTransform(packet); `

The yaw, pitch, area, skew and id are all good nonzero values that make sense. The transform is not.

Cleared this up elsewhere but for others, make sure you calibrate your camera first.

1 Like

As well as enable 3d mode


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.