my team captain wants me to program our autonomous code to have it reverse and then spin 180 degrees. The only problem is that no matter what I put in as the motor values, the robot will either just reverse or it will start to do the harlem shake. Can anyone please take a look at it for me? [C:\Users\Matt\Documents\autonomous code motor problems.htm](C:\Users\Matt\Documents\autonomous code motor problems.htm)
I cant open the link. and what programming language are you using?
or it will start to do the harlem shake
I lolāed at that one
Anyway, what language are you using and you incorrectly posted the file. Try uploading like an attachment to your post.
sorry about the link not working, its my first time try to post a file here.
Iāll give it another shot. and by the way, iām using labview.
Autonomous Independent.vi (54.8 KB)
Autonomous Independent.vi (54.8 KB)
Well it looks very messy to me, because it seems there are many unnecessary while loops with no values being plugged in. Try writing down what you want the robot to do for how long and set up a timed sequence that executes everything as time progress .
Well there is a reason for the way it is. Itās my first year as programmer and I had, and still donāt have, any idea as to how the timing works. But we ended up just letting the robot back up and stop. It would still be nice to know how to have it spin after for next time, though.
I would highly recommend going through some of the tutorials there are for labview online.
I havenāt used labview in FRC for the past few years, but I found these guides immensely helpful back when I was using it:
http://www.frcmastery.com/
The guy that narrates these is very knowledgeable and covers a large number of beginner and advanced topics quite well. It would be to your bennefit to go through these guides and understand some of the concepts.
It looks like NI has put up their own set of instructions for 2013.
I quickly looked through, and a slight modification to this guide would probably help you do what you were looking for (driving back and then turning).
[EDIT] On closer look the auto mode ātutorialā isnāt much more than some screenshots and isnāt much of a guide. Iād suggest watching this videofrom frcmastery on the 2011 auto mode code. It should be helpful in understanding how to structure an auto mode to do what you want.[/EDIT]
If labview is something youāre interested in learning more about, in preparation for future years, go through the guides linked above. Even the ones that donāt sound like they will be relevant to something you need to know will likely teach you something new.
thank you very much for the advice and links. I think I will go and take a look at them.::rtm::
OK. Iāve gotten past the autonomous issues, but I now have another problem. My teamās driver and shooter operator want me to put together a vision tracking system. I have no idea how to do it, so I could really use some help.
In addition to this, we have been having issues with our compressor. As soon as the robot turns on, the compressor either turns on or stays off, without being enabled, and it stays that way until the robot is turned off. Weāve tried changing the PWM, the spike, the PWM port on the digital side car, but nothing has seemed to work. And this issue came out of the blue. It was working at our last event, then when we went to get ready to go to an off-season event, there was a problem.
It might just be lazy terminology on your part, but a Spike does not connect to a PWM port. It connects to the Digital Sidecar pins labeled specifically for relays. Describe exactly where each wire goes so we know youāve done it correctly. There should two wires between the Spike and the compressor, two between the Spike and the Power Distribution Board, and three between the Spike and the Digital Sidecar. Clear pictures would be ideal.
not entirely sure waht we did during that last competition, but after changing some stuff in the code and I dont know what on the robot, we got the compressor working properly again. now I just need to figure out vision trackingā¦
Hopefully someone more knowledgeable than me can chime in, but my understanding is that unless you are experienced enough to code your own vision tracking, RoboRealm is the way to go. But, that is literally all I know about it, so unless somebody else comes along your on your own.
P.S. Keep up the good work. Its great that your asking questions. In my opinion the role of programmer is the most under-appreciated, abused, and difficult role on most teamsā¦ Someone remind me again why I decided to learn java over the summer?
Team 341 released their vision tracking widget using OpenCV on the SmartDashboard which makes an excellent starting point for making your own vision tracking widget. It was very useful for us.
The paper can be found here.