2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
measure_up.h
Go to the documentation of this file.
1
4
5#pragma once
6
8#include <frc/geometry/Translation2d.h>
9#include <units/angle.h>
10#include <units/length.h>
11
12#include <array>
13
15
16namespace measure_up {
17 constexpr auto bumperExtension = 3_in;
18 namespace chassis {
19 constexpr units::inch_t width{26.0};
20 constexpr units::inch_t length{33.0};
21 } // namespace chassis
22 namespace swerve_offsets {
23 constexpr auto frontLeftLOffset = 2.625_in;
24 constexpr auto frontLeftWOffset = 2.625_in;
25 constexpr auto frontRightLOffset = 2.625_in;
26 constexpr auto frontRightWOffset = 2.625_in;
27 constexpr auto backRightWOffset = 2.625_in;
28 constexpr auto backRightLOffset = 2.625_in;
29 constexpr auto backLeftWOffset = 2.625_in;
30 constexpr auto backLeftLOffset = 2.625_in;
31 } // namespace swerve_offsets
32 namespace lifter {
33 // Y is actually Z
34 constexpr auto fulcrumPosition = frc::Translation2d{-12_in, 50_in};
35 namespace arm_extension {
36 constexpr auto homeExtension = 37.50_in;
37 constexpr auto maxExtension = 68.00_in;
38 constexpr auto minExtension = 38.00_in;
39 constexpr auto acceptErr = 0.5_in;
40
41 } // namespace arm_extension
42 namespace wrist {
43 constexpr auto homeAngle = 0_deg;
44 constexpr auto minAngle = -180_deg;
45 constexpr auto invertedAngle = -180_deg;
46 constexpr auto nominalAngle = 0_deg;
47 constexpr auto maxAngle = 10_deg;
48 constexpr auto wristWidth = 17.0_in;
49 } // namespace wrist
50 namespace shoulder {
51 constexpr auto homeAngle = 0_deg;
52 constexpr auto minAngle = -56.5_deg;
53 constexpr auto maxAngle = 7_deg;
54 constexpr auto acceptErr = 2_deg;
56 frc::Translation2d{-14.75_in, 4.5_in};
58 frc::Translation2d{14_in, -2.5_in};
61 } // namespace shoulder
62 namespace armBar {
63 constexpr auto centerOfRotDis = 1.35_in;
64 } // namespace armBar
65 namespace effector {
66 // Y is actually Z
67 constexpr auto effectorFromArm = frc::Translation2d{3.5_in, 1.5_in};
68 } // namespace effector
69 } // namespace lifter
70 namespace bash {
71 constexpr auto homeExtension = 4.25_in;
72 constexpr auto retractedExtension = 4.5_in;
73 constexpr auto deployedExtension = 24.5_in;
74 constexpr auto minExtension = 4.5_in;
75 constexpr auto maxExtension = 25_in;
76 } // namespace bash
77 namespace oui_oui_place {
78 constexpr auto lateralOffset = 7_in;
79 // Maximum oui oui can rotate outside the back of the robot
80 constexpr auto minAngle = -225_deg;
81 // Maximum oui oui can rotate inside the robot
82 constexpr auto maxAngle = -36_deg;
83 constexpr units::degree_t stowAngle = maxAngle;
84 constexpr units::degree_t placeAngle = minAngle;
85 } // namespace oui_oui_place
86 namespace camera {
87 constexpr auto cameraX = 0_in;
89 constexpr auto cameraZ = 7.25_in;
90 constexpr auto cameraMountAngle = 13.5_deg;
91 constexpr auto vFov = 24.85_deg * 2;
92 constexpr auto hFov = 29.8_deg * 2;
93 constexpr auto bottomPoleTapeCenter = 24.125_in;
94 constexpr auto bottomPoleTapeBottom = 22.125_in;
95 constexpr auto upperPoleTapeCenter = 43.875_in;
96 constexpr auto upperPoleTapeBottom = 41.875_in;
97 constexpr auto offsetBetweenPoles = 17.0_in;
98 constexpr auto upperPoleTargetAreaThreshold = 0.03;
99 constexpr auto upperPoleTargetPitchThreshold = 3.0_deg;
100 } // namespace camera
101 // constexpr auto
102 constexpr std::array<path_planning::ArmPathPoint, 13> PathPlanningKeepOutZone = {
105 path_planning::ArmPathPoint{-chassis::length / 2 - 48_in, 78_in},
110 // path_planning::ArmPathPoint{chassis::length / 2, 18_in},
111 // path_planning::ArmPathPoint{chassis::length / 2, 12_in},
112 path_planning::ArmPathPoint{0_in, 8_in},
116} // namespace measure_up
Definition Constants.h:73
constexpr auto homeExtension
Definition measure_up.h:71
constexpr auto maxExtension
Definition measure_up.h:75
constexpr auto retractedExtension
Definition measure_up.h:72
constexpr auto minExtension
Definition measure_up.h:74
constexpr auto deployedExtension
Definition measure_up.h:73
constexpr auto bottomPoleTapeCenter
Definition measure_up.h:93
constexpr auto cameraX
Definition measure_up.h:87
constexpr auto upperPoleTargetAreaThreshold
Definition measure_up.h:98
constexpr auto cameraZ
Definition measure_up.h:89
constexpr auto cameraMountAngle
Definition measure_up.h:90
constexpr auto hFov
Definition measure_up.h:92
constexpr auto upperPoleTargetPitchThreshold
Definition measure_up.h:99
constexpr auto offsetBetweenPoles
Definition measure_up.h:97
constexpr auto upperPoleTapeCenter
Definition measure_up.h:95
constexpr auto vFov
Definition measure_up.h:91
constexpr auto upperPoleTapeBottom
Definition measure_up.h:96
constexpr auto bottomPoleTapeBottom
Definition measure_up.h:94
constexpr units::inch_t length
Definition measure_up.h:20
constexpr units::inch_t width
Definition measure_up.h:19
constexpr auto minExtension
Definition measure_up.h:38
constexpr auto acceptErr
Definition measure_up.h:39
constexpr auto maxExtension
Definition measure_up.h:37
constexpr auto homeExtension
Definition measure_up.h:36
constexpr auto centerOfRotDis
Definition measure_up.h:63
constexpr auto effectorFromArm
Definition measure_up.h:67
constexpr auto homeAngle
Definition measure_up.h:51
constexpr auto acceptErr
Definition measure_up.h:54
constexpr auto maxAngle
Definition measure_up.h:53
constexpr auto actuatedBoomActuatorPosition
Definition measure_up.h:57
constexpr auto fixedBoomActuatorPosition
Linear actuator mount point relative to robot origin.
Definition measure_up.h:55
constexpr auto minAngle
Definition measure_up.h:52
constexpr auto wristWidth
Definition measure_up.h:48
constexpr auto minAngle
Definition measure_up.h:44
constexpr auto maxAngle
Definition measure_up.h:47
constexpr auto invertedAngle
Definition measure_up.h:45
constexpr auto homeAngle
Definition measure_up.h:43
constexpr auto nominalAngle
Definition measure_up.h:46
constexpr auto fulcrumPosition
Definition measure_up.h:34
constexpr units::degree_t placeAngle
Definition measure_up.h:84
constexpr auto lateralOffset
Definition measure_up.h:78
constexpr auto maxAngle
Definition measure_up.h:82
constexpr units::degree_t stowAngle
Definition measure_up.h:83
constexpr auto minAngle
Definition measure_up.h:80
constexpr auto backLeftLOffset
Definition measure_up.h:30
constexpr auto frontRightWOffset
Definition measure_up.h:26
constexpr auto frontLeftWOffset
Definition measure_up.h:24
constexpr auto backRightWOffset
Definition measure_up.h:27
constexpr auto backRightLOffset
Definition measure_up.h:28
constexpr auto frontLeftLOffset
Definition measure_up.h:23
constexpr auto frontRightLOffset
Definition measure_up.h:25
constexpr auto backLeftWOffset
Definition measure_up.h:29
Definition measure_up.h:16
constexpr std::array< path_planning::ArmPathPoint, 13 > PathPlanningKeepOutZone
Definition measure_up.h:102
constexpr auto bumperExtension
Distance from frame to outer edge of bumpers.
Definition measure_up.h:17
Definition types.h:19