Skip to content

Commit cbf988b

Browse files
committed
retune from user feedback after battery
1 parent 1a0c0fa commit cbf988b

File tree

2 files changed

+15
-39
lines changed

2 files changed

+15
-39
lines changed

src/PlatformApp/PlatformApp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ int main(int /*argc*/, char** /*argv*/) {
5353
XBoxController controller(0);
5454

5555
SwervePlatform swervePlatform(dimensions,
56-
2_fps,
56+
4_fps,
5757
std::make_unique<SwervePlatformHomingStorage>(),
5858
canInterfaceName,
5959
motorConfig::drive::frontLeftDrive{},

src/PlatformApp/PlatformApp.h

+14-38
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,22 @@ namespace controlLoop {
4949

5050
namespace joystickAxisMaps {
5151
constexpr std::array driveLongSpeed{interpMapPoint{-1.0, -1.0},
52-
interpMapPoint{-0.75, -0.3},
52+
interpMapPoint{-0.75, -0.5},
5353
interpMapPoint{-0.15, 0.0},
5454
interpMapPoint{0.15, 0.0},
55-
interpMapPoint{0.75, 0.3},
55+
interpMapPoint{0.75, 0.5},
5656
interpMapPoint{1.0, 1.0}};
5757
constexpr std::array driveLatSpeed{interpMapPoint{-1.0, -1.0},
58-
interpMapPoint{-0.75, -0.3},
58+
interpMapPoint{-0.75, -0.5},
5959
interpMapPoint{-0.15, 0.0},
6060
interpMapPoint{0.15, 0.0},
61-
interpMapPoint{0.75, 0.3},
61+
interpMapPoint{0.75, 0.5},
6262
interpMapPoint{1.0, 1.0}};
6363
constexpr std::array driveRotSpeed{interpMapPoint{-1.0, -1.0},
64-
interpMapPoint{-0.75, -0.3},
64+
interpMapPoint{-0.75, -0.5},
6565
interpMapPoint{-0.15, 0.0},
6666
interpMapPoint{0.15, 0.0},
67-
interpMapPoint{0.75, 0.3},
67+
interpMapPoint{0.75, 0.5},
6868
interpMapPoint{1.0, 1.0}};
6969
} // namespace joystickAxisMaps
7070

@@ -114,10 +114,8 @@ namespace motorConfig {
114114
constexpr static auto voltCompSat = 11.0_V;
115115
constexpr static auto nominalOutputForward = 0.0;
116116
constexpr static auto nominalOutputReverse = 0.0;
117-
// constexpr static auto peakOutputForward = 0.2;
118-
// constexpr static auto peakOutputReverse = -0.2;
119-
// constexpr static auto openLoopRamp = controlLoop::rampRate;
120-
// constexpr static auto closedLoopRamp = controlLoop::rampRate;
117+
constexpr static auto peakOutputForward = 0.3;
118+
constexpr static auto peakOutputReverse = -0.3;
121119
constexpr static auto pid0_selectedSensor = ctre::phoenix::motorcontrol::FeedbackDevice::IntegratedSensor;
122120
constexpr static auto pid0_kP = controlLoop::drive::drive::kP;
123121
constexpr static auto pid0_kI = controlLoop::drive::drive::kI;
@@ -144,10 +142,8 @@ namespace motorConfig {
144142
constexpr static auto voltCompSat = 11.0_V;
145143
constexpr static auto nominalOutputForward = 0.0;
146144
constexpr static auto nominalOutputReverse = 0.0;
147-
// constexpr static auto peakOutputForward = 0.2;
148-
// constexpr static auto peakOutputReverse = -0.2;
149-
// constexpr static auto openLoopRamp = controlLoop::rampRate;
150-
// constexpr static auto closedLoopRamp = controlLoop::rampRate;
145+
constexpr static auto peakOutputForward = 0.3;
146+
constexpr static auto peakOutputReverse = -0.3;
151147
constexpr static auto pid0_selectedSensor = ctre::phoenix::motorcontrol::FeedbackDevice::IntegratedSensor;
152148
constexpr static auto pid0_kP = controlLoop::drive::drive::kP;
153149
constexpr static auto pid0_kI = controlLoop::drive::drive::kI;
@@ -174,10 +170,8 @@ namespace motorConfig {
174170
constexpr static auto voltCompSat = 11.0_V;
175171
constexpr static auto nominalOutputForward = 0.0;
176172
constexpr static auto nominalOutputReverse = 0.0;
177-
// constexpr static auto peakOutputForward = 0.2;
178-
// constexpr static auto peakOutputReverse = -0.2;
179-
// constexpr static auto openLoopRamp = controlLoop::rampRate;
180-
// constexpr static auto closedLoopRamp = controlLoop::rampRate;
173+
constexpr static auto peakOutputForward = 0.3;
174+
constexpr static auto peakOutputReverse = -0.3;
181175
constexpr static auto pid0_selectedSensor = ctre::phoenix::motorcontrol::FeedbackDevice::IntegratedSensor;
182176
constexpr static auto pid0_kP = controlLoop::drive::drive::kP;
183177
constexpr static auto pid0_kI = controlLoop::drive::drive::kI;
@@ -204,10 +198,8 @@ namespace motorConfig {
204198
constexpr static auto voltCompSat = 11.0_V;
205199
constexpr static auto nominalOutputForward = 0.0;
206200
constexpr static auto nominalOutputReverse = 0.0;
207-
// constexpr static auto peakOutputForward = 0.2;
208-
// constexpr static auto peakOutputReverse = -0.2;
209-
// constexpr static auto openLoopRamp = controlLoop::rampRate;
210-
// constexpr static auto closedLoopRamp = controlLoop::rampRate;
201+
constexpr static auto peakOutputForward = 0.3;
202+
constexpr static auto peakOutputReverse = -0.3;
211203
constexpr static auto pid0_selectedSensor = ctre::phoenix::motorcontrol::FeedbackDevice::IntegratedSensor;
212204
constexpr static auto pid0_kP = controlLoop::drive::drive::kP;
213205
constexpr static auto pid0_kI = controlLoop::drive::drive::kI;
@@ -230,10 +222,6 @@ namespace motorConfig {
230222
constexpr static auto neutralDeadband = 0.001;
231223
constexpr static auto neutralMode = ctre::phoenix::motorcontrol::NeutralMode::Brake;
232224
constexpr static auto voltCompSat = 11.0_V;
233-
// constexpr static auto nominalOutputForward = 0.1;
234-
// constexpr static auto nominalOutputReverse = -0.1;
235-
// constexpr static auto openLoopRamp = closedLoop::rampRate;
236-
// constexpr static auto closedLoopRamp = closedLoop::rampRate;
237225
constexpr static auto remoteFilter0_addr = sensorConfig::drive::frontLeftTurn::address;
238226
constexpr static auto remoteFilter0_type =
239227
ctre::phoenix::motorcontrol::RemoteSensorSource::RemoteSensorSource_CANCoder;
@@ -261,10 +249,6 @@ namespace motorConfig {
261249
constexpr static auto neutralDeadband = 0.001;
262250
constexpr static auto neutralMode = ctre::phoenix::motorcontrol::NeutralMode::Brake;
263251
constexpr static auto voltCompSat = 11.0_V;
264-
// constexpr static auto nominalOutputForward = 0.1;
265-
// constexpr static auto nominalOutputReverse = -0.1;
266-
// constexpr static auto openLoopRamp = closedLoop::rampRate;
267-
// constexpr static auto closedLoopRamp = closedLoop::rampRate;
268252
constexpr static auto remoteFilter0_addr = sensorConfig::drive::frontRightTurn::address;
269253
constexpr static auto remoteFilter0_type =
270254
ctre::phoenix::motorcontrol::RemoteSensorSource::RemoteSensorSource_CANCoder;
@@ -292,10 +276,6 @@ namespace motorConfig {
292276
constexpr static auto neutralDeadband = 0.001;
293277
constexpr static auto neutralMode = ctre::phoenix::motorcontrol::NeutralMode::Brake;
294278
constexpr static auto voltCompSat = 11.0_V;
295-
// constexpr static auto nominalOutputForward = 0.1;
296-
// constexpr static auto nominalOutputReverse = -0.1;
297-
// constexpr static auto openLoopRamp = closedLoop::rampRate;
298-
// constexpr static auto closedLoopRamp = closedLoop::rampRate;
299279
constexpr static auto remoteFilter0_addr = sensorConfig::drive::rearRightTurn::address;
300280
constexpr static auto remoteFilter0_type =
301281
ctre::phoenix::motorcontrol::RemoteSensorSource::RemoteSensorSource_CANCoder;
@@ -323,10 +303,6 @@ namespace motorConfig {
323303
constexpr static auto neutralDeadband = 0.001;
324304
constexpr static auto neutralMode = ctre::phoenix::motorcontrol::NeutralMode::Brake;
325305
constexpr static auto voltCompSat = 11.0_V;
326-
// constexpr static auto nominalOutputForward = 0.1;
327-
// constexpr static auto nominalOutputReverse = -0.1;
328-
// constexpr static auto openLoopRamp = closedLoop::rampRate;
329-
// constexpr static auto closedLoopRamp = closedLoop::rampRate;
330306
constexpr static auto remoteFilter0_addr = sensorConfig::drive::rearLeftTurn::address;
331307
constexpr static auto remoteFilter0_type =
332308
ctre::phoenix::motorcontrol::RemoteSensorSource::RemoteSensorSource_CANCoder;

0 commit comments

Comments
 (0)