Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
ammo_booster_config.hpp
Go to the documentation of this file.
1#pragma once
4
5#include "units.h"
6
7namespace fang::robot
8{
9
10using AmmoBooster = turret::SliceAmmoBooster;
12
13using namespace units::literals;
14
15static const Meters kFlywheelRadius{30_mm};
16
17static const trap::motor::DjiSpeedPid::Config kFlywheelMotorPidConfig
18{
19 .kp = 10,
20 .ki = 0,
21 .kd = 0,
22 .maxICumulative = 0,
24};
25
26static const Flywheel::Motor::Config kLeftFlywheelMotorConfig
27{
28 .motorId = tap::motor::MOTOR7,
30 .name = "leftFlywheel",
31 .inverted = false,
32 .gearRatio = 1.0, //No gearbox attached
33 .speedPidConfig = kFlywheelMotorPidConfig
34};
35
36static const Flywheel::Config kLeftFlywheelConfig
37{
38 .radius = kFlywheelRadius,
39 .motorConfig = kLeftFlywheelMotorConfig
40};
41
42static const Flywheel::Motor::Config kRightFlywheeMotorConfig
43{
44 .motorId = tap::motor::MOTOR8,
46 .name = "rightFlywheel",
47 .inverted = true,
48 .gearRatio = 1.0, //No gearbox attached
49 .speedPidConfig = kFlywheelMotorPidConfig
50};
51
52static const Flywheel::Config kRightFlywheelConfig
53{
54 .radius = kFlywheelRadius,
55 .motorConfig = kRightFlywheeMotorConfig
56};
57
58static const AmmoBooster::Config kAmmoBoosterConfig
59{
60 .ammoVelocity = 18_mps,
61 .leftFlywheelConfig = kLeftFlywheelConfig,
62 .rightFlywheelConfig = kRightFlywheelConfig
63};
64}
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