Linear Travel using Encoder
HTML-код
- Опубликовано: 10 авг 2023
- This tutorial provides a basic introduction to encoders for robot motors. Rookie youth members of high school robotics team will use motors as the most fundamental prime mover for their robots. The information in this presentation will help them to use the selected motors for linear travel in the most fundamental manner. More tutorials are planned to extend the concepts for more rigorous linear travel using control algorithms through stepwise refinement of the models.
The key concepts of motor encoders is explained very nicely in a ServoCity presentation:
• How Encoders Work - wi...
The code was adapted from FTC SDK 8.2 external samples. In preparation for future tutorials to extend the concepts, the code was modified with a Datalogger helper class. To avoid complexity, this logging is not discussed in the slides but here is an example of the logged data:
Timestamp,OpModeStatus,Initial Speed,Direction,Distance,Ticks 0,Ticks 1,Ticks 2,Ticks 3,Current Speed 0,Current Speed 1,Current Speed 2,Current Speed 3,Heading
000.393,,,,,0,,,,,,,,2.510
020.253,,0.400,,815,7,,,,,,,,2.510
020.291,,0.400,,815,17,,,,,,,,2.872
020.324,,0.400,,815,30,,,,,,,,3.208
020.355,,0.400,,815,44,,,,,,,,3.578
020.385,,0.400,,815,59,,,,,,,,3.687
020.415,,0.400,,815,76,,,,,,,,3.721
020.446,,0.400,,815,93,,,,,,,,3.721
020.475,,0.400,,815,110,,,,,,,,3.691
020.508,,0.400,,815,130,,,,,,,,3.612
020.537,,0.400,,815,150,,,,,,,,3.617
020.566,,0.400,,815,171,,,,,,,,3.676
020.596,,0.400,,815,193,,,,,,,,3.720
020.629,,0.400,,815,219,,,,,,,,3.734
020.658,,0.400,,815,242,,,,,,,,3.749
020.686,,0.400,,815,264,,,,,,,,3.881
020.716,,0.400,,815,286,,,,,,,,3.902
020.745,,0.400,,815,310,,,,,,,,3.931
020.773,,0.400,,815,331,,,,,,,,3.950
020.801,,0.400,,815,353,,,,,,,,3.865
020.831,,0.400,,815,376,,,,,,,,3.750
020.863,,0.400,,815,401,,,,,,,,3.658
020.893,,0.400,,815,425,,,,,,,,3.598
020.923,,0.400,,815,451,,,,,,,,3.589
020.952,,0.400,,815,476,,,,,,,,3.564
020.982,,0.400,,815,502,,,,,,,,3.550
021.013,,0.400,,815,528,,,,,,,,3.587
021.041,,0.400,,815,557,,,,,,,,3.687
021.069,,0.400,,815,583,,,,,,,,3.745
021.097,,0.400,,815,610,,,,,,,,3.810
021.124,,0.400,,815,635,,,,,,,,3.868
021.149,,0.400,,815,659,,,,,,,,3.906
021.178,,0.400,,815,685,,,,,,,,3.889
021.208,,0.400,,815,711,,,,,,,,3.922
021.237,,0.400,,815,740,,,,,,,,3.925
021.263,,0.400,,815,764,,,,,,,,3.935
021.291,,0.400,,815,789,,,,,,,,3.930