Open witcpalek opened 7 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 FaceLeftStage : public FaceVisionTarget { public: FaceLeftStage(); ~FaceLeftStage() = default;
protected: frc::Pose3d GetVisionTargetPose() override; };
FaceLeftStage::FaceLeftStage() : FaceVisionTarget(ChassisOptionEnums::HeadingOption::FACE_LEFT_STAGE) { }
Pose3d FaceLeftStage::GetVisionTargetPose() { int apriltag = (FMSData::GetInstance()->GetAllianceColor() == frc::DriverStation::Alliance::kBlue) ? 15 : 12; DragonAprilTagInifo aprilTagInfo; return aprilTagInfo.Get3DPose(apriltag); }