-
Notifications
You must be signed in to change notification settings - Fork 104
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
When a joint goes in HF, errors like positionMoveRaw: skipping command
flood the logger
#768
Comments
positionMoveRaw: skipping command
flood the loggerpositionMoveRaw: skipping command
flood the logger
This is not a bug, but rather more a feature request, I'd say. In my opinion, the high-level SW should be responsible somehow for checking the status of the boards. We do this for example in the Cartesian and Gaze controller. However, due to some other limitations (see robotology/community#558) that may turn out to be severe in certain conditions, I reckon we could come up with a kind of workaround. Regarding the workaround strategy below
I wouldn't rule out yet the choice of keeping triggering the error but at a much lower frequency. We'd need to ponder all the possibilities. Stay tuned. |
To illustrate what I have in mind, I've fast-prototyped the handling logic in Stateflow.
Essentially, the FSM receives as input a boolean that is The handler is composed of two parallel charts:
We have only 2 params:
The output of the handler is twofold:
Here's below a typical outcome where it's shown how the output follows the input only within the initial window that serves to evaluate the occurrence of the errors. After that, the output gets triggered only in single instances. The FSM can be obviously used to generate code. You can play with the model: error_downsampler.zip. |
That's pretty cool! At the moment a different error is thrown by each joint. We had cases in which a MAIS board shut down, and then all the 9 joints of a hand were going in HF. In that case, those lines were producing 10000 errors in about 10 seconds. I guess the mechanism you described considers each joint separately right? |
At the moment the FSM is agnostic wrt other info like the joint number and the initial control mode as it receives only a boolean accounting for the occurrence of the input errors. Along this line, we may then apply this algorithm as a function to each individual type of errors (per joint and per mode). The reduction will be still very significative although we may require too much memory just for that. Alternatively, we may let the printouts show up initially with their info (i.e., joint number and control modes) to then only print a cumulative agnostic error message. In this case, we do need only one instance of the handler, I guess. |
🟢 Just pushed the model to
|
Had looked a bit deeper at the code and found out that we'd need to have a timer running at a reasonable rate (usual 10 ms) while collecting possible asynchronous input events. Before, the assumption was that we could run at the fastest rate, which can no longer hold. Therefore, I've refactored the model as per https://github.com/icub-tech-iit/matlab-tools/tree/master/event-downsampler, where now we have essentially a counter as input in place of a boolean. |
@mfussi66 and @davidetome are working on this in https://github.com/mfussi66/icub-main/tree/devel. |
Done in #770. |
Bug description
When writing simple applications to control the robot, we are used to sending commands to joints without checking the current control mode. See for example https://github.com/robotology/icub-tutorials/blob/23ac25487d5a872030b82b38a28eb44b2cb3bda3/src/motorControlBasic/tutorial_arm.cpp#L129
This is because we usually set the desired control mode only once, during the initialization phase, and during the control loop we simply get some measurement, and we set the references to the joints.
It may happen though, that some joint goes in HF after the startup. This happens quite easily with the hands. After that, the logger gets quickly filled up with messages like:
Since the top level application usually does not check for the control mode at each control loop, it keeps sending references to the joint, producing errors like the above. Since the control loop is usually at 100Hz, this will saturate the logger quite easily, losing the possibility to check other errors.
cc @pattacini @marcoaccame
Steps to reproduce
It should be enough to run the tutorial https://github.com/robotology/icub-tutorials/tree/23ac25487d5a872030b82b38a28eb44b2cb3bda3/src/motorControlBasic on the robot and change the control mode of the controlled joints to something different from
Position
andIdle
.Expected behavior
The errors of
icub-main/src/libraries/icubmod/embObjMotionControl/embObjMotionControl.cpp
Line 2224 in 601af52
icub-main/src/libraries/icubmod/embObjMotionControl/embObjMotionControl.cpp
Line 1897 in 601af52
icub-main/src/libraries/icubmod/embObjMotionControl/embObjMotionControl.cpp
Line 4106 in 601af52
should be limited in time, eventually sending the error only once, and sending it again when the control mode changes.
Example repository
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: