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

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

Comments

@traversaro
Copy link
Collaborator

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 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.

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

No branches or pull requests

1 participant