Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
ammo_booster_config.hpp
Go to the documentation of this file.
1#ifndef FANG_ROBOTICS_MCB_AMMO_BOOSTER_CONFIG_HPP
2#define FANG_ROBOTICS_MCB_AMMO_BOOSTER_CONFIG_HPP
5
6#include "units.h"
7
8namespace fang::robot
9{
10 using AmmoBooster = turret::PierceAmmoBooster;
12
13 using namespace units::literals;
14
15 static const Meters kFlywheelRadius{30_mm};
16
17 static const trap::motor::DjiSpeedPid::Config kFlywheelMotorPidConfig
18 {
19 .kp = 10,
20 .ki = 0,
21 .kd = 0,
22 .maxICumulative = 0,
24 };
25
26 static const Flywheel::Motor::Config kLeftFlywheelMotorConfig
27 {
28 .motorId = tap::motor::MOTOR8,
30 .name = "leftFlywheel",
31 .inverted = false,
32 .gearRatio = 1.0, //No gearbox attached
33 .speedPidConfig = kFlywheelMotorPidConfig
34 };
35
36 static const Flywheel::Config kLeftFlywheelConfig
37 {
38 .radius = kFlywheelRadius,
39 .motorConfig = kLeftFlywheelMotorConfig
40 };
41
42 static const Flywheel::Motor::Config kRightFlywheeMotorConfig
43 {
44 .motorId = tap::motor::MOTOR7,
46 .name = "rightFlywheel",
47 .inverted = true,
48 .gearRatio = 1.0, //No gearbox attached
49 .speedPidConfig = kFlywheelMotorPidConfig
50 };
51
52 static const Flywheel::Config kRightFlywheelConfig
53 {
54 .radius = kFlywheelRadius,
55 .motorConfig = kRightFlywheeMotorConfig
56 };
57
58 static const AmmoBooster::Config kAmmoBoosterConfig
59 {
60 .ammoVelocity = 18_mps,
61 .leftFlywheelConfig = kLeftFlywheelConfig,
62 .rightFlywheelConfig = kRightFlywheelConfig
63 };
64}
65#endif
M3508BasicFlywheel Flywheel
Definition pierce_ammo_booster.hpp:14
static constexpr DjiMotorOutput k_maxOutput
Maximum output that can be sent to the C620 controller.
Definition dji_m3508_old.hpp:89
Definition base_robot.cpp:4
turret::PierceAmmoBooster AmmoBooster
Definition ammo_booster_config.hpp:10
AmmoBooster::Flywheel Flywheel
Definition ammo_booster_config.hpp:11
@ MOTOR7
Definition dji_motor_ids.hpp:45
@ MOTOR8
Definition dji_motor_ids.hpp:46
Meters radius
Definition m3508_basic_flywheel.hpp:15
MetersPerSecond ammoVelocity
Definition pierce_ammo_booster.hpp:18
Definition smooth_pid.hpp:36
float kp
Definition smooth_pid.hpp:37
units::length::meter_t Meters
Definition units_alias.hpp:7