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-main.
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.
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:
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.
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 byyarprobotinterface
, theembObjPOS
. The values are retrieved from up to 14 encoders, so far only magnetic encoders from thepmc
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 foricub-main
.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 theEOthePOS
object in ems, mc4plus, mc2plus; enabled inEOtheServices
; added handlers for the required ETH and CAN messages. At the moment theEOthePOS
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 entityeoprot_entity_as_pos
in endpointeoprot_endpoint_analogsensors
with all required stuff; added runtime configuration of the POS service inside the management entity with a neweOmn_serv_config_data_as_pos_t
; advanced protocol versions of entities analogsensors and management.icub-main
: added theembObjPOS
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 obsoleteNetworkBase::getEnvironment()
calls with teh suggestedyarp::conf::environment::getEnvironment()
.Tests
All the chain was tested on a setup made of:
yarp
(master branch) plus the repos under PR plus a suitable set of xml files.ems
board with macroEOTHESERVICES_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.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:
yarp server
.yarprobotinterface --config handV3.xml
yarp read ... /hv3/left_hand/POS:o
yarpscope --xml yarpscope.pos.xml
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.