Auto issues with Servo in Java

Hey guys we are currently testing autonomous. Our sequential command groups are running fine, but as soon as the command gets to our Servos it stops working and reading anything after it. We are using 2 Hitec HS-485HB servos. The Servos are running fine during teleop, so we are unsure of why our robot stops during autonomous.

Any help is appreciated thanks.

Without code, its hard to say anything for certain.

Also, you may want to properly categorize your post into the programming/java forum to get more (relevant) eyes on it.

Hey, Thanks for the feedback.
And here is the link to the code.
What is in question is the command called autoTry in the robot container.
The robot will do anything before the servoCmd perfectly.
But once it hits the servoCmd which does execute, nothing is read after.

Your servocmd has no end state (isFinished always returns false), so it would need to be interrupted for something else to run. Since you have it in a sequential group, whatever you put after it will never end.

You need to either set isFinished to return true (or some kind of calculated value that will eventually be true), or you need to add a timeout to the command in your auto command group

Hey, I added the timeout and now it’s working.
Thanks for your help.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.