Troubleshooting - Brickwolves/CodeCampWiki GitHub Wiki
Auto
Motors don't move in strafe method
I think: Make sure you do Motor.setMode(RUN_WITHOUT_ENCODER);
before you use it and after STOP_AND_RESET_ENCODER;
Auto just loops
Make sure you have while(!OpmodeIsActive)
and not while(OpModeIsActive)
Null Pointer Exception on AprilTag.range
Add tag to tag library
hardwareMap.getAll
Error
Make sure setOpMode(this)
comes before any Hardware Map calls
Robot spins around in circles instead of following directions
Check axesOrder under IMU class in getAngle() method.
Robot does not turn, only drives and strafes
Update gyro in your turn loop
One line of Auto doesn't run
Check Margin of Error in Strafe()
Auto pauses randomly
Weird turn at the end of strafe commands
Odometry
X and Y headings change very slightly but not nearly enough
Make sure that the pods are plugged in and that you have the right name for them in the configuration They should have the same name as the motor where the encoder is plugged in.
Robot overshoots target
Decrease kV value in Drive Constants
Robot just drives in direction of coordinate blindly
Make sure loop is updating, inverse motors maybe but be careful with that
Robot X,Y changes when turning
Check offsets
TeleOp
Spin move!!!!
idk
PID is nonexistant turning one way
rateOfChange needs to be absolute valued
PID turns and then waits and then PID activates
Change rate of change number to lower
Robot does not follow controller, instead drives as though it were an auto
Make sure you're not accidentally running an auto.
IndexOutOfBoundsException
Error
IDK
Driver oriented steering causes robot to drive regularly when facing forward but inverted when facing to the side
Change the gyro rawAngle()'s output to 360 - getAngle().
Driver Oriented Steering is wonky
Make sure you update gyro
Check axesOrder under IMU class in getAngle() method.
Robot jumps around and switches directions rapidly
I have no idea.
Controller commands not doing anything
Make sure you are using the updateController() method somewhere in your loop for both controllers.
PID causes robot to just spin in circles
Negativeify PID values
Robot occasionally spins in a wide circle and no controller input registers
Make sure USB attachments are firmly plugged in
Robot disconnects from phone, gets more frequent the longer it runs
Check to make sure you don't have unnecessary sensors, especially the camera running, this could cause a memory leak
Robot will only drive and strafe while turning
Other
bad object refs/remotes/origin/main
Not sure yet, delete and redownload android studio
Null Object Reference On HardwareMap
Call SetOpMode(this) before Hardware Map calls
Gyro is always returning 0
This probably means you're on the old gyro, the BN00 whatever, make sure gyro class has BH16 or something and then update control hub
Robot spins in a circle when turned on
In the gyro class set rawAngle()'s return statement to IMU.getAngle() +/- whatever the degree of the turn is.
NullPointerException
Error
Check to see if you call a variable that has not been assigned to a value.
Any error when compiling regarding Gradle
Click the elephant button in the top right of Android Studio.
Unknown host 'repo.maven.apache.org: nodename nor servname provided, or not known'. You may need to adjust the proxy settings in Gradle
Error
Go online and build code then connect to robot and install
Could not resolve all files for configuration ':FtcDashboard:detachedConfiguration3'
Error
In the build.gradle file change node version to the most recent version and add the line distBaseUrl = "https://nodejs.org/dist"
.
A problem occurred evaluating project ':FtcDashboard'.
Error
Unsure as to what causes it or how to fix it
This version of the Android Studio plugin for IntelliJ IDEA (or Android Studio) cannot open this project please retry with version 2020.3.1 or newer
Error
Delete and Redownload Android Studio.
When syncing Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. Use '--warning-mode all' to show the individual deprecation warnings.
appears
IDK
IllegalArgumentException - Unable to find a hardware device
Error
Check configuration to make sure the device in question is configured correctly. See Control Hub does not detect Expansion Hub
Control Hub does not detect Expansion Hub
Check RS485 Cables (Blue and white things that connect the Control hub and the Expansion hub)
ADB is being stupid
If it's the first time you've done this since New Years, DM Collin or Oliver because that's crazy, if it isn't - or if it is - restart the computer or hit the red x in the top left of the window, click on your project, and keep doing this until the bar at the top says no devices rather than being gray and saying loading devices.
Build cancelled while executing task ':FtcDashboard:yarn_build'
Error
Check for Null Pointer exception causing problems and inheritance things.
Anything with the gyro being weird
Make sure you have gyro.update in loop
Java IDE out of Memory
error
Sync and update gradle
Color Sensor counts up only for a period of time
I don't know
Could not find org.nodejs:node:12.13.0.
Error
Make sure FTC Dashboard is a dependency not a module, do that by
- delete ftcDashboard from settings.gradle
- follow basic instructions here https://acmerobotics.github.io/ftc-dashboard/gettingstarted
- Delete implementation project(':FtcDashboard') in build.dependencies.gradle
Out Of Memory Errors Add org.gradle.jvmargs=-Xmx2048m to gradle.properties
Cannot Snapshot
No idea
Opmode Stuck in Stop error
somewhere in auto a while loop is taking if(OpmodeIsActive()) as a paremeter
could not find method compile() for arguments
Error when syncing gradle
the compile keyword was replaced with the word implementation so just swap it out for that
Updating SDK
Step 1
run 'git remote -v'
Step 2
if you don't have a remote present (typically upstream) pointing towards https://github.com/FIRST-Tech-Challenge/FtcRobotController.git, run 'git remote add upstream https://github.com/FIRST-Tech-Challenge/FtcRobotController.git'
Step 3
run 'git pull upstream master'
Step 4
Add back all missing dependencies especially this one (Dashboard)
Errors
`fatal: Need to specify how to reconcile divergent branches.'
run 'git config pull.rebase false'
'fatal: refusing to merge unrelated histories'
This is because you made the repo from a template. Repeat the pull --allow-unrelated-histories and then accept all remote from github desktop
Collin's guide to troubleshooting
Step 1
Check Wires
Step 2
Update Statements
Step 3
Add Telemetry
Step 4
Inverse Everything