![]() |
Encoder data recording
Hello! I was watching a video on the TrossenRobotics YT channel about position feedback and data storage and it occurred to me that this would be an amazing thing to be able to do with our robot using encoders. Does anyone happen to know how you could capture data from the encoders and play back the movements of the robot in reverse? I'm not even sure where to begin with the logic. We (hopefully) have a pretty foolproof autonomous that mostly uses dead-reckoning, so this would is probably for a summer project / non-competition robot. I'm thinking we would record our data in three arrays; one for the elapsed time, one for the left encoder, and one for the right encoder. I have no idea how exactly we would do that. Another issue might be storing that data for long term (I'm not very familiar with polymorphic coding, so I don't think we would store the data within the code...). If anyone has any thoughts on this subject, feel free to share!
|
Re: Encoder data recording
Another way to go about it is just record the joystick movements, and replay those back. We did this in 2003, the first year that they had autonomous mode. It worked quite well for that year's game.... but probably wouldn't be as useful for this year's game.
You wouldn't store the data in the code, but you could write it out to a file, and then read it back in again. Search the forums, there's probably a post somewhere that tells you how to read/write files. :) |
Re: Encoder data recording
I've been looking, but I'm not sure how what I've found helps me. I would like to use a text file to make something like a lookup table. Here's what I have for logic so far:
Code:
|
| All times are GMT -5. The time now is 12:56. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi