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

AMO data to YARP ports #188

Merged
merged 3 commits into from
Jun 10, 2021
Merged

AMO data to YARP ports #188

merged 3 commits into from
Jun 10, 2021

Conversation

marcoaccame
Copy link
Contributor

@marcoaccame marcoaccame commented Jun 10, 2021

Description

This PR belongs to a set of PRs which enable to stream AMO data towards YARP ports for debugging purposes.

It extends the content of a previous PR called AMO diagnostics by allowing an alternative diagnostics path which sends the content of AMO registers and values to YARP ports.

This mode can be configured in runtime by acting on the xml files of the MC service.

In the following is shown how the AMO dat to YARP ports can be configured and what it does.

How to activate / deactivate the AMO diagnostics

The AMO to YARP ports 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.

<group name="SERVICE">

    <param name="type"> eomn_serv_MC_foc </param> 
   
    <group name="PROPERTIES">
    
       <group name="DIAGNOSTICS">
           <param name="mode">     eomn_serv_diagn_mode_MC_AMOyarp     </param>
           <param name="par16">    1000                                </param>
       </group> 
       
        ...

Code list. The DIAGNOSTICS group has two parameters: mode equal to eomn_serv_diagn_mode_MC_AMOyarp activates the AMO streaming. The parameters par16 expressed the time in ms of delay of application of motor configuration to the 2foc board. In this case 1 second.

The service can be disable also by using a special mode called eomn_serv_diagn_mode_NONE as in the following.

<group name="SERVICE">

    <param name="type"> eomn_serv_MC_foc </param> 
   
    <group name="PROPERTIES">
    
       <group name="DIAGNOSTICS">
           <param name="mode">     eomn_serv_diagn_mode_NONE           </param>
           <param name="par16">    1000                                </param>
       </group> 
       
        ...

Code list. The diagnostics is disabled if the group DIAGNOSTICS is not present or if it has mode equal to eomn_serv_diagn_mode_NONE .

What the AMO streaming produces

When the AMO streaming is enabled, the board sends to YARP ports which contains the name of the board and of the relevant joint number as show in the following. The name of the ETH board is the same in ETH_BOARD.ETH_BOARD_SETTINGS.Name as specified in the relevant xml file.

$ yarp read ... /amo/left_leg-eb6-j0_1/j0
[yt, amo, reg, pos] 111111.000000 333333 2048 444444
[yt, amo, reg, pos] 111111.005000 333333 2048 444444
...

Log excerpt. The YARP port opened for the first joint (j0) of board left_leg-eb6-j0_1 signals what is described inside brackets: YARP time, AMO raw value, content of registers of the AMO, eOmc_joint_status_t::core.measures.meas_position.

Use of the delay in activation of the motors

If the AMO streaming is enabled with a given delay of motors, let's say par16 = 1000 which corresponds to 1 second, the effect is the following:

The ETH boards starts to stream the values to icub-head which publish them on the relevant port (which must be already opened) and after 1 second it applies the configuration to the motors.

During this time of 1 second the MC device is temporarily stopped, so that the calibrator is not activated until the motor on the ETH board is initted.

The time of delay of motor activation can be up to 65 seconds.

In such a way, we can read values without the effect of the activation of the motor (which may emit EM noise).

Requirements of this PR

Requirements of this PR

To enable the features of this PR we also need similar PRs. They are:

So far we omit any PR in robots-configuration.

Executed tests

Tests were extensively done on a dedicated setup but not yet on iCubGenova09.

@marcoaccame marcoaccame marked this pull request as draft June 10, 2021 14:58
@marcoaccame marcoaccame marked this pull request as ready for review June 10, 2021 16:19
@marcoaccame marcoaccame merged commit 1d42866 into robotology:devel Jun 10, 2021
marcoaccame added a commit to robotology/icub-firmware-build that referenced this pull request Jun 10, 2021
- built on 2021 jun 10
- main changes from previous release are:
  - enable runtime configuration of AMO data streaming to YARP ports as in robotology/icub-firmware#188
@marcoaccame marcoaccame deleted the feat/amo-yarp branch June 10, 2021 17:14
marcoaccame added a commit to robotology/icub-firmware-build that referenced this pull request Jun 16, 2021
* mc4plus v3.35

- built on 2021 jun 14
- main changes from previous release are:
  - it fixes version 3.34 (it enables runtime configuration of AMO data streaming to YARP ports as in robotology/icub-firmware#188) which was linked to
    a wrong hal2 library. So the reading of SPI encoders now works correctly.

* advanced version of mc4plus to 3.35
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