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

POS service #696

Merged
merged 2 commits into from
Dec 3, 2020
Merged

POS service #696

merged 2 commits into from
Dec 3, 2020

Conversation

marcoaccame
Copy link
Contributor

@marcoaccame marcoaccame commented Dec 2, 2020

This PR introduces the POS service.

Description of the service

The POS service is used to stream position values from an ETH board towards the relevant device started by yarprobotinterface, the embObjPOS. The values are retrieved from up to 14 encoders, so far only magnetic encoders from the pmc board. The POS service is required to get position values of the fingers of the new hand.

Changes

This PR is to be processed together with two other PRs: one for icub-firmware and one for icub-firmware-shared.

In here are the main changes in each of these repositories. I describe them all together because one repo affects the other.

  • icub-firmware: added the EOthePOS object in ems, mc4plus, mc2plus; enabled in EOtheServices; added handlers for the required ETH and CAN messages. At the moment the EOthePOS is disabled in the projects of the three ETH boards with macro EOTHESERVICES_disable_thePOS being defined at project level (-DEOTHESERVICES_disable_thePOS in section Misc Controls of C/C++ options).

  • icub-firmware-shared: added the new entity eoprot_entity_as_pos in endpoint eoprot_endpoint_analogsensors with all required stuff; added runtime configuration of the POS service inside the management entity with a new eOmn_serv_config_data_as_pos_t; advanced protocol versions of entities analogsensors and management.

  • icub-main: added the embObjPOS device inside icubmod + all required stuff required to run the service (parser of xml files, handling of relevant ETH protocol messages); changed some of the obsolete NetworkBase::getEnvironment() calls with teh suggested yarp::conf::environment::getEnvironment().

Tests

All the chain was tested on a setup made of:

  • linux pc with most recent yarp (master branch) plus the repos under PR plus a suitable set of xml files.
  • ems board with macro EOTHESERVICES_disable_thePOS disabled,
  • pmc board with a fake acquisition of magnetic encoders.

The service runs with success and streams the values of the target YARP port. The following shows the plot from yarpscope reading on that port.

Screenshot from 2020-12-02 13-46-48

Figure. Outcome of the POS service on yarpscope.

And in here is a video of one experiment. The talk is lost, hence in here i summarize the steps:

  • launch yarp server w/ yarp server.
  • launch yarprobotinterface w/ yarprobotinterface --config handV3.xml
  • read the relevant yarp port w/ yarp read ... /hv3/left_hand/POS:o
  • launch the yarpscope w/ yarpscope --xml yarpscope.pos.xml
  • resizing the window which shows the time variation from sensors J4 to U27.

Figure. Video of one test of the POS service.

Impact on iCub

The above test worked fine as expected. And the changes done to support the new device are pretty standard and safe and used only if one uses the POS service by starting the embObjPOS device from yarprobotinterface.

Hence, ... I expect no harm on iCub.

still WIP
so far only the magnetic encoders of pmc board are supported.
they send degrees values with 0.01 resolution
@pattacini
Copy link
Member

The failing CI is due to robotology/icub-firmware-shared#42, which is not integrated yet.

Copy link
Member

@pattacini pattacini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @marcoaccame 👍🏻
I would first merge robotology/icub-firmware-shared#42 as CI will keep on failing otherwise in the normal icub-main workflow.

@pattacini
Copy link
Member

robotology/icub-firmware-shared#42 has been merged ✔
I'm gonna give the CI another try.

@pattacini pattacini merged commit a2df537 into robotology:devel Dec 3, 2020
@marcoaccame
Copy link
Contributor Author

wow, that was quick. i was checking every two or three minutes 😃

@Nicogene
Copy link
Member

Nicogene commented Dec 3, 2020

The failing CI is due to robotology/icub-firmware-shared#42, which is not integrated yet.

From my understanding this PR introduced a dependency to a specific version of icub-firmware-shared.

I opened robotology/icub-firmware-shared#43 and #700 in this sense.

Feel free to reject them if I misunderstood

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.

3 participants