|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
[FTC]: LabVIEW Programming Template for FTC
Our lead programmer has created an awesome template using LabVIEW. It takes care of many issues that could cause problems:
-Disable Flag: this allows the field to shut down your robot after Autonomous and Teleoperated modes -Autonomous/Teleoperated Switch: this allows you to put both modes into one program and will allow the field to tell them when to run -Logitech Controller Dead Zone/Scaling: this takes care of the issue of the Logitech controllers not returning to zero when released, it also scales the input value from the controller to allow more precise maneuvering This program has lots of notes that will assist you in customizing it to suit your robot. The attached zip file contains the template and the custom scaling VI. Keep them in the same folder so the template can locate the scaling VI. Please feel free to check the program template for any errors (we have checked it over for many hours now and can't find any more mistakes). Please let us know how it is working for you, and if you have any questions email or call (our contact info can be found on a note inside the program template), we will be glad to help. |
|
#2
|
|||
|
|||
|
Re: [FTC]: LabVIEW Programming Template for FTC
Great! My team will try it out.
|
|
#3
|
|||||
|
|||||
|
Re: [FTC]: LabVIEW Programming Template for FTC
Copying Phil's suggestions posted in another thread:
Quote:
|
|
#4
|
||||
|
||||
|
Re: [FTC]: LabVIEW Programming Template for FTC
In an effort to explain the code that fixes the dead zone and motor scaling issue so that others may better understand how it works, our lead programmer has put together a detailed document. You will find it attached to this post.
|
|
#5
|
||||
|
||||
|
Re: [FTC]: LabVIEW Programming Template for FTC
Im glad to see teams posting programming Labview resources for FTC. I have taught a couple NXT Labview workshops and this is actually a bit more difficult to get working and understand than VEX or NXT-G.
Hopefully if teams take the time to learn to use the Labview Toolkit with the NXT it should help tremendously with learning the new FRC 09 controller. |
|
#6
|
|||||
|
|||||
|
Re: [FTC]: LabVIEW Programming Template for FTC
SInce this seems to be a good place to discuss Labview FTC issues, I have some observations and comments.
I've been playing with the LabVIEW NXT and FTC VI's for a while now, and I've also started using Team 288's cool template. So far, my satisfaction with the new FTC system is not so hot. My biggest compaint is that the telemetry isn't fast or reliable. For example, I'm running the Controller application on my somewhat dated desktop (2GHz pentuim 4 CPU), The screen responds to joystick changes pretty fast, but the robot's response is pretty sluggish. It doesn't seem to matter whether I use Bluetooth or USB.. I get the same response. I can jog the joystick and let it return to home, before the NXT even starts to turn it's wheels. Almost 1/2 a second delay. That makes it hard to drive. I've also noticed that the wheels don't always respond on command. Thsi may be since I've installed the new FTC toolkit, but I'm not sure. Since I like to try my best to debug problems, I needed some way to determine where my problem lies. So what I did was add an audio debugger to the NXT. I basically wired a very short tone to the same signal that's driving the motor controller. I used a base frequency of 1000 hz, and used the motor drive signal to sweep the tone by +/- 400 Hz. Now I can see if the link is the problem or if it's the motor controller. I only get a tone when a GOOD command is received by the NXT from the PC. It was quite interesting what I learned. 1) The first thing I learned was that the delay is certainly before the motor driver. The tone follows well behind my joystick movements. 2) Next I learned that the telemetry link is pretty reliable. It does seem to change it's update rate a bit, based on where the robot is located, but it never drops out unexpectedly. 3) Since the link seems solid, the flakey motor behavior must be in the Motor controller or it's interface. Every now and then a motor will run on, or fail to start, even though the "tone" clearly indicates that the NXT knows the motor should be doing something. Not sure where this leaves me, except to ask the comunity if my results are typical or unusual. Was there a FTC beta test group and what did they discover? I've added a picture of the audio debugger I created.. it's actually fun "hearing" what the link is requesting. |
|
#7
|
|||||
|
|||||
|
Re: [FTC]: LabVIEW Programming Template for FTC
OK, I've done some more testing and I have some usefull information.
1) I'd recommend that everyone put a "beep" in the case statement that runs when the NXT Bluetooth VI returns a non-packet status. Specifically when "Message Received" = False. You can quickly determine if you have problem reception-errors. 200ms at 200Hz is pretty noticable. Wheras I "thought" that the link was running prety smoothly, at some times it just seems to drop out (for me) and start beeping for no reason. I wonder if there is a "high Power" bluetooth base station I can find? 2) Sorry team 288, but your Dead-Zone scaling is a major CPU hog, and on my NXT it introduces a very noticable delay. I suspect that it's the floating point divide and two floating point multiplies. Without a floating point processor, divides can take a long time. I just went back to using my own deadband, and the Toolkit's motor scale vi. Driving is almost managable now.... (still not as responsive as a standard radio control with servos though) |
|
#8
|
|||
|
|||
|
Re: [FTC]: LabVIEW Programming Template for FTC
We've been having a lot of issues with driving also. The robot would respond fine, then stop responding or drive in a circle for a while then start working again.
One test I did was to make an all NXT/Lego bot driving on lego motors. It drove fine never obviously losing signal. It seemed very responsive. So the issue does not seem to be bluetooth. Back to the FTC system. We tried replacing wires and the motor controller with not much luck. We have to motors installed but not the encoders. In examining the FTC Move Motors VI, it calls the encoders. When I replaced the VI with the original August VI that came on the cd's, the robot responds much much better. It also seemed to help by hanging the computer with the bluetooth dongle out over the field. Jon Thompson Coach FTC 177 Twisted Bots |
|
#9
|
|||||
|
|||||
|
Re: [FTC]: LabVIEW Programming Template for FTC
Quote:
The motor controller (don't know if it's S/W or H/W) has a 2 second timeout. So if it stops getting commands, it will continue to do the same thing for 2 seconds and then coast to a stop. This often explains the driving in a circle effect: if only one motor is running when the commands stop.... it circles for 2 seconds and then rolls to a stop. Quote:
![]() Last edited by PhilBot : 22-10-2008 at 10:20. |
|
#10
|
|||
|
|||
|
Re: [FTC]: LabVIEW Programming Template for FTC
[quote=PhilBot;771468]Yeah, that's what we get too. Something to consider....
The motor controller (don't know if it's S/W or H/W) has a 2 second timeout. So if it stops getting commands, it will continue to do the same thing for 2 seconds and then coast to a stop. This often explains the driving in a circle effect: if only one motor is running when the commands stop.... it circles for 2 seconds and then rolls to a stop. QUOTE] Where did you learn about this? This seams to be the issue? Also from farther up the thread, do you know any way to have a non-linear scaling that isn't a memory hog? Thanks, |
|
#11
|
|||||
|
|||||
|
Re: [FTC]: LabVIEW Programming Template for FTC
>> Where did you learn about this? This seams to be the issue?
I was communicationg with a developer at NI and he said: Quote:
I don't think this is really that essential, since "most" driver just bang the controls, but an alternative would be a simple two slope scaling... eg: a scale of 0.5 for the first 50% of the Stick travel, and then a scale of 1.5 for the second 50%. This gives you full scale for 100% travel: ( 0.5 * 0.5 ) + (1.5 * 0.5) = 1.0 |
|
#12
|
|||
|
|||
|
Re: [FTC]: LabVIEW Programming Template for FTC
I don't believe this is a result of communication problems. I've discovered a bug in my LabVIEW and NXT-G implementations of Move Motors that causes this behavior. We will be issuing an update as soon as I'm sure it's fixed - it's in testing now.
|
|
#13
|
|||||
|
|||||
|
Re: [FTC]: LabVIEW Programming Template for FTC
Quote:
Once the new code is online, can you post a link here as well, Please... Thanks. Phil. |
|
#14
|
|||
|
|||
|
Re: [FTC]: LabVIEW Programming Template for FTC
Quote:
http://joule.ni.com/nidu/cds/view/p/lang/en/id/1129 Have fun! EDIT: It's the same location as the original encoder update and the update for braking. Rather than put up several different versions of essentially the same software, we've just been updating the updates. Last edited by RNasir : 30-10-2008 at 14:34. |
|
#15
|
||||
|
||||
|
Re: [FTC]: LabVIEW Programming Template for FTC
Could someone provide us with a program that we can use to test our drive system. We have not gotten to a point to do our own programming yet and havent been able to meet with our programming mentors and get them up to speed with labview. So we need some help. Thank You.
Mike FTC and FRC Team Last edited by mjgard : 29-10-2008 at 11:51. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [FTC]: First problem with FTC and LabView.....? | PhilBot | FIRST Tech Challenge | 5 | 07-11-2008 10:36 |
| [FTC]: FTC Labview questions | Monty Python | FIRST Tech Challenge | 8 | 14-10-2008 20:03 |
| [FTC]: Request for FTC video footage in Atlanta | ManicMechanic | FIRST Tech Challenge | 0 | 13-04-2008 02:27 |
| [FTC]: FTC]: FTC Champ Tournament - Ontario (Scoring Breakdown) | Mr. Lim | FIRST Tech Challenge | 2 | 03-03-2008 11:54 |
| [FTC]: [FTC]: Ontario Provincial FTC Start/End Times | cbhl | FIRST Tech Challenge | 8 | 16-12-2007 13:37 |