View Single Post
  #6   Spotlight this post!  
Unread 01-28-2016, 10:50 PM
kylelanman's Avatar
kylelanman kylelanman is offline
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 185
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
Re: Engine flickering?

Quote:
Originally Posted by kylelanman View Post
We will be doing more debugging on Thursday and report back here with our findings. The only current theory we have is that the command is somehow interrupting itself. This our 4th year using command based and we have never seen anything like this before.
We determined the root cause of our problem. I'm not sure if the cause is the same for the OP or not but I said I would report back so here goes.

This call was in TeleopPeriodic instead of RobotInit where it should have been.
Code:
SmartDashboard::PutData(new RotateToAngleCommand(45));
We eventually figured this out by placing a printf in the constructor of RotateToAngleCommand. When the log filled up with statements very quickly it was obvious the SmartDashboard:utData command was likely in a periodic function.

In the end we had 100's of instances of the RotateToAngleCommand in memory. Given enough time I'm sure we would have run out of memory. When invoking the command from the dashboard several of the instances were being scheduled at the same time and causing the stuttering.
__________________
"May the coms be with you"

Is this a "programming error" or a "programmer error"?

Reply With Quote