mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-01 02:41:42 +00:00
Run multitag on coprocessor (#816)
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include <units/time.h>
|
||||
#include <wpi/SmallVector.h>
|
||||
|
||||
#include "photonlib/MultiTargetPNPResult.h"
|
||||
#include "photonlib/Packet.h"
|
||||
#include "photonlib/PhotonTrackedTarget.h"
|
||||
|
||||
@@ -87,6 +88,13 @@ class PhotonPipelineResult {
|
||||
*/
|
||||
units::second_t GetTimestamp() const { return timestamp; }
|
||||
|
||||
/**
|
||||
* Return the latest mulit-target result, as calculated on your coprocessor.
|
||||
* Be sure to check getMultiTagResult().estimatedPose.isValid before using the
|
||||
* pose estimate!
|
||||
*/
|
||||
const MultiTargetPnpResult& MultiTagResult() const { return m_pnpResults; }
|
||||
|
||||
/**
|
||||
* Sets the timestamp in seconds
|
||||
* @param timestamp The timestamp in seconds
|
||||
@@ -119,6 +127,7 @@ class PhotonPipelineResult {
|
||||
units::second_t latency = 0_s;
|
||||
units::second_t timestamp = -1_s;
|
||||
wpi::SmallVector<PhotonTrackedTarget, 10> targets;
|
||||
MultiTargetPnpResult m_pnpResults;
|
||||
inline static bool HAS_WARNED = false;
|
||||
};
|
||||
} // namespace photonlib
|
||||
|
||||
Reference in New Issue
Block a user