Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .Glass/glass.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
},
"open": true
},
"Vision": {
"open": true
},
"open": true
},
"cadmia": {
Expand Down Expand Up @@ -80,7 +83,7 @@
"Plot <0>": {
"plots": [
{
"height": 338,
"height": 0,
"series": [
{
"color": [
Expand Down
4 changes: 2 additions & 2 deletions autos/blue-north-3cone-low/blue-north-3cone-low_2_place8.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"velocity_y": 0.0,
"velocity_y_constrained": true,
"waypoint_type": "custom",
"x": 2.0811913600854677,
"x": 1.9795913600854675,
"x_constrained": true,
"y": 4.483030936467877,
"y_constrained": true
Expand Down Expand Up @@ -87,4 +87,4 @@
"time_unit": "second",
"torque_unit": "newton_metre"
}
}
}
29 changes: 10 additions & 19 deletions autos/blue-north-3cone-low/blue-north-3cone-low_3_pick3.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,7 @@
},
"paths": {
"pick3": {
"obstacles": [
{
"center_x": 3.5524717356228166,
"center_y": 1.6264701001203439,
"name": "chgstat",
"obstacle_type": "circle",
"radius": 2.5,
"safety_distance": 0.0
}
],
"obstacles": [],
"waypoints": [
{
"angular_velocity": 0.0,
Expand All @@ -28,7 +19,7 @@
"velocity_y": 0.0,
"velocity_y_constrained": true,
"waypoint_type": "custom",
"x": 2.0811913600854677,
"x": 1.9795913600854675,
"x_constrained": true,
"y": 4.483030936467877,
"y_constrained": true
Expand Down Expand Up @@ -61,19 +52,19 @@
"velocity_magnitude_constrained": true,
"velocity_x": 0.25,
"velocity_x_constrained": false,
"velocity_y": 0.25,
"velocity_y": 0.25000000000000044,
"velocity_y_constrained": false,
"waypoint_type": "custom",
"x": 6.228102344112418,
"x": 6.4567023441124185,
"x_constrained": true,
"y": 3.5327814971674347,
"y": 3.735981497167433,
"y_constrained": true
},
{
"angular_velocity": 0.0,
"angular_velocity_constrained": true,
"control_interval_count": 20,
"heading": 5.4836733810242855,
"heading": 5.497787143782138,
"heading_constrained": true,
"name": "pick",
"velocity_magnitude_constrained": true,
Expand All @@ -82,9 +73,9 @@
"velocity_y": 0.0,
"velocity_y_constrained": true,
"waypoint_type": "custom",
"x": 6.782564399253481,
"x": 7.112764399253481,
"x_constrained": true,
"y": 2.9700968481329495,
"y": 3.0716968481329494,
"y_constrained": true
}
]
Expand All @@ -94,7 +85,7 @@
"bumper_length": 0.954,
"bumper_width": 0.903,
"mass": 90.718474,
"moment_of_inertia": 5.0,
"moment_of_inertia": 8.0,
"motor_max_angular_speed": 83.7758040957278,
"motor_max_torque": 4.0,
"team_number": 2363,
Expand All @@ -114,4 +105,4 @@
"time_unit": "second",
"torque_unit": "newton_metre"
}
}
}
12 changes: 6 additions & 6 deletions autos/blue-north-3cone-low/blue-north-3cone-low_4_place7.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
{
"angular_velocity": 0.0,
"angular_velocity_constrained": true,
"control_interval_count": 20,
"heading": 5.4836733810242855,
"control_interval_count": 0,
"heading": 5.497787143782138,
"heading_constrained": true,
"name": "pick",
"velocity_magnitude_constrained": true,
Expand All @@ -19,9 +19,9 @@
"velocity_y": 0.0,
"velocity_y_constrained": true,
"waypoint_type": "custom",
"x": 6.782564399253481,
"x": 7.112764399253481,
"x_constrained": true,
"y": 2.9700968481329495,
"y": 3.0716968481329494,
"y_constrained": true
},
{
Expand Down Expand Up @@ -63,7 +63,7 @@
{
"angular_velocity": 0.0,
"angular_velocity_constrained": true,
"control_interval_count": 40,
"control_interval_count": 20,
"heading": 3.141592653589793,
"heading_constrained": true,
"name": "place",
Expand Down Expand Up @@ -105,4 +105,4 @@
"time_unit": "second",
"torque_unit": "newton_metre"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"waypoint_type": "custom",
"x": 3.05877775930775,
"x_constrained": true,
"y": 0.5170177190245612,
"y": 0.4154177190245612,
"y_constrained": true
},
{
Expand All @@ -39,7 +39,7 @@
"waypoint_type": "custom",
"x": 1.9355777593077477,
"x_constrained": true,
"y": 0.5170177190245612,
"y": 0.4154177190245612,
"y_constrained": true
}
]
Expand Down Expand Up @@ -69,4 +69,4 @@
"time_unit": "second",
"torque_unit": "newton_metre"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"waypoint_type": "custom",
"x": 1.9355777593077477,
"x_constrained": true,
"y": 0.5170177190245612,
"y": 0.4154177190245612,
"y_constrained": true
},
{
Expand All @@ -39,7 +39,7 @@
"waypoint_type": "custom",
"x": 2.1519634430382037,
"x_constrained": true,
"y": 0.7182973763365106,
"y": 0.6166973763365106,
"y_constrained": true
},
{
Expand Down Expand Up @@ -159,4 +159,4 @@
"time_unit": "second",
"torque_unit": "newton_metre"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"waypoint_type": "custom",
"x": 1.908741064825703,
"x_constrained": true,
"y": 1.6076419403433835,
"y": 1.5314419403433837,
"y_constrained": true
}
]
Expand Down Expand Up @@ -141,4 +141,4 @@
"time_unit": "second",
"torque_unit": "newton_metre"
}
}
}
6 changes: 3 additions & 3 deletions autos/red-north-3cone-low/red-north-3cone-low_2_place8.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"waypoint_type": "custom",
"x": 11.65525392711544,
"x_constrained": true,
"y": 4.73941277169068,
"y": 4.612412771690679,
"y_constrained": true
},
{
Expand All @@ -55,7 +55,7 @@
"velocity_y": 0.0,
"velocity_y_constrained": true,
"waypoint_type": "custom",
"x": 14.53675762391453,
"x": 14.63835762391453,
"x_constrained": true,
"y": 4.483030936467877,
"y_constrained": true
Expand Down Expand Up @@ -87,4 +87,4 @@
"time_unit": "second",
"torque_unit": "newton_metre"
}
}
}
14 changes: 7 additions & 7 deletions autos/red-north-3cone-low/red-north-3cone-low_3_pick3.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"velocity_y": 0.0,
"velocity_y_constrained": true,
"waypoint_type": "custom",
"x": 14.53675762391453,
"x": 14.63835762391453,
"x_constrained": true,
"y": 4.483030936467877,
"y_constrained": true
Expand Down Expand Up @@ -55,9 +55,9 @@
"velocity_y": 0.3,
"velocity_y_constrained": false,
"waypoint_type": "custom",
"x": 10.389846639887583,
"x": 10.010435516088627,
"x_constrained": true,
"y": 3.6089814971674348,
"y": 3.8508929249637114,
"y_constrained": true
},
{
Expand All @@ -73,9 +73,9 @@
"velocity_y": 0.0,
"velocity_y_constrained": true,
"waypoint_type": "custom",
"x": 9.75918458474652,
"x": 9.379773460947565,
"x_constrained": true,
"y": 2.9700968481329495,
"y": 3.212008275929226,
"y_constrained": true
}
]
Expand All @@ -85,7 +85,7 @@
"bumper_length": 0.954,
"bumper_width": 0.903,
"mass": 90.718474,
"moment_of_inertia": 5.0,
"moment_of_inertia": 8.0,
"motor_max_angular_speed": 83.7758040957278,
"motor_max_torque": 4.0,
"team_number": 2363,
Expand All @@ -105,4 +105,4 @@
"time_unit": "second",
"torque_unit": "newton_metre"
}
}
}
10 changes: 5 additions & 5 deletions autos/red-north-3cone-low/red-north-3cone-low_4_place7.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"angular_velocity": 0.0,
"angular_velocity_constrained": true,
"control_interval_count": 20,
"control_interval_count": 0,
"heading": -2.3420807274344924,
"heading_constrained": true,
"name": "pick",
Expand All @@ -19,9 +19,9 @@
"velocity_y": 0.0,
"velocity_y_constrained": true,
"waypoint_type": "custom",
"x": 9.75918458474652,
"x": 9.379773460947565,
"x_constrained": true,
"y": 2.9700968481329495,
"y": 3.212008275929226,
"y_constrained": true
},
{
Expand Down Expand Up @@ -57,7 +57,7 @@
"waypoint_type": "custom",
"x": 13.884522559120708,
"x_constrained": true,
"y": 4.291635173710526,
"y": 4.139235173710526,
"y_constrained": true
},
{
Expand Down Expand Up @@ -105,4 +105,4 @@
"time_unit": "second",
"torque_unit": "newton_metre"
}
}
}
10 changes: 7 additions & 3 deletions src/main/cpp/RobotContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,14 @@ RobotContainer::RobotContainer(std::function<bool(void)> isDisabled)
double rightXAxis = -m_driver.GetRawAxis(kZorroRightYAxis);
double rightYAxis = -m_driver.GetRawAxis(kZorroRightXAxis);
double leftXAxis = -m_driver.GetRawAxis(kZorroLeftXAxis);
double x = std::abs(rightXAxis) < 0.025 ? 0.0 : rightXAxis;
double y = std::abs(rightYAxis) < 0.025 ? 0.0 : rightYAxis;
double omega = std::abs(leftXAxis) < 0.025 ? 0.0 : leftXAxis;
return m_drive.JoystickDrive(
std::abs(rightXAxis) < 0.025 ? 0.0 : rightXAxis,
std::abs(rightYAxis) < 0.025 ? 0.0 : rightYAxis,
std::abs(leftXAxis) < 0.025 ? 0.0 : leftXAxis, true, m_isBlue);
x,
y,
omega,
true, m_isBlue, m_superstructure.GetAbsoluteArmPosition().value());
},
{&m_drive} // requirements
));
Expand Down
15 changes: 13 additions & 2 deletions src/main/cpp/commands/autos/North2ConeHighChgstat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,19 @@ North2ConeHighChgstat::North2ConeHighChgstat(SwerveDrive* drive,
"north-2cone-high-chgstat_1_pick4")),
SequentialCommandGroup(WaitCommand(0.25_s),
InstantCommand([superstructure]() {
superstructure->IntakeCone();
}))),
superstructure->IntakeCube();
superstructure->m_stealth = true;
})),
SequentialCommandGroup(
WaitCommand(TrajectoryManager::GetTrajectory(
allianceSidePrefix + "north-2cone-high-chgstat_1_pick4")
.GetTotalTime() -
0.2_s),
InstantCommand(
[superstructure]() { superstructure->IntakeCone(); }),
WaitCommand(0.1_s), InstantCommand([superstructure]() {
superstructure->m_stealth = false;
}))),

DriveTrajectory(
drive, &TrajectoryManager::GetTrajectory(
Expand Down
Loading