Thread: FRCSIM Help
View Single Post
  #4   Spotlight this post!  
Unread 22-01-2016, 01:27
Peter Mitrano Peter Mitrano is offline
Registered User
no team
 
Join Date: Jan 2016
Location: Worcester MA
Posts: 21
Peter Mitrano is an unknown quantity at this point
Re: FRCSIM Help

Quote:
Originally Posted by garystjean View Post
One weird thing I noticed was that after I played around with the simulation for a couple minutes and tried out the Smart Dashboard simulator the robot seemed to drop down below the floor (see attachment). I can only see the top-most part of the robot, the rest is below the ground level?
-Gary
This is caused by an awesome little bug in simulation time. I'll be posting a video tutorial on debugging very soon that goes deep into it, but for now, just do this...

1) find all instances of usePIDOutpout()
2) find where you call the set() method on your motor
3) wrap it in an if statement that checks if the output is NaN

EX:
Code:
public void usePIDOutput(){
if (!Double.isNan(output)){
motor.set(output)
}
}
Reply With Quote