|
| PathfindingCommand (std::shared_ptr< PathPlannerPath > targetPath, PathConstraints constraints, std::function< frc::Pose2d()> poseSupplier, std::function< frc::ChassisSpeeds()> speedsSupplier, std::function< void(const frc::ChassisSpeeds &, const DriveFeedforwards &)> output, std::shared_ptr< PathFollowingController > controller, RobotConfig robotConfig, std::function< bool()> shouldFlipPath, frc2::Requirements requirements) |
|
| PathfindingCommand (frc::Pose2d targetPose, PathConstraints constraints, units::meters_per_second_t goalEndVel, std::function< frc::Pose2d()> poseSupplier, std::function< frc::ChassisSpeeds()> speedsSupplier, std::function< void(const frc::ChassisSpeeds &, const DriveFeedforwards &)> output, std::shared_ptr< PathFollowingController > controller, RobotConfig robotConfig, frc2::Requirements requirements) |
|
void | Initialize () override |
|
void | Execute () override |
|
bool | IsFinished () override |
|
void | End (bool interrupted) override |
|
◆ PathfindingCommand() [1/2]
PathfindingCommand::PathfindingCommand |
( |
std::shared_ptr< PathPlannerPath > |
targetPath, |
|
|
PathConstraints |
constraints, |
|
|
std::function< frc::Pose2d()> |
poseSupplier, |
|
|
std::function< frc::ChassisSpeeds()> |
speedsSupplier, |
|
|
std::function< void(const frc::ChassisSpeeds &, const DriveFeedforwards &)> |
output, |
|
|
std::shared_ptr< PathFollowingController > |
controller, |
|
|
RobotConfig |
robotConfig, |
|
|
std::function< bool()> |
shouldFlipPath, |
|
|
frc2::Requirements |
requirements |
|
) |
| |
Constructs a new base pathfinding command that will generate a path towards the given path.
- Parameters
-
targetPath | the path to pathfind to |
constraints | the path constraints to use while pathfinding |
poseSupplier | a supplier for the robot's current pose |
speedsSupplier | a supplier for the robot's current robot relative speeds |
output | Output function that accepts robot-relative ChassisSpeeds and feedforwards for each drive motor. If using swerve, these feedforwards will be in FL, FR, BL, BR order. If using a differential drive, they will be in L, R order. |
NOTE: These feedforwards are assuming unoptimized module states. When you optimize your module states, you will need to reverse the feedforwards for modules that have been flipped
- Parameters
-
controller | Path following controller that will be used to follow the path |
robotConfig | The robot configuration |
shouldFlipPath | Should the target path be flipped to the other side of the field? This will maintain a global blue alliance origin. |
requirements | the subsystems required by this command |
◆ PathfindingCommand() [2/2]
PathfindingCommand::PathfindingCommand |
( |
frc::Pose2d |
targetPose, |
|
|
PathConstraints |
constraints, |
|
|
units::meters_per_second_t |
goalEndVel, |
|
|
std::function< frc::Pose2d()> |
poseSupplier, |
|
|
std::function< frc::ChassisSpeeds()> |
speedsSupplier, |
|
|
std::function< void(const frc::ChassisSpeeds &, const DriveFeedforwards &)> |
output, |
|
|
std::shared_ptr< PathFollowingController > |
controller, |
|
|
RobotConfig |
robotConfig, |
|
|
frc2::Requirements |
requirements |
|
) |
| |
Constructs a new base pathfinding command that will generate a path towards the given pose.
- Parameters
-
targetPose | the pose to pathfind to, the rotation component is only relevant for holonomic drive trains |
constraints | the path constraints to use while pathfinding |
goalEndVel | The goal end velocity when reaching the target pose |
poseSupplier | a supplier for the robot's current pose |
speedsSupplier | a supplier for the robot's current robot relative speeds |
output | Output function that accepts robot-relative ChassisSpeeds and feedforwards for each drive motor. If using swerve, these feedforwards will be in FL, FR, BL, BR order. If using a differential drive, they will be in L, R order. |
NOTE: These feedforwards are assuming unoptimized module states. When you optimize your module states, you will need to reverse the feedforwards for modules that have been flipped
- Parameters
-
controller | Path following controller that will be used to follow the path |
robotConfig | The robot configuration |
requirements | the subsystems required by this command |
The documentation for this class was generated from the following files:
- src/main/native/include/pathplanner/lib/commands/PathfindingCommand.h
- src/main/native/cpp/pathplanner/lib/commands/PathfindingCommand.cpp