2019-09-08 00:11:49 -04:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2020-06-29 22:25:09 -07:00
|
|
|
/* Copyright (c) 2019-2020 FIRST. All Rights Reserved. */
|
2019-09-08 00:11:49 -04:00
|
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
|
|
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
|
|
|
/* the project. */
|
|
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "frc/geometry/Rotation2d.h"
|
2020-08-06 23:57:39 -07:00
|
|
|
#include "units/velocity.h"
|
2019-09-08 00:11:49 -04:00
|
|
|
|
|
|
|
|
namespace frc {
|
|
|
|
|
/**
|
|
|
|
|
* Represents the state of one swerve module.
|
|
|
|
|
*/
|
|
|
|
|
struct SwerveModuleState {
|
|
|
|
|
/**
|
|
|
|
|
* Speed of the wheel of the module.
|
|
|
|
|
*/
|
|
|
|
|
units::meters_per_second_t speed = 0_mps;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Angle of the module.
|
|
|
|
|
*/
|
|
|
|
|
Rotation2d angle;
|
|
|
|
|
};
|
|
|
|
|
} // namespace frc
|