Comments (2)
When I first created the robot project, I created a Command-Based project, which creates the Robot class and automatically inherits from a Robot type. At the time, I had not yet updated my FRC plugins so the auto-inherit was IterativeRobot. To test, I just now created a new blank Command-Based robot project (my FRC plugins are updated to 2018) and the auto-inherit was TimedRobot. So basically that's why our project is currently and IterativeRobot.
From reading (https://wpilib.screenstepslive.com/s/currentCS/m/cpp/l/241853-choosing-a-base-class), there is no difference to the structure that we see in Robot, so we could just change the class signature to "extends TimedRobot". From the same website, they recommend making this change due to slight differences in the way each type updates it periodic methods.
From my understanding, IterativeRobot updates its periodic methods "each time new data arrives from the Driver Station", meaning its updated at irregular time intervals (whenever the data changes + variance "depending on CPU load on the roboRIO, the driver station laptop, or network traffic"). On the other hand, TimedRobot updates its periodic methods "at a predictable time interval", the default setting being 20ms. If the data has not changed in this time period, it updates its methods with the most recent previous data.
Now, after that long-winded response, conclusion: I don't see much harm in switching to TimedRobot: no structure change, recommended to be better (and seems so - more reliable/consistent), would take approximately 10s to change.
from robotcode2018.
Why IterativeRobot instead of the new TimedRobot base class?
from robotcode2018.
Related Issues (20)
- Let operator stop intake motors? HOT 1
- Fix lift PID so can go to ground from holding position
- Why doesn't lift get to the ground at the end of switch auto?
- Intake does not intake cubes after the first one HOT 5
- Lift uses feet while everything else uses inches HOT 1
- PIDMove and PIDTurn should not finish until movement stops HOT 3
- Upgrade to latest frc_navx.jar to avoid hanging HOT 3
- Daniel's Issue - Formulas for turn velocity and move velocity HOT 2
- Put alias to /docs/controllers.txt in status bar of both DriverStation computers HOT 2
- spartan series zip in repo
- scriptupload.py may be unreliable due to timing issue HOT 1
- Autonomous code crashes if starting position not specified HOT 1
- DefaultIntake has a try-catch for the manipulator, but other default commands don't
- PIDMove and PIDTurn constructors have a lot of duplicate code
- Upgrade CTRE lib to Phoenix 5.2.2.0 HOT 1
- Lift should shift to low gear when holding position to reduce current draw HOT 1
- change joystick button functionalities to match these driver requests HOT 1
- new feature request: slow mode on trigger hold HOT 2
- Put SRXs and SPXs in brake mode during configuration HOT 1
- Fix FindTurnTimeConstant rotational velocity units
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robotcode2018.