Open witcpalek opened 10 months ago
int aprilTag = (FMSData::GetInstance()->GetAllianceColor() == frc::DriverStation::kBlue ? FaceTarget::BLUE_AMP : FaceTarget::RED_AMP);
return frc::LoadAprilTagLayoutField(frc::AprilTagField::k2024Crescendo).GetTagPose()l;
Do this after https://github.com/Team302/2024Crescendo/issues/312
Make this class a subclass of FaceVisionTarget
pragma once
include "frc/geometry/Pose3d.h"
// Team302 Includes
include "chassis/headingStates/FaceVisionTarget.h"
class FaceRightStage : public FaceVisionTarget { public: FaceRightStage(); ~FaceRightStage() = default;
protected: frc::Pose3d GetVisionTargetPose() override; };
FaceRightStage::FaceRightStage() : FaceVisionTarget(ChassisOptionEnums::HeadingOption::FACE_RIGHT_STAGE) { }
Pose3d FaceAmp::GetVisionTargetPose() { int apriltag = (FMSData::GetInstance()->GetAllianceColor() == frc::DriverStation::Alliance::kBlue) ?16 :11; DragonAprilTagInifo aprilTagInfo; return aprilTagInfo.Get3DPose(apriltag); }