3#include <frc2/command/Command.h>
4#include <frc2/command/CommandHelper.h>
5#include <frc2/command/Requirements.h>
8#include <frc/geometry/Pose2d.h>
9#include <frc/kinematics/ChassisSpeeds.h>
11#include <units/velocity.h>
12#include <units/length.h>
13#include <units/time.h>
14#include "pathplanner/lib/path/PathPlannerPath.h"
15#include "pathplanner/lib/trajectory/PathPlannerTrajectory.h"
16#include "pathplanner/lib/controllers/PathFollowingController.h"
17#include "pathplanner/lib/config/RobotConfig.h"
18#include "pathplanner/lib/util/PathPlannerLogging.h"
19#include "pathplanner/lib/util/PPLibTelemetry.h"
20#include "pathplanner/lib/util/DriveFeedforwards.h"
22namespace pathplanner {
46 std::function<frc::Pose2d()> poseSupplier,
47 std::function<frc::ChassisSpeeds()> speedsSupplier,
50 std::shared_ptr<PathFollowingController> controller,
51 RobotConfig robotConfig, std::function<
bool()> shouldFlipPath,
52 frc2::Requirements requirements);
73 units::meters_per_second_t goalEndVel,
74 std::function<frc::Pose2d()> poseSupplier,
75 std::function<frc::ChassisSpeeds()> speedsSupplier,
78 std::shared_ptr<PathFollowingController> controller,
79 RobotConfig robotConfig, frc2::Requirements requirements);
81 void Initialize()
override;
83 void Execute()
override;
85 bool IsFinished()
override;
87 void End(
bool interrupted)
override;
91 std::shared_ptr<PathPlannerPath> m_targetPath;
92 frc::Pose2d m_targetPose;
93 frc::Pose2d m_originalTargetPose;
96 std::function<frc::Pose2d()> m_poseSupplier;
97 std::function<frc::ChassisSpeeds()> m_speedsSupplier;
98 std::function<void(
const frc::ChassisSpeeds&,
const DriveFeedforwards&)> m_output;
99 std::shared_ptr<PathFollowingController> m_controller;
101 std::function<bool()> m_shouldFlipPath;
103 std::shared_ptr<PathPlannerPath> m_currentPath;
106 units::second_t m_timeOffset;
108 static int m_instances;
Definition: GoalEndState.h:9
Definition: PathConstraints.h:12
Definition: PathPlannerTrajectory.h:29
Definition: PathfindingCommand.h:24
Definition: RobotConfig.h:17
Definition: DriveFeedforwards.h:12