![]() |
Delay in controls (HELP!)
Our robot has been fine up until today. Nothing different has happened. When we turned it on today, it seemed like the motors wouldn't run. But then the robot moved. It seems we are experiencing some major delay between our driver station, and our robot. We tried it inside our room, with the robot on blocks right before that, and it worked perfectly. we then took it outside, and....lag! Any answers would be great!
|
Re: Delay in controls (HELP!)
Coding in C++? Check how you're allocating memory.
|
Re: Delay in controls (HELP!)
Quote:
|
Re: Delay in controls (HELP!)
Quote:
|
Re: Delay in controls (HELP!)
Quote:
|
Re: Delay in controls (HELP!)
In LV, I've seen this issue when the WPIlib spits out errors. It seems that, if any individual thread gets a VI or two spitting constant errors, then the processor load of logging and transmitting all of these errors to the DS bogs it down enough for the thread to become unhappy (which usually trips one of the 100ms watchpuppies, which then sends more errors, and then everything dies).
I'd see if there are any errors being spit out. |
Re: Delay in controls (HELP!)
Quote:
|
Re: Delay in controls (HELP!)
Quote:
SuperNerd256, I find it unlikely that your compressor was taking up that much memory. I am rusty on my C++ library, but I could not imagine it is doing massive amount of of operations(perhaps a few function calls that go no where when the compressor is unplugged) or declare so much memory you eventually get a lag(unlike an image which is large). Some suggested trouble shooting(which you may have tried), is your battery good? Is the Classmate running something else(possibly in the background, an update program or something that has highest network priority then the driver station and is trying to figure out why your robot is not responding to its internet request) using task manager? Is this a recent compile of the code(like Chris is me's story, but insert any variable that has never been deallocated will add up over time)? Is your robot in a Faraday Cage? |
Re: Delay in controls (HELP!)
Maybe my understanding of embedded programming is different than everyone else's, but I've always understood embedded systems (such as FIRST robots) which run in real time iteratively have little need for dynamic memory allocation (as they always use the same variables, and pass data in and out of functions and variable storage). For things like the camera image it might be nice to allocate memory dynamically, but still, does a robot really need to create and destroy objects while it is running (post-initialization)?
Although all of the RT embedded programming I've done outside of FRC is for systems which lack dynamic memory allocation (and I'm lucky if it has an RTOS with pre-emptive scheduling). In FRC, I use LabVIEW which does everything for me. |
Re: Delay in controls (HELP!)
Quote:
|
Re: Delay in controls (HELP!)
Quote:
|
Re: Delay in controls (HELP!)
Quote:
|
Re: Delay in controls (HELP!)
I told me lead mentor, and we will be reloading the code at our next meeting. Thanks! :D
|
Re: Delay in controls (HELP!)
Quote:
Quote:
Even labview you do this. All those close vi's de-allocate all the cache you initialize. |
Re: Delay in controls (HELP!)
Someone may have mentioned this but If you are in a area with a lot of Wi-Fi Access Points you could be getting interference which would cause dropped packets / lengthy packet delivery times. I suggest using the 5GHz range if you can and wireless N because in my experience using those settings has avoided interference.
|
| All times are GMT -5. The time now is 11:18. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi