PhotonVision C++ v2027.0.0-alpha-2
Loading...
Searching...
No Matches
photon::VisionTargetSim Class Reference

Describes a vision target located somewhere on the field that your vision system can detect. More...

#include <photon/simulation/VisionTargetSim.h>

Public Member Functions

 VisionTargetSim (const wpi::math::Pose3d &pose, const TargetModel &model)
 Describes a retro-reflective/colored shape vision target located somewhere on the field that your vision system can detect.
 
 VisionTargetSim (const wpi::math::Pose3d &pose, const TargetModel &model, int id)
 Describes a fiducial tag located somewhere on the field that your vision system can detect.
 
 VisionTargetSim (const wpi::math::Pose3d &pose, const TargetModel &model, int objDetClassId, float objDetConf)
 Describes an object-detection vision target located somewhere on the field that your vision system can detect.
 
void SetPose (const wpi::math::Pose3d &newPose)
 Sets the pose of this target on the field.
 
void SetModel (const TargetModel &newModel)
 Sets the model describing this target's geometry.
 
wpi::math::Pose3d GetPose () const
 Returns the pose of this target on the field.
 
TargetModel GetModel () const
 Returns the model describing this target's geometry.
 
int GetFiducialId () const
 Returns the fiducial ID of this target, or -1 if not a fiducial target.
 
int GetObjDetClassId () const
 Returns the object detection class ID of this target, or -1 if not an object detection target.
 
float GetObjDetConf () const
 Returns the object detection confidence of this target, or -1 if confidence is estimated from target area or is not an object.
 
std::vector< wpi::math::Translation3d > GetFieldVertices () const
 This target's vertices offset from its field pose.
 
bool operator< (const VisionTargetSim &right) const
 
bool operator== (const VisionTargetSim &other) const
 

Detailed Description

Describes a vision target located somewhere on the field that your vision system can detect.

Constructor & Destructor Documentation

◆ VisionTargetSim() [1/3]

photon::VisionTargetSim::VisionTargetSim ( const wpi::math::Pose3d & pose,
const TargetModel & model )
inline

Describes a retro-reflective/colored shape vision target located somewhere on the field that your vision system can detect.

Parameters
posePose3d of the tag in field-relative coordinates
modelTargetModel which describes the geometry of the target

◆ VisionTargetSim() [2/3]

photon::VisionTargetSim::VisionTargetSim ( const wpi::math::Pose3d & pose,
const TargetModel & model,
int id )
inline

Describes a fiducial tag located somewhere on the field that your vision system can detect.

Parameters
posePose3d of the tag in field-relative coordinates
modelTargetModel which describes the geometry of the target(tag)
idThe ID of this fiducial tag

◆ VisionTargetSim() [3/3]

photon::VisionTargetSim::VisionTargetSim ( const wpi::math::Pose3d & pose,
const TargetModel & model,
int objDetClassId,
float objDetConf )
inline

Describes an object-detection vision target located somewhere on the field that your vision system can detect.

Class ID is the (zero-indexed) index of the object's class ID in the list of all classes. Confidence can be specified, or pass -1 to estimate confidence based on 2 * sqrt(target area / total image area)

Parameters
posePose3d of the target in field-relative coordinates
modelTargetModel which describes the geometry of the target
objDetClassIdThe object detection class ID, if -1 it will not be detected by object detection
objDetConfThe object detection confidence, or -1 in which case the simulation will compute a confidence based on the area of the target in the camera's field of view

Member Function Documentation

◆ GetFiducialId()

int photon::VisionTargetSim::GetFiducialId ( ) const
inline

Returns the fiducial ID of this target, or -1 if not a fiducial target.

Returns
The fiducial ID

◆ GetFieldVertices()

std::vector< wpi::math::Translation3d > photon::VisionTargetSim::GetFieldVertices ( ) const
inline

This target's vertices offset from its field pose.

Returns
A vector of Translation3d representing the vertices of the target

◆ GetModel()

TargetModel photon::VisionTargetSim::GetModel ( ) const
inline

Returns the model describing this target's geometry.

Returns
The model of the target

◆ GetObjDetClassId()

int photon::VisionTargetSim::GetObjDetClassId ( ) const
inline

Returns the object detection class ID of this target, or -1 if not an object detection target.

Returns
The object detection class ID

◆ GetObjDetConf()

float photon::VisionTargetSim::GetObjDetConf ( ) const
inline

Returns the object detection confidence of this target, or -1 if confidence is estimated from target area or is not an object.

Returns
The object detection confidence

◆ GetPose()

wpi::math::Pose3d photon::VisionTargetSim::GetPose ( ) const
inline

Returns the pose of this target on the field.

Returns
The pose in field-relative coordinates

◆ operator<()

bool photon::VisionTargetSim::operator< ( const VisionTargetSim & right) const
inline

◆ operator==()

bool photon::VisionTargetSim::operator== ( const VisionTargetSim & other) const
inline

◆ SetModel()

void photon::VisionTargetSim::SetModel ( const TargetModel & newModel)
inline

Sets the model describing this target's geometry.

Parameters
newModelThe model of the target

◆ SetPose()

void photon::VisionTargetSim::SetPose ( const wpi::math::Pose3d & newPose)
inline

Sets the pose of this target on the field.

Parameters
newPoseThe pose in field-relative coordinates

The documentation for this class was generated from the following file: