![]() |
Autonomous Not Working
Hello, sorry to be posting yet again, but this time it's another problem. I'm trying to get autonomous to simply just drive, not in a straight line, but just drive in general. The rio doesn't throw me any errors or anything, just nothing happens when I run my autonomous command. Here's my code
Drive subsystem Code:
package org.usfirst.frc.team219.robot.subsystems;autonomous drive command Code:
package org.usfirst.frc.team219.robot.commands;Code:
package org.usfirst.frc.team219.robot; |
Re: Autonomous Not Working
Well just from looking at the command (assuming its running properly), you're running it for a total of 0 seconds (because you're instantly returning "true" for "isFinished"). I'd recommend a setTimeout() and isTimedOut() (? don't remember the name of these functions, its been two years since ive done command based programming) to set the command to a specific time interval.
Also, there's no evidence that you ever tried to debug the issue. I recommend that you post System.out.println() calls to trace where your code is running to detect where your issue is. Is the command being initialized properly? Is isFinished() being called? Is execute() being called? Are the talons valid? Chief can't help you competition-time. |
Re: Autonomous Not Working
i'd try putting false in the isFinished method, then set your motors to 0 in isInterupted and isFinished. You should drive until teleop kicks in
|
Re: Autonomous Not Working
Thank you for your input everyone, however this time it wasn't a code issue, but a hardware issue. Our CAN bus wires got unplugged from the roborio which caused the values to not be sent to the motors.
|
| All times are GMT -5. The time now is 01:45. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi