Go to Post Even though our team really digs the Tumbleweed name, the kids normally refer to the robot as the 'Neun-agon'. - Amanda Morrison [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-02-2013, 21:26
Shrubadub's Avatar
Shrubadub Shrubadub is offline
Shrubadub
FRC #2656 (Quasics)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Monroeville Pa
Posts: 26
Shrubadub is an unknown quantity at this point
Vision Tracking Crashing Crio

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?
Attached Files
File Type: docx Code.docx (261.9 KB, 20 views)
__________________
Reply With Quote
  #2   Spotlight this post!  
Unread 18-02-2013, 21:31
nickcvet89 nickcvet89 is offline
Registered User
FRC #1228 (RoboTribe)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Rahway,NJ
Posts: 99
nickcvet89 will become famous soon enough
Send a message via AIM to nickcvet89
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.
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 18-02-2013, 22:02
bvisness's Avatar
bvisness bvisness is offline
Programming Mentor, Former Driver
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Woodbury, MN
Posts: 181
bvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of light
Re: Vision Tracking Crashing Crio

Quote:
Originally Posted by nickcvet89 View Post
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.
Reply With Quote
  #4   Spotlight this post!  
Unread 18-02-2013, 22:10
nickcvet89 nickcvet89 is offline
Registered User
FRC #1228 (RoboTribe)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Rahway,NJ
Posts: 99
nickcvet89 will become famous soon enough
Send a message via AIM to nickcvet89
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!
__________________
Reply With Quote
  #5   Spotlight this post!  
Unread 18-02-2013, 22:34
Shrubadub's Avatar
Shrubadub Shrubadub is offline
Shrubadub
FRC #2656 (Quasics)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Monroeville Pa
Posts: 26
Shrubadub is an unknown quantity at this point
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
__________________
Reply With Quote
  #6   Spotlight this post!  
Unread 19-02-2013, 04:40
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #7   Spotlight this post!  
Unread 20-02-2013, 00:06
nickcvet89 nickcvet89 is offline
Registered User
FRC #1228 (RoboTribe)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Rahway,NJ
Posts: 99
nickcvet89 will become famous soon enough
Send a message via AIM to nickcvet89
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.
__________________
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:54.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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