Closed rsantos88 closed 4 years ago
I think the Python bindings are faulty. You can verify this on your yarp/build/lib/python/yarp.py, mine poses the following differences between both methods:
def setRefSpeeds(self, *args):
"""
setRefSpeeds(IPositionControl self, double const * spds) -> bool
setRefSpeeds(IPositionControl self, int const n_joint, int const * joints, double const * spds) -> bool
setRefSpeeds(IPositionControl self, DVector data) -> bool
"""
return _yarp.IPositionControl_setRefSpeeds(self, *args)
def setRefAccelerations(self, *args):
"""
setRefAccelerations(IPositionControl self, double const * accs) -> bool
setRefAccelerations(IPositionControl self, int const n_joint, int const * joints, double const * accs) -> bool
"""
return _yarp.IPositionControl_setRefAccelerations(self, *args)
Could you just use individual setRefAcceleration(joint, value)
calls until this is fixed?
@PeterBowman Good catch!
I'd leave this issue open then until we solve it upstream, which should take a while.
@rsantos88 I'm confident you can implement the individual calls, right? :tada:
@rsantos88 I'm confident you can implement the individual calls, right? :tada:
Yes, of course. Thanks!
This is actually https://github.com/robotology/yarp/issues/1966. I'll submit a patch soon.
The fix has been merged into master and is expected for the YARP 3.4 release later this month.
I am trying to modify joint speeds and accelerations through python. I've successfully modified the speed with these lines:
I've checked that the joint speed has changed correctly (with
get vels
)... but when I try to modify the acceleration with these lines:I get the following error message:
Any suggestion? am I calling the function wrong?