|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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?
|
|
#2
|
|||
|
|||
|
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.
|
|
#3
|
||||
|
||||
|
Re: Vision Tracking Crashing Crio
Quote:
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. |
|
#4
|
|||
|
|||
|
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!
|
|
#5
|
||||
|
||||
|
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
|
|
#6
|
|||
|
|||
|
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 |
|
#7
|
|||
|
|||
|
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|