You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
YarpSensorBridge crashes if multiple devices that implement controlboard interfaces (i.e. IAxisInfo, IEncoders, IMotorEncoders) are passed to it via setDriversList#911
Open
traversaro opened this issue
Nov 15, 2024
· 0 comments
With @isorrentino we had a device that was passing the list of multiple yarp controlboard devides, and it was crashing. At the first glance I tought that the problem was the loop in attachRemappedRemoteControlBoard was iterating over different device, and was overwriting the controlBoardRemapperInterfaces.encoders pointers. However, by looking better this does not seems the case, as in theory the loop should interrupted by the return true in https://github.com/ami-iit/bipedal-locomotion-framework/blob/master/src/RobotInterface/YarpImplementation/include/BipedalLocomotion/RobotInterface/YarpSensorBridgeImpl.h#L1023 , so perhaps we need to investigate more. Perhaps a different problem could be that if multiple devices are present but not all implements all the required interfaces, then the .encoders and .amp refers to different devices?
While the problem is still not perfectly understood, a possible solution nevertheless could be to replace the custom remapping logic present in the class, and instead rely simply on a controlboardremapper ? The benefit of that is that people could pass multiple controlboard devices to the YarpSensorsBridge, and the controlboardremapper would deal automatically selecting the requested joints.
The text was updated successfully, but these errors were encountered:
Related code:
With @isorrentino we had a device that was passing the list of multiple yarp controlboard devides, and it was crashing. At the first glance I tought that the problem was the loop in
attachRemappedRemoteControlBoard
was iterating over different device, and was overwriting thecontrolBoardRemapperInterfaces.encoders
pointers. However, by looking better this does not seems the case, as in theory the loop should interrupted by thereturn true
in https://github.com/ami-iit/bipedal-locomotion-framework/blob/master/src/RobotInterface/YarpImplementation/include/BipedalLocomotion/RobotInterface/YarpSensorBridgeImpl.h#L1023 , so perhaps we need to investigate more. Perhaps a different problem could be that if multiple devices are present but not all implements all the required interfaces, then the.encoders
and.amp
refers to different devices?While the problem is still not perfectly understood, a possible solution nevertheless could be to replace the custom remapping logic present in the class, and instead rely simply on a
controlboardremapper
? The benefit of that is that people could pass multiple controlboard devices to the YarpSensorsBridge, and thecontrolboardremapper
would deal automatically selecting the requested joints.The text was updated successfully, but these errors were encountered: