I have labview 8.2 to learn off of, as well as easy C and C++. I’m trying to apply what I’ve learned from my classes in C++ that I can apply to this robot. We have previous robots to go off of, but we only know how to create software applications, like accounting software, but have no idea how to get started making a robot move you know. We used to have a mentor to teach us how to do this, but he no longer is a part of our team. Is there any site or post or something that can send us in the right direction for this?
Site? Look no further. Post? Well, this thread might help; the original poster was in a similar boat, though with more experience. Follow the links for more help.
We’re all new to programming FRC robots using LabView this year.
The first sample hardware and software for the 2009 robot control system is just now being made available to a select few teams. I expect that in the next week or so we’ll have links to the “right” way to do it, with the NI/LabView equivalent of the IFI default code. Until we’ve seen the documentation for the new system, we can’t do a whole lot to prepare ourselves for programming it.
Actually if you want to try LabView (and I highly encourage you to do this) you can contact LabVIEW at ni.com and download 8.5. It will be good for 30 days… and you can contact a local NI rep to get an activation code for it for permanent use.
You can also then go to ni.com/first and take a look at the training that is there. This is the FIRST specific community that NI has set up.
There will be more and more information at this site as it is produced.
Right now there are links to some LabVIEW tutorials there that could help you get a feel for LV right now…
If you know any FTC teams, The FTC specific Labview program was released last week and they have it. We are trying to determine whether this could be released to FRC teams to play with. It is very easy to program a NXT robot using this FTC version. This would be time well spent.
You can also download an NXT toolkit that would enable you to program the Mindstorm NXT brick with LabVIEW. (This is what FTC uses as a controller).
This informationis available at
http://zone.ni.com/devzone/cda/tut/p/id/4435
I hope this will help you…
(and any others…)
I’ll choose to answer that question quite literally. Since we are still using Victor 884s this year, you’ll use an unsigned byte (0 to 255) to control the Victors, with 127 being neutral. In truth we are using the TTL outputs, connected to a PWM bumper, so there will be some VI that transmits the unsigned byte somehow (I assume it’d just be a series of 8 bits, but there’s probably a couple more to mark where to start reading the number. Personally, I’d like to do it all with the FPGA, and just use the PWM bumper as a way to transmit the signal from the TTL module to a PWM cable. Of course, this would require opto-isolation, and FIRST doesn’t seem to be too into that. Next year we won’t be using the 884s, so they might just give us a fused H-bridge and let us create our own PWM. (Actually, it would be more like an H-bridge with a relay shut-off to the motor if the cable is pulled. The good thing is, this would still be about a tenth of the price of an 884).)
Assuming you’re using a joystick control, you have the right and left drive tied to the x axis, and their offset tied to the y axis (after you’ve subtracted 128 and converted the y axis to a signed byte). This would work just fine, assuming the unsigned bytes saturate instead of rolling over. (you can temporarily turn it into a signed word and use the “In Range and Coerce” vi, found in Programming -> comparison)
And that’s certainly not the only way of controlling a robot. I’m working on an image-based method of controlling the robot, which can be found at http://sotabot.com/robot/programming.html It’s labelled “robot tracker” because so far, it just tracks the paths of both the right and left drives, given the speed of both drives. I’m still working on an efficient way of reading objects off the screen (without looking at every pixel in a 40px radius). There’s also some other VIs there that I thought might be useful.
Hope that helps!