PathPlannerLib
Loading...
Searching...
No Matches
PathPlannerTrajectoryState.h
1#pragma once
2
3#include <units/velocity.h>
4#include <units/length.h>
5#include <units/time.h>
6#include <frc/kinematics/ChassisSpeeds.h>
7#include <frc/geometry/Pose2d.h>
8#include <frc/geometry/Translation2d.h>
9#include <frc/geometry/Rotation2d.h>
10#include <vector>
11#include "pathplanner/lib/trajectory/SwerveModuleTrajectoryState.h"
12#include "pathplanner/lib/path/PathConstraints.h"
13#include "pathplanner/lib/util/GeometryUtil.h"
14#include "pathplanner/lib/util/DriveFeedforwards.h"
15
16namespace pathplanner {
18public:
19 units::second_t time = 0_s;
20 frc::ChassisSpeeds fieldSpeeds;
21 frc::Pose2d pose;
22 units::meters_per_second_t linearVelocity = 0_mps;
23 DriveFeedforwards feedforwards;
24
25 frc::Rotation2d heading;
26 units::meter_t deltaPos = 0_m;
27 frc::Rotation2d deltaRot;
28 std::vector<SwerveModuleTrajectoryState> moduleStates;
29 PathConstraints constraints;
30 double waypointRelativePos = 0.0;
31
32 PathPlannerTrajectoryState() : constraints(0_mps, 0_mps_sq, 0_rad_per_s,
33 0_rad_per_s_sq) {
34 }
35
44 const PathPlannerTrajectoryState &endVal, const double t) const;
45
52
59
66 PathPlannerTrajectoryState copyWithTime(units::second_t time) const;
67};
68}
Definition: PathConstraints.h:12
Definition: PathPlannerTrajectoryState.h:17
PathPlannerTrajectoryState reverse() const
Definition: PathPlannerTrajectoryState.cpp:61
PathPlannerTrajectoryState interpolate(const PathPlannerTrajectoryState &endVal, const double t) const
Definition: PathPlannerTrajectoryState.cpp:6
PathPlannerTrajectoryState flip() const
Definition: PathPlannerTrajectoryState.cpp:80
PathPlannerTrajectoryState copyWithTime(units::second_t time) const
Definition: PathPlannerTrajectoryState.cpp:93
Definition: DriveFeedforwards.h:12