2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
swerve_utils.h File Reference
#include <frc/kinematics/SwerveModuleState.h>
#include <units/angle.h>
#include <units/angular_velocity.h>
#include <units/velocity.h>
#include <optional>
#include "interpolation.h"

Go to the source code of this file.

Classes

struct  argos_lib::swerve::SwerveModulePositions
 Representation of the absolute encoder position of each module at home position. More...
 
struct  argos_lib::swerve::TranslationSpeeds
 Translation speeds as percent max output. More...
 

Namespaces

namespace  argos_lib
 
namespace  argos_lib::swerve
 

Functions

frc::SwerveModuleState argos_lib::swerve::Optimize (frc::SwerveModuleState desiredState, units::degree_t currentModuleAngle, units::degrees_per_second_t currentModuleAngularRate, units::feet_per_second_t currentModuleDriveVel, units::feet_per_second_t maxVelocity)
 Optimize swerve module to minimize rotations and drive direction changes.
 
template<class T , int size, class V >
constexpr TranslationSpeeds argos_lib::swerve::CircularInterpolate (const TranslationSpeeds rawSpeeds, const argos_lib::InterpolationMap< T, size, V > interpMap)
 Use argos_lib::InterpolationMap to apply mapping according to joystick vector magnitude.