Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tim bot chassis calibration #1

Open
coldsubstance-deb opened this issue Jul 30, 2024 · 6 comments
Open

tim bot chassis calibration #1

coldsubstance-deb opened this issue Jul 30, 2024 · 6 comments
Assignees

Comments

@coldsubstance-deb
Copy link

all four corners turn and drive. wheels don't spin to the correct orientation or direction. code is able to identify the robot and serial #. can bus 26 27 22 and 23 are giving an error.

@elenasimonee
Copy link

CAN frame not received/too-stale. Check the CAN bus wiring,
CAN bus utilization, and power to the device.
Module FrontLeft: Set Offset=-175.6.
Initial CANCODER absolute angle=0.0 rotations,
Initial CANCODER angle=0.0 rotations
Module FrontLeft: CANCODER Angle after offset programmed=0.0 rotations
[CAN SPARK] IDs: 20, 21, Received parameter invalid error parameter id 17
FrontLeft passed reality checks.
Module FrontLeft: NEO post-calibrate angle=0.0
Could not transmit CAN Frame.
CAN frame not received/too-stale.
Check the CAN bus wiring, CAN bus utilization, and power to the device.
Module FrontRight: Set Offset=-162.15.
Initial CANCODER absolute angle=0.0 rotations,
Initial CANCODER angle=0.0 rotations
Module FrontRight: CANCODER Angle after offset programmed=0.0 rotations
Could not transmit CAN Frame.
CAN frame not received/too-stale. Check the CAN bus wiring,
CAN bus utilization, and power to the device.
Module FrontRight: Set Offset=-162.15.
Initial CANCODER absolute angle=0.0 rotations,
Initial CANCODER angle=0.0 rotations
Module FrontRight: CANCODER Angle after offset programmed=0.0 rotations
FrontRight passed reality checks.
Module FrontRight: NEO post-calibrate angle=0.0
Could not transmit CAN Frame.
CAN frame not received/too-stale.
Check the CAN bus wiring, CAN bus utilization, and power to the device.
Module BackLeft: Set Offset=-115.4.
Initial CANCODER absolute angle=0.0 rotations,
Initial CANCODER angle=0.0 rotations
Module BackLeft: CANCODER Angle after offset programmed=0.0 rotations
Skipped burning flash.
BackLeft passed reality checks.
Module BackLeft: NEO post-calibrate angle=0.0
CAN frame not received/too-stale.
Check the CAN bus wiring,
CAN bus utilization, and power to the device.
Could not transmit CAN Frame.
[CAN SPARK] IDs: 22, 23, 26, 27, Received parameter invalid error parameter id 17
CAN frame not received/too-stale.
Check the CAN bus wiring, CAN bus utilization, and power to the device.
Module BackRight: Set Offset=158.81.
Initial CANCODER absolute angle=0.0 rotations,
Initial CANCODER angle=0.0 rotations
Module BackRight: CANCODER Angle after offset programmed=0.0 rotations
Skipped burning flash.
BackRight passed reality checks.
Module BackRight: NEO post-calibrate angle=0.0
[phoenix-diagnostics] Server 2024.1.0 (Apr 30 2024, 17:31:56) running on port: 1250
================Offsets==================
FrontLeft: offset -175.6, measured 0.0, should be -175.6
FrontRight: offset -162.15, measured 0.0, should be -162.15
BackLeft: offset -115.4, measured 0.0, should be -115.4
BackRight: offset 158.81, measured 0.0, should be 158.81
============Offsets Done==============

@dlaufen
Copy link
Contributor

dlaufen commented Aug 11, 2024

Looks like a may have copied from a different bot's setting. Possible fix pushed.

@elenasimonee
Copy link

New offsets didn't work. debugging the cancoder didn't show values changing while debugging. Next steps: talk to it with Phoenix Tuner and manually check offsets, step 2: confirm we are using new library correctly!

@elenasimonee
Copy link

================Offsets==================
FrontLeft: offset 0.0, measured 0.0 m2 = 0.0, should be 0.0
FrontRight: offset 0.0, measured 0.0 m2 = 0.0, should be 0.0
BackLeft: offset 0.0, measured 0.0 m2 = 0.0, should be 0.0
BackRight: offset 0.0, measured 0.0 m2 = 0.0, should be 0.0
============Offsets Done==============

@dlaufen
Copy link
Contributor

dlaufen commented Aug 18, 2024

Found we were initializing the cancoder in two places. Cleaned up so it is done once in SwerveDrivetrain so by the time it's passed into the sub-module it will have it's offset. Cleans up the sub-module constructor a bit.
Add statusCode checking on the config application with messages if things go wrong.
we can test at next meeting.

@elenasimonee
Copy link

================OffsetDebug================== 
 FrontLeft: offset=97.382, internal=-0.087890625 cancoder_measured=0.0, if wheel zero aligned adjust offset by 97.469890625 
 FrontRight: offset=176.7479, internal=-0.17578125 cancoder_measured=-0.17578125, if wheel zero aligned adjust offset by 176.92368125 
 BackLeft: offset=-93.515, internal=0.0 cancoder_measured=-0.087890625, if wheel zero aligned adjust offset by -93.515 
 BackRight: offset=28.7217, internal=0.0 cancoder_measured=0.0, if wheel zero aligned adjust offset by 28.7217 
 ============OffsetDebug Done============== 

image

@dlaufen dlaufen self-assigned this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants