Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Vision Tracking Crashing Crio (http://www.chiefdelphi.com/forums/showthread.php?t=113905)

Shrubadub 18-02-2013 21:26

Vision Tracking Crashing Crio
 
1 Attachment(s)
So when i run the attached visions code and it sees all three goals it slows the robot down so much it crashes. I tried putting a wait timer in the loop but that did not work. Any suggestions?

nickcvet89 18-02-2013 21:31

Re: Vision Tracking Crashing Crio
 
We are getting the same type of response, actually our code doesn't even do anything with camera tracking enabled. cRIO CPU usage shows 100% on DS. Once we use a disable diagram in our teleop tracking, everything works fine. I was wondering if we should put the tracking code from teleop to periodic tasks.

bvisness 18-02-2013 22:02

Re: Vision Tracking Crashing Crio
 
Quote:

Originally Posted by nickcvet89 (Post 1235957)
We are getting the same type of response, actually our code doesn't even do anything with camera tracking enabled. cRIO CPU usage shows 100% on DS. Once we use a disable diagram in our teleop tracking, everything works fine. I was wondering if we should put the tracking code from teleop to periodic tasks.

Okay, first of all - you should NEVER run something as resource-intensive as vision processing inside Teleop.vi. Teleop tries to run every time the robot gets a new packet of info from the driver station, and if something is still running when a new packet is received then you get all kinds of problems. You should move your code to Periodic Tasks.vi at a minimum, or move your vision processing into your Dashboard code.

Regarding the original post - where in your code are you running your vision processing? Even if you have your vision code running in Periodic Tasks, you still may get enough lag to make the cRIO give out on you. Many teams (including us) opt to run vision code on our Driver Station PC so that we don't use up so much processing power on the cRIO.

nickcvet89 18-02-2013 22:10

Re: Vision Tracking Crashing Crio
 
Thanks for the suggestion, I am wondering though, how would you go about running it on the driver station pc? Should I place our vision processing vi and teleop code in a dashboard project? Sorry, labview is not my cup of tea!

Shrubadub 18-02-2013 22:34

Re: Vision Tracking Crashing Crio
 
I am running my vision tracking in my dashboard project and then using a network table to send my data to my teleop vi

Greg McKaskle 19-02-2013 04:40

Re: Vision Tracking Crashing Crio
 
To the original poster, the doc you attached is running on the dashboard? And when it sees targets it causes the robot to crash?

I don't even see the 3rd dashboard writing anything to the robot over SmartDashboard. How is it getting the data to the robot, and what is the robot doing with it. Also, what do you mean by crash?

To nickcvet89, I posted in the other thread about how to put stuff on the dashboard. You don't need to move teleop.

The overall structure is that RobotMain calls teleop each time a new joystick command comes in -- about every 20ms. If you don't return from teleop, you miss joystick commands and the robot is not responsive. If you put the code into another function that runs in parallel, such as Periodic Tasks or Vision Processing, then teleop will work as intended.

Greg McKaskle

nickcvet89 20-02-2013 00:06

Re: Vision Tracking Crashing Crio
 
Thanks Greg, really helping me thru this. Although I foresee many teams not adapting vision processing, but still think its worth a try.


All times are GMT -5. The time now is 12:08.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi