TR-mbed 1.0
Loading...
Searching...
No Matches
Classes | Functions | Variables
Infantry.cpp File Reference
#include "base_robot/BaseRobot.h"
#include "util/algorithms/general_functions.h"
#include "subsystems/ChassisSubsystem.h"
#include "subsystems/ShooterSubsystem.h"
#include "subsystems/TurretSubsystem.h"
#include "util/communications/CANHandler.h"
#include "util/communications/jetson/Jetson.h"
#include "util/motor/DJIMotor.h"
#include "util/peripherals/imu/BNO055.h"
#include <algorithm>

Classes

class  Infantry
 

Functions

double degreesToRadians (double degrees)
 
int main ()
 

Variables

constexpr auto IMU_I2C_SDA = PB_7
 
constexpr auto IMU_I2C_SCL = PB_8
 
constexpr auto IMU_RESET = PA_8
 
constexpr int pitch_zero_offset_ticks = 1500
 
constexpr float PITCH_LOWER_BOUND {-32.0}
 
constexpr float PITCH_UPPER_BOUND {35.0}
 
constexpr float JOYSTICK_YAW_SENSITIVITY_DPS = 600
 
constexpr float JOYSTICK_PITCH_SENSITIVITY_DPS = 300
 
constexpr float MOUSE_SENSITIVITY_YAW_DPS = 10.0
 
constexpr float MOUSE_SENSITIVITY_PITCH_DPS = 10.0
 
constexpr PID::config YAW_VEL_PID = {350, 0.5, 2.5, 32000, 2000}
 
constexpr PID::config YAW_POS_PID = {0.5, 0, 0, 90, 2}
 
constexpr PID::config PITCH_VEL_PID = {500, 0.8, 0, 32000, 2000}
 
constexpr PID::config PITCH_POS_PID = {1.5, 0.0005, 0.05, 30, 2}
 
constexpr PID::config FL_VEL_CONFIG = {3, 0, 0}
 
constexpr PID::config FR_VEL_CONFIG = {3, 0, 0}
 
constexpr PID::config BL_VEL_CONFIG = {3, 0, 0}
 
constexpr PID::config BR_VEL_CONFIG = {3, 0, 0}
 
constexpr PID::config FLYWHEEL_L_PID = {7.1849, 0.000042634, 0}
 
constexpr PID::config FLYWHEEL_R_PID = {7.1849, 0.000042634, 0}
 
constexpr PID::config INDEXER_PID_VEL = {2.7, 0.001, 0}
 
constexpr PID::config INDEXER_PID_POS = {0.1, 0, 0.001}
 
ChassisSpeeds des_chassis_state
 
TurretSubsystem::TurretInfo des_turret_state
 
ShootState des_shoot_state
 
int remoteTimer = 0
 
float pitch_desired_angle = 0.0
 
float yaw_desired_angle = 0.0
 

Function Documentation

◆ degreesToRadians()

double degreesToRadians ( double  degrees)

◆ main()

int main ( )

Variable Documentation

◆ BL_VEL_CONFIG

constexpr PID::config BL_VEL_CONFIG = {3, 0, 0}
constexpr

◆ BR_VEL_CONFIG

constexpr PID::config BR_VEL_CONFIG = {3, 0, 0}
constexpr

◆ des_chassis_state

ChassisSpeeds des_chassis_state

◆ des_shoot_state

ShootState des_shoot_state

◆ des_turret_state

TurretSubsystem::TurretInfo des_turret_state

◆ FL_VEL_CONFIG

constexpr PID::config FL_VEL_CONFIG = {3, 0, 0}
constexpr

◆ FLYWHEEL_L_PID

constexpr PID::config FLYWHEEL_L_PID = {7.1849, 0.000042634, 0}
constexpr

◆ FLYWHEEL_R_PID

constexpr PID::config FLYWHEEL_R_PID = {7.1849, 0.000042634, 0}
constexpr

◆ FR_VEL_CONFIG

constexpr PID::config FR_VEL_CONFIG = {3, 0, 0}
constexpr

◆ IMU_I2C_SCL

constexpr auto IMU_I2C_SCL = PB_8
constexpr

◆ IMU_I2C_SDA

constexpr auto IMU_I2C_SDA = PB_7
constexpr

◆ IMU_RESET

constexpr auto IMU_RESET = PA_8
constexpr

◆ INDEXER_PID_POS

constexpr PID::config INDEXER_PID_POS = {0.1, 0, 0.001}
constexpr

◆ INDEXER_PID_VEL

constexpr PID::config INDEXER_PID_VEL = {2.7, 0.001, 0}
constexpr

◆ JOYSTICK_PITCH_SENSITIVITY_DPS

constexpr float JOYSTICK_PITCH_SENSITIVITY_DPS = 300
constexpr

◆ JOYSTICK_YAW_SENSITIVITY_DPS

constexpr float JOYSTICK_YAW_SENSITIVITY_DPS = 600
constexpr

◆ MOUSE_SENSITIVITY_PITCH_DPS

constexpr float MOUSE_SENSITIVITY_PITCH_DPS = 10.0
constexpr

◆ MOUSE_SENSITIVITY_YAW_DPS

constexpr float MOUSE_SENSITIVITY_YAW_DPS = 10.0
constexpr

◆ pitch_desired_angle

float pitch_desired_angle = 0.0

◆ PITCH_LOWER_BOUND

constexpr float PITCH_LOWER_BOUND {-32.0}
constexpr

◆ PITCH_POS_PID

constexpr PID::config PITCH_POS_PID = {1.5, 0.0005, 0.05, 30, 2}
constexpr

◆ PITCH_UPPER_BOUND

constexpr float PITCH_UPPER_BOUND {35.0}
constexpr

◆ PITCH_VEL_PID

constexpr PID::config PITCH_VEL_PID = {500, 0.8, 0, 32000, 2000}
constexpr

◆ pitch_zero_offset_ticks

constexpr int pitch_zero_offset_ticks = 1500
constexpr

◆ remoteTimer

int remoteTimer = 0

◆ yaw_desired_angle

float yaw_desired_angle = 0.0

◆ YAW_POS_PID

constexpr PID::config YAW_POS_PID = {0.5, 0, 0, 90, 2}
constexpr

◆ YAW_VEL_PID

constexpr PID::config YAW_VEL_PID = {350, 0.5, 2.5, 32000, 2000}
constexpr