-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/timestamps on sd cards #100
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
658b281
Wrote the code for timestamps. Now we recieve a packet, get the time …
23b5404
Only take unix timestamp onces instead of syncing every time
JWillegers a056f9c
correctly saving and increamenting of timestamp
255d8d8
Update reference of submodules
JWillegers 3cc7792
Merge branch 'development' into feature/timestamps-on-sd-cards
JWillegers f6b4115
Cleaning up code before merge: changing & to &&
JWillegers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Submodule roboteam_embedded_messages
updated
53 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this not be
&&
? I guess technically it worksThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also. why is not always the timestamp used from the latest RobotCommand? Would that not be more accurate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A request from the control subteam.
For analyzing the acceleration of the robot the difference between 2 timestamps of 2 consecutive packets should align with the real world. So if in real time 10ms has passed, that should be reflected in the timestamp. But if you always take the most recent timestamp from robotCommand you will see from time to time that 20ms has passed. This is due to the fact that the incoming timestamp is rounded to the nearest 10. Even if you would not round it will be a problem, as the incoming packets come at 60Hz, whilst the robotFeedback runs at 100Hz. Meaning that there will still be some misalignment between time stored in the packet and real time passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand what you are saying. However, a timestamp should not be needed between consecutive packets stored on the SDCard because we know they are 10ms apart. However, if the clock between a robot and the computer are running at different speeds, then at some point, data on the SDCard and data from the vision system can become misaligned, which might make it useless.
If the latest timestamp is used, SDCard data will always be able to be overlayed with other data such as vision, while also being able to accurately measure acceleration because we know packets are 10ms apart.