![]() |
Multiple Autonomous Actions
1 Attachment(s)
My team is working on some autonomous code for an off season event we are attending, and we have a simple drive backwards autonomous. But we were hoping to at least pick up a tote and drive back. This is the code that we currently have...
Attachment 19384 |
Re: Multiple Autonomous Actions
1 Attachment(s)
It sounds like you want to lift the tote before you start moving backwards. You can link while loops together in sequence and put the code for lifting the tote in the first loop, and your drive backwards code in the 2nd loop. The first loop will not send information outside of its loop until it finishes, and the 2nd loop will not start until its inputs are filled. You could end the first loop on timing, number of loop iterations, or based on some robot feedback that lets you know the tote has been lifted.
|
Re: Multiple Autonomous Actions
Quote:
|
Re: Multiple Autonomous Actions
Quote:
|
Re: Multiple Autonomous Actions
hum ok i will give this a try. Do you still place all your blocks in the Auto area?
|
Re: Multiple Autonomous Actions
You can use a state machine. We posted our code on line. Take a look at what we did. It will help you a lot for next year if you do. Our autonomous code look very simple and is very easy to edit. You can stop and start it with out having to reboot.
Look up team 107 code post http://www.chiefdelphi.com/forums/sh...d.php?t=137046 If you have any questions let me know. |
Re: Multiple Autonomous Actions
cool i will take a look at it. We have used state machine in the past however i do not like not being able to see everything at once. Also it is hard to move states around. Do you have any ways around these problems
|
Re: Multiple Autonomous Actions
I our code everything is handled using enumerated value arrays. The enumerated values is a strict type def. It is very east to move things around. We had nine different auto modes this year and it only took minutes to make a new one.
|
Re: Multiple Autonomous Actions
1 Attachment(s)
Quote:
Quote:
If you limit each state to small functions you can make it more modular and keep each state smaller. This may force you to pass more data however. This is the structure I like to use to pass data between states: Attachment 19396 |
Re: Multiple Autonomous Actions
Quote:
Also i really like your type def idea that make it much easier to move things around. I will give that a try. |
Re: Multiple Autonomous Actions
if you guys are interested are team with PlayingWithFusion help just released are new mini Labview robot for software development. We have been using it the past year to teach students Labview and test new software
Here is the link for the release video https://www.youtube.com/watch?v=EFmnmp_VHHU http://playingwithfusion.com/product...=65&catid=1009 |
Re: Multiple Autonomous Actions
Connecting while loops is working well. Is there anyway to make one action go before the other? Because currently, both actions are running at the same time.
|
Re: Multiple Autonomous Actions
Quote:
If you think you've already done that, then post a picture of your code and we'll see if we notice anything else. PS. It's also possible that your first loop triggers the lifting of a tote, but doesn't actually wait until it's lifted before the loop finishes. If the first loop time is short enough it may be difficult to tell visually that it starts before the second loop. |
| All times are GMT -5. The time now is 06:08 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi