Closed rsantos88 closed 5 years ago
We are traversing all nodes wrapped by CanBusControlboard, that is: all 6 iPOS drivers per arm + their 6 corresponding CuiAbsolute nodes + 1 LacqueyFetch + 1 iPOS in the robot head, even if the latter gets wrapped by a different controlboardwrapper2 and routed to a different YARP port. This is wrong, but does not explain the results observed and described above. Also, this is dangerous given that we are potentially meddling with bytes in memory beyond the expected size of user-allocated arrays passed on as inputs as in here.
Similarly, if we take a look at the implementation of ControlBoardWrapper::checkMotionDone(bool flags*)
(ref), we learn that it expects the input pointer to be interpreted as an array of booleans, size equals number of controlled joints. However, the documentation states (ref):
flag
is a pointer to return value ("and" of all joints)
This is how we implement it in our CanBusControlboard, not accounting for the shortcomings explained earlier.
Reported upstream at https://github.com/robotology/yarp/issues/2027.
Reported upstream at robotology/yarp#2027.
Merged into current master branch, scheduled for YARP 3.1.2 release.
Similarly, if we take a look at the implementation of
ControlBoardWrapper::checkMotionDone(bool flags*)
(ref), we learn that it expects the input pointer to be interpreted as an array of booleans, size equals number of controlled joints. However, the documentation states (ref):
flag
is a pointer to return value ("and" of all joints)This is how we implement it in our CanBusControlboard, not accounting for the shortcomings explained earlier.
As explained by YARP folks at https://github.com/robotology/yarp/issues/2027, the expected behavior matches our implementation, that is, interpret the bool * flags
as an output parameter referring to a single and-joined boolean value that encompasses readiness status for all joints.
We are traversing all nodes wrapped by CanBusControlboard, that is: all 6 iPOS drivers per arm + their 6 corresponding CuiAbsolute nodes + 1 LacqueyFetch + 1 iPOS in the robot head, even if the latter gets wrapped by a different controlboardwrapper2 and routed to a different YARP port. This is wrong, but does not explain the results observed and described above. Also, this is dangerous given that we are potentially meddling with bytes in memory beyond the expected size of user-allocated arrays passed on as inputs as in here.
Given said outcome of the upstream issue, all we need to do now is to focus on https://github.com/roboticslab-uc3m/yarp-devices/issues/211.
There is an evident contradiction between the commands
get don
andget dons
, giving different results:The same results with other lims:
Note: sometimes the first result are also shown with garbage: