Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
bd4b68d
Revert "Remove launch control"
daniwhite Sep 5, 2018
e888b20
Merge branch 'roman' into launch-control
daniwhite Sep 5, 2018
ffca885
Fix compilation errors
daniwhite Sep 5, 2018
db2936f
Removing annoyance with pngs tricking git to notice changes for wrong…
sebLopezCot Sep 7, 2018
4fd30ad
Merge branch 'roman' into launch-control
nistath Sep 8, 2018
17ab695
Bug fixes
nistath Sep 8, 2018
63c28ad
Merge branch 'roman' into launch-control
nistath Sep 8, 2018
69bf3ff
Fixing constants, unused function, and comments
sebLopezCot Sep 8, 2018
0554ab5
Pull out constants, other style fixes
daniwhite Sep 8, 2018
e037a98
Move fault checks outside switch statement
daniwhite Sep 8, 2018
f302216
Update launch control dash page
daniwhite Sep 9, 2018
4a4fa97
Fix launch control page
daniwhite Sep 9, 2018
73f6043
Use dash values properly
daniwhite Sep 9, 2018
5e853b2
Remove first speed commands, up allowed slip ratio
daniwhite Sep 12, 2018
528d33b
Up brake threshold
daniwhite Sep 23, 2018
903e520
Constant speed, no backwards check
daniwhite Sep 23, 2018
5b01836
Main pieces of PID loop, still not compiled
sebLopezCot Oct 11, 2018
9eec3fb
removing unneeded code
sebLopezCot Oct 11, 2018
b3966b2
Precision updates should be correct now
sebLopezCot Oct 13, 2018
006034d
Adding can messages for speed controller
sebLopezCot Oct 13, 2018
03e951e
Sending proper can messages from speed_controller
sebLopezCot Oct 13, 2018
c10deee
Now sending speed controller command messages from speed controller
sebLopezCot Oct 13, 2018
db4525c
Bringing speed controller into launch control for testing on the jacks
sebLopezCot Oct 13, 2018
2d7e90d
Adding in the driver toque command limiting
sebLopezCot Oct 14, 2018
8da3f67
ZERO GAINS TESTED, DOES NOTHING! pass
sebLopezCot Oct 14, 2018
b4d0d6b
Added new display page to dash for PID
SreyaV Oct 14, 2018
2622873
SPEED CONTROLS PROPERLY PROPORTIONAL 10 NM, 1500 RPM
sebLopezCot Oct 14, 2018
4a10cb6
TEST WORKS PROP GAIN AT MAX_TORQUE: 50 Nm
sebLopezCot Oct 14, 2018
f4f3404
PROP CONTROL 240 Nm good:
sebLopezCot Oct 14, 2018
eca848d
Bringing setpoint down again for safety
sebLopezCot Oct 14, 2018
890393f
Merge branch 'launch-control-internal-speed-controller' of https://gi…
SreyaV Oct 14, 2018
27aa862
INTEGRATOR TERM TESTED ON JACKS
sebLopezCot Oct 14, 2018
4c1a06f
Merge branch 'launch-control-internal-speed-controller' of github.com…
sebLopezCot Oct 14, 2018
cfc25f6
Derivative term tested on jacks
sebLopezCot Oct 14, 2018
82cea62
Setpoint to 0 for safety
sebLopezCot Oct 14, 2018
a57023e
Revert "Constant speed, no backwards check"
sebLopezCot Oct 14, 2018
0f9ef25
Adding in one more disable for safety
sebLopezCot Oct 14, 2018
edf9a9f
Change max speed -> 500 and no backwards check
sebLopezCot Oct 14, 2018
cf4b8db
Shuddering P
daniwhite Oct 14, 2018
608e157
No speeding up state, shuddering gains
daniwhite Oct 14, 2018
0ac25e8
Configure PID constants from the dash
daniwhite Oct 19, 2018
595b8ff
Fix wrong names and defaults
daniwhite Oct 19, 2018
bf496d3
Change max input speed
daniwhite Oct 20, 2018
06ba15f
Added back in spinning up state
sebLopezCot Oct 20, 2018
ba59de6
Changing slip ratio max and other params
sebLopezCot Oct 21, 2018
b349547
Raising limits for Palmer
sebLopezCot Oct 22, 2018
9fb220c
Fix junk files
nistath Oct 23, 2018
40490cb
Fix 255 bug
nistath Oct 23, 2018
d4a4da2
Alley testing
sebLopezCot Oct 29, 2018
684d4e2
Revert "Alley testing"
sebLopezCot Nov 4, 2018
673af7a
not sending some signals
sebLopezCot Nov 4, 2018
080f860
Fixing state machine bug
sebLopezCot Mar 25, 2019
bb3e5ff
State machine LC bug fix: broke out into seperate init function
sebLopezCot Mar 25, 2019
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ test/**/*.png
# Annoying ropeproject
**/.ropeproject

test/**/*.png

# vim
*.swp

Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
path = lib/CANlib
url = https://github.com/MITMotorsports/CANlib.git
branch = master
ignore = dirty
ignore = dirty
317 changes: 307 additions & 10 deletions can_spec_my18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,28 @@ boards:
- MCCommand
- VCUControlsParams
- VCUControlsMonitoring
- VCUSpeedCntrlKpTimes1000
- VCUSpeedCntrlKiTimes1000
- VCUSpeedCntrlKdTimes1000
- VCUSpeedCntrlIWindupMax
- VCUSpeedCntrlIWindupMin
- VCUSpeedCntrlMinOutputValue
- VCUSpeedCntrlMaxOutputValue
- VCUSpeedCntrlMinInputValue
- VCUSpeedCntrlMaxInputValue
- VCUSpeedCntrlErrorUpdateTimeout
- VCUSpeedCntrlDt
- VCUSpeedCntrlEnabled
- VCUSpeedCntrlOutOfInputRangeThrottled
- VCUSpeedCntrlOutOfOutputRangeThrottled
- VCUSpeedCntrlErrorUpdateTimedOut
- VCUSpeedCntrlRPMSetpoint
- VCUSpeedCntrlCommandedTorque
- VCUSpeedCntrlRPMError
- VCUSpeedCntrlLastRPMError
- VCUSpeedCntrlDerivRPMError
- VCUSpeedCntrlRPMErrorAccumulated
- VCUSpeedCntrlLastErrorUpdateTimestamp
subscribe:
can0:
- FrontCanNodeBrakeThrottle
Expand Down Expand Up @@ -370,16 +392,6 @@ buses:
position: 6
length: 1
c_type: bool
lc_state:
position: 7
length: 3
c_type: enum
enum:
BEFORE: 0
SPEEDING_UP: 1
SPEED_CONTROLLER: 2
ZERO_TORQUE: 3
DONE: 4
VCUErrors:
can_id: 0x0F4
period: 111ms
Expand Down Expand Up @@ -686,6 +698,31 @@ buses:
position: 60
length: 1
c_type: bool
DashRequestLC:
can_id: 0x0D5
is_big_endian: true
period: 69ms
segments:
speeding_up_torque:
position: 0
length: 16
c_type: uint16_t
speeding_up_speed:
position: 16
length: 16
c_type: uint16_t
ws_thresh:
position: 32
length: 16
c_type: uint16_t
launch_ctrl_slip_ratio: # Ranges from 105 to 115
position: 48
length: 9
c_type: uint16_t
using_launch_ctrl:
position: 57
length: 1
c_type: bool
VCUControlsParams:
can_id: 0x0D4
is_big_endian: true
Expand Down Expand Up @@ -735,6 +772,41 @@ buses:
position: 60
length: 1
c_type: bool
VCUControlsParamsLC:
can_id: 0x0D6
is_big_endian: true
period: 200ms
segments:
speeding_up_torque:
position: 0
length: 16
c_type: uint16_t
speeding_up_speed:
position: 16
length: 16
c_type: uint16_t
ws_thresh:
position: 32
length: 16
c_type: uint16_t
launch_ctrl_slip_ratio: # Ranges from 105 to 115
position: 48
length: 8
c_type: uint16_t
using_launch_ctrl:
position: 56
length: 1
c_type: bool
lc_state:
position: 57
length: 3
c_type: enum
enum:
BEFORE: 0
SPEEDING_UP: 1
SPEED_CONTROLLER: 2
ZERO_TORQUE: 3
DONE: 4
ButtonRequest:
can_id: 0x0D8
period: 73ms
Expand Down Expand Up @@ -819,6 +891,231 @@ buses:
position: 48
length: 16
c_type: uint16_t
VCUSpeedCntrlKpTimes1000:
can_id: 0x223
period: 200ms
is_big_endian: true
segments:
kp_times_1000:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlKiTimes1000:
can_id: 0x225
period: 200ms
is_big_endian: true
segments:
ki_times_1000:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlKdTimes1000:
can_id: 0x227
period: 200ms
is_big_endian: true
segments:
kd_times_1000:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlIWindupMax:
can_id: 0x229
period: 200ms
is_big_endian: true
segments:
i_windup_max:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlIWindupMin:
can_id: 0x22B
period: 200ms
is_big_endian: true
segments:
i_windup_min:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlMinOutputValue:
can_id: 0x22D
period: 200ms
is_big_endian: true
segments:
min_output_value:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlMaxOutputValue:
can_id: 0x22F
period: 200ms
is_big_endian: true
segments:
max_output_value:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlMinInputValue:
can_id: 0x231
period: 200ms
is_big_endian: true
segments:
min_input_value:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlMaxInputValue:
can_id: 0x233
period: 200ms
is_big_endian: true
segments:
max_input_value:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlErrorUpdateTimeout:
can_id: 0x235
period: 200ms
is_big_endian: true
segments:
error_update_timeout:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlDt:
can_id: 0x237
period: 200ms
is_big_endian: true
segments:
dt:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlEnabled:
can_id: 0x239
period: 200ms
is_big_endian: true
segments:
enabled:
position: 0
length: 1
c_type: bool
VCUSpeedCntrlOutOfInputRangeThrottled:
can_id: 0x23B
period: 200ms
is_big_endian: true
segments:
out_of_input_range_throttled:
position: 0
length: 1
c_type: bool
VCUSpeedCntrlOutOfOutputRangeThrottled:
can_id: 0x23D
period: 200ms
is_big_endian: true
segments:
out_of_output_range_throttled:
position: 0
length: 1
c_type: bool
VCUSpeedCntrlErrorUpdateTimedOut:
can_id: 0x23F
period: 200ms
is_big_endian: true
segments:
error_update_timed_out:
position: 0
length: 1
c_type: bool
VCUSpeedCntrlRPMSetpoint:
can_id: 0x241
period: 200ms
is_big_endian: true
segments:
rpm_setpoint:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlCommandedTorque:
can_id: 0x243
period: 200ms
is_big_endian: true
segments:
commanded_torque:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlRPMError:
can_id: 0x245
period: 200ms
is_big_endian: true
segments:
rpm_error:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlLastRPMError:
can_id: 0x247
period: 200ms
is_big_endian: true
segments:
last_rpm_error:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlDerivRPMError:
can_id: 0x249
period: 200ms
is_big_endian: true
segments:
deriv_rpm_error:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlRPMErrorAccumulated:
can_id: 0x24B
period: 200ms
is_big_endian: true
segments:
rpm_error_accumulated:
position: 0
length: 32
c_type: int32_t
VCUSpeedCntrlLastErrorUpdateTimestamp:
can_id: 0x24D
period: 200ms
is_big_endian: true
segments:
last_error_update_timestamp:
position: 0
length: 32
c_type: uint32_t
DashSpeedCntrlKpTimes1000:
can_id: 0x224
period: 200ms
is_big_endian: true
segments:
kp_times_1000:
position: 0
length: 32
c_type: int32_t
DashSpeedCntrlKiTimes1000:
can_id: 0x226
period: 200ms
is_big_endian: true
segments:
ki_times_1000:
position: 0
length: 32
c_type: int32_t
DashSpeedCntrlRPMSetpoint:
can_id: 0x242
period: 200ms
is_big_endian: true
segments:
rpm_setpoint:
position: 0
length: 32
c_type: int32_t
MCCommand:
can_id: 0x0C0 # From manual
period: 9ms # MC needs a message at 2 Hz or higher
Expand Down
6 changes: 6 additions & 0 deletions src/dashboard/inc/carstats.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,15 @@ typedef struct {

// Controls values
can0_DashRequest_T controls;
can0_DashRequestLC_T lc_controls;
can0_VCUControlsParams_T vcu_controls;
can0_VCUControlsParamsLC_T vcu_lc_controls;
can0_DashSpeedCntrlKpTimes1000_T kp;
can0_DashSpeedCntrlKiTimes1000_T ki;
can0_DashSpeedCntrlRPMSetpoint_T rpm_setpoint;

bool vcu_controls_received;
bool vcu_lc_controls_received;

Buttons_T buttons;
} carstats_t;
Expand Down
2 changes: 2 additions & 0 deletions src/dashboard/inc/page_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ typedef enum {
DASH_PAGE_CRITICAL = 0,
DASH_PAGE_TRACTION,
DASH_PAGE_REGEN,
DASH_PAGE_LAUNCH_CONTROL,
DASH_LC_PID_DEBUG,
DASH_PAGE_TEMP_LIM,
DASH_PAGE_VOLT_LIM,
DASH_PAGE_FAULT,
Expand Down
Loading