ThunderLib
Loading...
Searching...
No Matches
thunder::TrajectoryRunnerProperties Struct Reference

#include <TrajectoryRunnerProperties.hpp>

Public Types

using GetPoseFunc = std::function<frc::Pose2d()>
 
using ResetPoseFunc = std::function<void(const frc::Pose2d&)>
 
using GetSpeedsFunc = std::function<frc::ChassisSpeeds()>
 
using SetSpeedsFunc = std::function<void(const frc::ChassisSpeeds&)>
 

Public Member Functions

bool isValid () const
 
 operator bool () const
 

Public Attributes

GetPoseFunc getPose
 
ResetPoseFunc resetPose
 
SetSpeedsFunc setSpeeds
 
std::shared_ptr< frc::HolonomicDriveController > controller
 

Detailed Description

A set of callback functions and properties required to run a trajectory.

Member Data Documentation

◆ controller

std::shared_ptr<frc::HolonomicDriveController> thunder::TrajectoryRunnerProperties::controller

Holonomic drive controller to use for following the trajectory (required).

Note
ThunderLib will NOT reset the controller's x, y, or theta PID controllers; the user should do that in the resetPose function if desired.

◆ getPose

GetPoseFunc thunder::TrajectoryRunnerProperties::getPose

Gets the current pose of the robot (required).

◆ resetPose

ResetPoseFunc thunder::TrajectoryRunnerProperties::resetPose

Resets the robot's pose to the specified pose (and PID controllers too!) (optional).

If not provided (nullptr), the robot's pose will not be reset at the start of the trajectory.

◆ setSpeeds

SetSpeedsFunc thunder::TrajectoryRunnerProperties::setSpeeds

Control the robot's chassis speeds (required).

Speeds are robot-relative, not field-relative.


The documentation for this struct was generated from the following file: