-
Notifications
You must be signed in to change notification settings - Fork 103
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
Update filtering of spikes in temp reading #961
Update filtering of spikes in temp reading #961
Conversation
Spikes in temperature readings are now filtered when checking for overcoming warning/hw temperature limits spikes are not considered Median filter is added for initialization of temperature so that we are not risking to save invalid or null temperatures Overcoming of warning and hw limits is still correctly checked if not a spike Counter on the watchdog thresholds is now divided by the eth transmission rate We set a limit for the watchdog when temperature is higher than the warn/hw limit for 60 seconds continuously
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.
Good work!
Hi there, just as a curiosity. Is there a way to get these warnings from code? |
I'm not sure if I'm replying to what u need. Anyway, warnings are just related to reading a temperature higher than the warning threshold when that increment it is not a spike (where in this case a spike is defined when the delta between current and previous temperature is higher than 20 Celsius degree). Moreover, the first time temperature goes over the warning threshold a warning message is sent. Then, in order to not flooding the YRI, we send the next warning message if the temperature stays continuously above the threshold for at least 60 seconds. Timing definitions have been set here for now: icub-main/src/libraries/icubmod/embObjMotionControl/embObjMotionControl.h Lines 111 to 182 in 5410ab0
Instead, when you read negative readings, you check meaning of Celsius and Raw value in the error message from this table https://icub-tech-iit.github.io/documentation/temperature_sensors/software/dataflow/#error-handling |
I meant that if after 60s the joint goes in HF, I would love to have some warning before, that can be caught not just by reading at the YRI output (which is virtually impossible during experiments), but maybe via some API calls so that we can inform the user/controller accordingly. |
The HF is entirely managed by the 2FOC. This part in icub-main has been done to filter all the spikes that can happen due to noisy readings. Those parameters can be eventually adjusted depending on the need. |
Just to clarify, I was referring more to a "high-level" controller, like the one controlling the walking.
I don't know about this since the
Maybe a dedicated interface with a defined list of warning codes? I am pretty open to discussion here. Here some possible things I am imagining:
|
Oks, that's clear. Those points seem good. I'll discuss with the team about an implementation such that. |
Hi @S-Dafarra, If I understand correctly, you are asking to signal in some way the warning state also on the The work done in this PR had the purpose of avoiding |
I was referring to the case in which there are measurement errors for more than 60s. I was just wondering in which case, the user code can be informed about the potentially imminent fault. |
The fault on error readings happens after 10 seconds. We had planned to fix the error reading issue by hardware. I'll update you ASAP. Stay tuned |
Completing the work done in #959, the spikes in the temperature readings are
now filtered by software.
This means that if the delta between current and previous temperature is higher than a threshold (which is currently defined in sw and by default is 20 Celsius degree) that new temperature read is considered as a spike and therefore, even if its value is higher than the
warning temperature threshold
or theerror temperature threshold
, it is discarded and not considered and the previous temperature is not updated.Moreover, we have added to the
Watchdog
class a method for setting the threshold, regarding the maximum number of erroneous values read before sending error or warning, depending on the transmission rate of the ethernet packets.Therefore, depending on the transmission rate defined in the configuration of the robot, we are setting the watchdogs for overcoming the warning threshold on the temperature reading and for overcoming the limit on the negative temperature values (which means that we got an error in the reading) so that it is always constant and independent to the transmission rate of the ethernet packets.
By default, it is set so that we rise the warning or error when we are getting erroneous temperature values (which are not spikes) for at least 60 seconds.