Aside, in addition to all the pointers, there was one feature I did not implement in the YarpSensorBridge while porting from the legacy RobotSensorBridge which basically runs a dry reading of sensors at the end of setDriversList phase once all the drivers are attached. This dry read polls for sensor measurements upto a timeout period (similar to the recent fix in IRobotControl) helping to identify early failures at the initialisation phase itself, in case there are no measurements available at the lower level.
Should we consider to reimplement it here as well?
The implementation of this in the previous RobotSensorBridge implementation was done with a sensorReadDryRun() method, which also used a similar timeout based check to be called at the end of attaching to every other polydriver device and run a read with a timeout to check if the buffers are not empty. This was actually originally ported from the wholeBodyDynamics device.
Copying from https://github.com/dic-iit/bipedal-locomotion-framework/issues/121#issuecomment-698519020,
The implementation of this in the previous
RobotSensorBridge
implementation was done with asensorReadDryRun()
method, which also used a similar timeout based check to be called at the end of attaching to every other polydriver device and run a read with a timeout to check if the buffers are not empty. This was actually originally ported from thewholeBodyDynamics
device.The relevant change in IRobotControl was introduced in https://github.com/dic-iit/bipedal-locomotion-framework/pull/118 with the commit https://github.com/dic-iit/bipedal-locomotion-framework/commit/8fc2bef8a813d078c64852ec13ca00d3a6e099c3.