-
Notifications
You must be signed in to change notification settings - Fork 31
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
AMO diagnostics #187
Merged
marcoaccame
merged 10 commits into
robotology:devel
from
marcoaccame:feat/amo-diagnostics
Jun 8, 2021
Merged
AMO diagnostics #187
marcoaccame
merged 10 commits into
robotology:devel
from
marcoaccame:feat/amo-diagnostics
Jun 8, 2021
Conversation
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
…h also gets diagnostics from the used chip
This was referenced Jun 8, 2021
cc @S-Dafarra |
marcoaccame
added a commit
to robotology/icub-firmware-build
that referenced
this pull request
Jun 8, 2021
* ems v3.40, mc4plus v3.33, mc2plus v3.24 - ems (v3.40, release date 2021.06.07), - mc4plus (v3.33, release date 2021.06.07) - mc2plus (v3.24, release date 2021.06.07) - built on 2021 jun 08 - main changes from previous release are: - enable runtime configuration of AMO diagnostics as in robotology/icub-firmware#187 * updated firmware.info.xml
This was referenced Jun 10, 2021
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR adds runtime configuration of additional diagnostics useful for debugging services on the robot.
Runtime configuration means that yarprobotinterface collects some parameters from xml files and sends them to the ETH boards so that this one can use them to activate / tune some actions.
So far, only the AMO diagnostics in MC service is supported.
In the following is how the AMO diagnostics can be configured and what it does.
How to activate / deactivate the AMO diagnostics
The AMO diagnostics is disabled by default.
If one wants to activate that, he/she must add the group named
DIAGNOSTICS
in the xml file which describes the MC service on a ETH board, as in the following.Code list. The
DIAGNOSTICS
group has two parameters:mode
equal toeomn_serv_diagn_mode_MC_AMO
activates the AMO diagnostics with a maximum reporting rate in ms expressed by par16. In this case 100 ms. The minimum value is 2, meaning that the board can potentially emit diagnostics every 2 ms.The service can be disable also by using a special mode called
eomn_serv_diagn_mode_NONE
as in the following.Code list. The diagnostics is disabled if the group DIAGNOSTICS is not present or if it has
mode
equal toeomn_serv_diagn_mode_NONE
.
What the AMO diagnostics produces
When the AMO diagnostics is enabled with a maximum rate, let's say equal 100 ms, the board evaluates every 2 ms the content of the two status registers of the attached AMO encoders and it produces a stream of diagnostic messages which go to the
yarplogger
. See the following listing.Log excerpt. There are two boards, the
left_leg-eb6-j0_1
and theleft_leg-eb7-j2_3
which signals errors at their maximum rate of 100 ms. The pair of diagnostic messages emitted by the board have code 0x04000005 and 0x040000056 and are recognized by-> DEBUG: tag05 + .
and-> DEBUG: tag06 + .
The information inside the log messages
If the board has an AMO encoder and the reading of its two status registers shows any error flags, then it emits a pair of diagnostics messages which contains the values of:
hal_spiencoder_get_value2()
,hal_spiencoder_get_value2()
,eOmc_joint_status_t::core.measures.meas_position
),eOmc_motor_status_t::basic.mot_pwm
),eOmc_motor_status_t::basic.mot_current
)The pair of diagnostics messages are emitted with a maximum rate (configurable by xml file) to avoid to flood the log with continuous messages.
The above values are enclosed inside the fields of the diagnostic messages as later described. First I show an example of such messages with a maximum rate of 100 ms.
Log excerpt. There are two boards, the
left_leg-eb6-j0_1
and theleft_leg-eb7-j2_3
which signals errors at their maximum rate of 100 ms. The pair of diagnostic messages emitted by the board have code 0x04000005 and 0x040000056 and are recognized by-> DEBUG: tag05 + .
and-> DEBUG: tag06 + .
How the information is stored inside the two messages
An example of message pairs is in the following
Table. Mapping of the values inside the two diagnostics messages
Note 1
. The ETH boards signals errors at most every 2 ms because it reads register status0 and status1 at each millisecond. So, if between two pair of messages which are 100 ms far apart we see that the number of errors have been 50, it means that every time we checked we found an error, hence 100 % of the times.Requirements of this PR
It needs also similar PRs:
icub-firmware-shared
which contains the data structures used for diagnostic s configuration,icub-main
which contains code to extract configuration from the xml files.icub-firmware-build
to give the new binaries for theems
,mc4plus
,mc2plus
.So far we omit any PR in
robots-configuration
.Executed tests
Tests were done extensively and with success on a dedicated setup and on
iCubGenova09
.