CTRE Phoenix 6 C++ 25.2.1
Loading...
Searching...
No Matches
ctre::phoenix6::swerve::impl::SwerveDrivetrainImpl::SwerveDriveState Struct Reference

Plain-Old-Data class holding the state of the swerve drivetrain. More...

#include <ctre/phoenix6/swerve/impl/SwerveDrivetrainImpl.hpp>

Public Attributes

Pose2d Pose
 The current pose of the robot.
 
ChassisSpeeds Speeds
 The current velocity of the robot.
 
std::vector< SwerveModuleState > ModuleStates
 The current module states.
 
std::vector< SwerveModuleState > ModuleTargets
 The target module states.
 
std::vector< SwerveModulePosition > ModulePositions
 The current module positions.
 
Rotation2d RawHeading
 The raw heading of the robot, unaffected by vision updates and odometry resets.
 
units::second_t Timestamp
 The timestamp of the state capture, in the timebase of utils::GetCurrentTime()
 
units::second_t OdometryPeriod
 The measured odometry update period.
 
int32_t SuccessfulDaqs
 Number of successful data acquisitions.
 
int32_t FailedDaqs
 Number of failed data acquisitions.
 

Detailed Description

Plain-Old-Data class holding the state of the swerve drivetrain.

This encapsulates most data that is relevant for telemetry or decision-making from the Swerve Drive.

Member Data Documentation

◆ FailedDaqs

int32_t ctre::phoenix6::swerve::impl::SwerveDrivetrainImpl::SwerveDriveState::FailedDaqs

Number of failed data acquisitions.

◆ ModulePositions

std::vector<SwerveModulePosition> ctre::phoenix6::swerve::impl::SwerveDrivetrainImpl::SwerveDriveState::ModulePositions

The current module positions.

◆ ModuleStates

std::vector<SwerveModuleState> ctre::phoenix6::swerve::impl::SwerveDrivetrainImpl::SwerveDriveState::ModuleStates

The current module states.

◆ ModuleTargets

std::vector<SwerveModuleState> ctre::phoenix6::swerve::impl::SwerveDrivetrainImpl::SwerveDriveState::ModuleTargets

The target module states.

◆ OdometryPeriod

units::second_t ctre::phoenix6::swerve::impl::SwerveDrivetrainImpl::SwerveDriveState::OdometryPeriod

The measured odometry update period.

◆ Pose

Pose2d ctre::phoenix6::swerve::impl::SwerveDrivetrainImpl::SwerveDriveState::Pose

The current pose of the robot.

◆ RawHeading

Rotation2d ctre::phoenix6::swerve::impl::SwerveDrivetrainImpl::SwerveDriveState::RawHeading

The raw heading of the robot, unaffected by vision updates and odometry resets.

◆ Speeds

ChassisSpeeds ctre::phoenix6::swerve::impl::SwerveDrivetrainImpl::SwerveDriveState::Speeds

The current velocity of the robot.

◆ SuccessfulDaqs

int32_t ctre::phoenix6::swerve::impl::SwerveDrivetrainImpl::SwerveDriveState::SuccessfulDaqs

Number of successful data acquisitions.

◆ Timestamp

units::second_t ctre::phoenix6::swerve::impl::SwerveDrivetrainImpl::SwerveDriveState::Timestamp

The timestamp of the state capture, in the timebase of utils::GetCurrentTime()


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