|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Autonomous
Can you use the autonomous code as is? I think in our case we have to change to the tank drive, but besides that will it do anything or does it need more. I am just looking to see if it will drive forward, without making changes. We are going to test on blocks, but was wondering what to expect. It looks like it will but I am not sure. If it does that then we can adjust it to turn, etc.
Thanks. |
|
#2
|
|||||
|
|||||
|
Re: Autonomous
It should work, as is, but you must at least toggle the True/False input on the left to "True" allowing it to run.
You don't even have to change to Tank Driver from the default Arcade Drive. Autonomous doesn't care how you command it, and there are no joysticks anyway in autonomous. It only runs for about 5 seconds rather than the full 15 seconds of autonomous. You can fix that simply, by changing the "4" in the upper left to a 12. You probably do want to add a little variety in the form of a turn or two. Last edited by Mark McLeod : 22-02-2009 at 18:56. |
|
#3
|
|||
|
|||
|
Re: Autonomous
Quote:
I certainly hope they offer more courses this summer and fall on using this with the FRC. I attended three all day trainings this Fall and can make Labview do all kinds of things from a math point of view, but taking that and making it work with motors, electronics and other things is much more difficult. I would pay for a class or training materials to help learn how to tie these together and understand the whole picture. Given the number of threads about the programming, I think I am not the only one. Thanks for making this easier for us. |
|
#4
|
|||
|
|||
|
Re: Autonomous
Quote:
If I understand it correctly -0.5 drives forward and 0.5 drives backward??? How do you make it turn? Thanks for all the help. |
|
#5
|
|||||
|
|||||
|
Re: Autonomous
Quote:
Hover the mouse over the left edge of the Arcade Drive icon and you'll see an unattached x-axis. right click and choose constant to give it a value (0 is the default when nothing is attached). If you choose to switch to Tank Drive then a turn in place would be .5 to one side and -.5 to the other. Last edited by Mark McLeod : 23-02-2009 at 11:31. |
|
#6
|
|||
|
|||
|
Re: Autonomous
Quote:
|
|
#7
|
|||||
|
|||||
|
Re: Autonomous
Quote:
Yes, negative numbers on the y axis mean forward. That's because the joystick standard has negative forward and positive backward, likely because it was defined with flight simulators in mind. |
|
#8
|
|||||
|
|||||
|
Re: Autonomous
Alan's probably answered part of your question.
The x-axis is just the turn speed, and the y-axis adds the forward or reverse speed to get an arc. With the trailers behind the robots this year you'll probably want to do some sort of arc (mixture of x & y axis), but full speed (1.0 or -1.0) will probably be too much for the slick floor and wheels. I'd imagine you'll want to start on practice day with about half speed for both until you see how your robot really behaves. Then raise or lower the speed based on what you see. Last edited by Mark McLeod : 23-02-2009 at 12:36. |
|
#9
|
|||
|
|||
|
Re: Autonomous
Here is what I have...
I do have an x and y value. If I understand it, the first will make a slight turn one way and then a slight turn the other way and essentially end up straight? How often does the watchdog need a feed? Thanks. |
|
#10
|
|||||
|
|||||
|
Re: Autonomous
That's the idea.
If I remember correctly -x will turn to the right and +x will go left. In practice, because of possible spin out as your robot gets up to speed, I bet the turns won't quite even out. The earlier turns will lose ground and the later turns will be more efficient. But then you'll run into another robot or trailer and everything gets thrown off anyway. Just keep moving.The WatchDog Delay & Feed takes care of everything to do with WatchDog timing for you. That vi tells the WatchDog to delay and to feed itself as often as necessary while it's causing the delay. |
|
#11
|
|||
|
|||
|
Re: Autonomous
Quote:
We will be moving, moving, moving... I hope. |
|
#12
|
|||||
|
|||||
|
Re: Autonomous
I neglected to mention that the turns also don't even out because you'll be turning in one direction for 2 seconds and in the opposite direction for only 1 second.
That'll essentially give you an overall arc to the right I think, but so slight that you might end up in your opponents corner. Of course, you'll be running into the robot coming out of that corner way before you get there. To end up straighter you'd go one way for 1.5 seconds, then the other way for 1.5 seconds to even things out. But that's probably overthinking it all anyway. Last edited by Mark McLeod : 23-02-2009 at 13:45. |
|
#13
|
|||
|
|||
|
Re: Autonomous
Quote:
If I started in the lower right corner and went slightly left then straight and then slightly left, etc. I am hoping to go to about mid field or so. As long as I am pointing toways the other end when I am done so my trailer is not to the other teams in the other alliance. Move, move, move... |
|
#14
|
|||||
|
|||||
|
Re: Autonomous
The ground your robot can cover depends too much on the gearing and wheel slip to know for sure. With no other robots in the way you'll probably make it the whole length of the field during the 15 seconds. But since there are four other robots with trailers in that direction, as well as the robot coming from the left corner, I imagine we'll all end up in one big traffic tie-up in the center.
You probaly want a variation in your autonomous to account for the three possible starting positions. Keeping what you have you can simply duplicate that loop twice more. Then vary your power and times in each for your best guess, e.g., if what you have handles one corner, then just reverse the numbers in the second autonomous for the other corner. Once you agree on starting positions with your Alliance partners for a match, you can quickly switch between auto programs just by using that True/False switch on the left. True for the corner you'll start in and False for the others. |
|
#15
|
|||
|
|||
|
Re: Autonomous
Can you just highlight to copy them? Do they just go one under the other like the Basic Robot Main has three loops?
If we are not using the other two loops in the Basic Robot Main can we just delete those? Thanks so much. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Autonomous | Whitetail Freak | Programming | 5 | 14-02-2009 07:35 |
| Autonomous | hedgehogger | Programming | 1 | 22-01-2004 18:29 |
| R.A.G.E. Autonomous? | DarkJedi613 | Regional Competitions | 7 | 17-03-2003 21:33 |
| Autonomous | Jestin Hashop | Rules/Strategy | 2 | 11-02-2003 19:24 |