FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with new posted sample program.

Hey guys,

I was reading the thread that asked about vision and one of the NI guys sent them to a sample Labview Program that was used to follow a trailer. I am using the 206 Axis Network Cam.  When i launched the program it deployed and worked fine. It took a while for the camera display to come up, but when i did i was ecstatic,  Then when i tried to put my hand in front of it to see if it would pick it up. After this i learned that my camera was not refreshing and it was just stuck in a snapshot or something.  I lowered the resolution to the lowest possible setting but to no avail.  After a frustrating 30 minutes, i decided to work with the servo stuff on that same program.  I hooked up my servos to the correct PWM slot and tried to work with it.  After no success i switched sidecars to see if that would help. Alas, i was left with a snapshot of my cabinet and nothing else.  Please help me.

0 Kudos
Message 1 of 8
(12,901 Views)

Hi,

Are you using the two color tracking VI?  If so, did you have the VI set to camera display or tracking?  In tracking mode the display won't update, and the servos should attempt to locate and track and object.

For the servos, do you have the jumper installed on the two pin connector (next to the three pin connector on the digital sidecar)?  If not, your servos aren't getting power.

Regards,

Jeremy Billheimer
Applications Engineer
National Instruments

Regards,

Jeremy_B

Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(3,295 Views)

Thanks alot,

I had been running the program yesterday and nothing happened.  Today before i read your response i loaded the program and had the gimbal track button selected and the icons on the front panel for the servos were going crazy.  I then read your response. I didn't know we needed jumpers on the side car. I installed them.  I read a previous thread that said the resolution might need to be turned down so i put it as low as it would go.  I took your advice and this is what happened.  I loaded the program that was posted, changed the default ip address, then i deployed the program.  Originailly i had the gimbal track button selected.  Then it started running and my servos were moving and i had a black screen on the mask portion of the front panel. I was so happy.  Then while the program was still running i pushed the camera display button and got video that was working and refreshing perfectly.  After about 15-30 seconds the camera stopped refreshing and i was left with nothing but a still frame. at this point the servos still worked.  I then stopped the program and tried to relaunch it.  It deployed and nothing worked.  I tried turning up to time that was in the bottom left corner under the fiend foe button.  Nothing worked not even the servos.  I dont know what the heck is going on now.  Please help once again.  

0 Kudos
Message 3 of 8
(3,295 Views)

Did the camera power cable come partially unplugged. We've had the problem, and are now using a zip tie to hold it in place.

0 Kudos
Message 4 of 8
(3,295 Views)

nope...i still dont have anything else

0 Kudos
Message 5 of 8
(3,295 Views)

Does this camera behavior (freezing on a single frame) occur in other instances as well?  Does it occur when you are running one of the default FRC Robot projects?  As far as the servos go be sure your watchdogs are being feed.

Mark
NI App Software R&D
0 Kudos
Message 6 of 8
(3,295 Views)

ok great news...my cable was unplugged just a smidge. ok new question.  now this program follows a gimble well if the camera is mounted on the two servos. but i was messing around with it and i cant figure it out how to make it use the motorized wheels to follow the gimble.  i tried replacing the servo icons in the second while loop with the motor stuff and it didnt work. one motor just ran. i want to know how i move the wheels arcade style while tracking the gimble and when it is in the middle of the frame go forward till the bot is x distance away.  please help with this new matter.

0 Kudos
Message 7 of 8
(3,295 Views)

There is no single right way to do this.  We have posted some sample code to do some simple tracking here.  You might also look at the Image Processing tutorial to help you create code to accomplish this task.

Let us know if this help you get started!

Cheers,

Mark

Mark
NI App Software R&D
0 Kudos
Message 8 of 8
(3,295 Views)