robotpy / pyfrc

python3 library designed to make developing RobotPy-based code easier!
MIT License
50 stars 35 forks source link

Lag during initialization of teleop and autonomous #87

Closed adam-mcdaniel closed 6 years ago

adam-mcdaniel commented 6 years ago

Our team, 6517, played in the battle for the bluegrass preseason competition yesterday. We had switched to python 2 weeks prior, and it was working out pretty well. When each match began though, our autonomous wouldnt start for about 5 seconds after the autonomous period began, and the same for teleop. Is there a problem with robotpy and pyfrc or do i need to comb through my code?

virtuald commented 6 years ago

That would be a problem with your code, many other teams have successfully used RobotPy without any reported similar issues last year.

My psychic debugging powers tells me that you created a Gyro object at the beginning of teleop and/or autonomous mode (gyro initialization has a 5 second sleep in it). That would cause a similar issue if you did the same thing in Java/C++.

virtuald commented 6 years ago

Also, if you're having trouble identifying the issue, feel free to post a link to it (or a gist) and I'd be happy to help you debug it.

adam-mcdaniel commented 6 years ago

Bingo, that was our problem. Thanks! Your help is very much appreciated :)

On Nov 5, 2017 4:14 PM, "Dustin Spicuzza" notifications@github.com wrote:

Also, if you're having trouble identifying the issue, feel free to post a link to it (or a gist) and I'd be happy to help you debug it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/robotpy/pyfrc/issues/87#issuecomment-342006213, or mute the thread https://github.com/notifications/unsubscribe-auth/Aa65v0HkizOJbBAtO5bSoZWwlZw7Zif0ks5sziUxgaJpZM4QSai6 .