Skip to content
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

Resend the previous data to the NUC if no new data was received from the servos. #23

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Claegtun
Copy link
Contributor

Brief

Does not update the filtered data (e.g. present position) in the nanopb message if the filter-count is zero, i.e. if no new data was received from the servos.

This is a compromise before a proper filter is implemented.

Context

Some of the data received from the servos is averaged between transmissions to the NUC. This is a crude way of downsampling from a variable asynchronous polling rate to a consistent 100 Hz.

Originally, when no new data was received from the servos, the fields in the nanopb message would be set to zero. This would happen rarely for some servos when servo-targets were being sent to NUSense, e.g. during KeyboardWalk, and the Dynamixel bus had a lot of activity. How ever rare it was, it would nonetheless yield a spike in the data, as seen below.

image

If the nanopb fields are not assigned, then, they are kept to their previous filtered values instead of zero. As seen below, there are no spikes towards zero.

image

@Claegtun Claegtun self-assigned this Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant