![]() |
Tank Drive in Autonomous
I thought that when programming autonomous for tank drive the two values x and y in the
drive->Drive(x,y); (we named our robot drive "drive" , we're original) were the two motor values, but they are not. What are these values and what do I have to do to get the robot to back straight up in autonomous? |
Re: Tank Drive in Autonomous
I bekieve you are refering to the part like below:
Code:
myRobot.Drive(1.0, 0.0); |
Re: Tank Drive in Autonomous
When i try that the motors sort of give a little twitch and then do nothing.
|
Re: Tank Drive in Autonomous
is it humming like the motors are running?
|
Re: Tank Drive in Autonomous
No, and the lights on the jaguars aren't lit up either.
|
Re: Tank Drive in Autonomous
It sounds like you may have a watchdog issue? What does the Driver Station say when things stopped? Did you check your console to see if there are any messages?
|
Re: Tank Drive in Autonomous
ERROR: A timeout has been exceeded: RobotDrive... Output not updated often enough. ...in Check() in C:/WindRiver/workspace/WPILib/MotorSafetyHelper.cpp at line 123
I don't know what it means though... |
Re: Tank Drive in Autonomous
:/ sorry I don't know what that means either
|
Re: Tank Drive in Autonomous
Well with the lights not lit up on the Jaguars, it seems like the code they are getting is not telling them to run near full speed or they would go either Green/Red or for off would be Orange.
Is there an issue with how it is declared? Could you post your Autonomous code? And how long is your "Wait()" function set for? |
Re: Tank Drive in Autonomous
Quote:
|
Re: Tank Drive in Autonomous
I would check the voltage (in case of a bad Jaguar), but if it runs fine in Teleop then that shouldn't be it. Sounds like it should be properly connected because he mentions that the motors twitch.
|
Re: Tank Drive in Autonomous
Drive motors will be turned off after a tenth of a second by the Motor Safety feature if you don't give them a command. You can disable the safeties for the duration of Autonomous (remember to turn them back on in Teleop), or you can continuously set their values in a loop.
|
Re: Tank Drive in Autonomous
BTW, I always thought motor safety is to safe guard buggy code from losing control of the robot. But then I think about it, even with motor safety, buggy code can still cause the robot to runaway uncontrollably. So the purpose of motor safety is really for safe guarding losing communication with the joystick such that the motors will stop instead of running at the last set speeds. Therefore, that's why there is no point of turning safety on during Autonomous since there is no joystick involved. Is my assumption correct?
|
Re: Tank Drive in Autonomous
Quote:
|
| All times are GMT -5. The time now is 12:23. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi