Open williamledda opened 4 years ago
I think that the problem is in the payload
inside the Dynamics
class:
def payload(self, m, p=np.zeros(3)):
# ...
lastlink.m = m
lastlink.r = p
So when setting the payload, this will actually replace the mass of the last link in the DH model. Instead of replacing it, the mass should be added to. This would actually fix the issue. Not completely about what to do with the the center of mass. It should be added as well? Alternatively the payload should be considered as 'additional' link with its own mass and center of mass.
This is on the list of things to fix, it was a quick hack in the MATLAB version and not really proper.
It seems there is a bug computing the inverse dynamics with rne method.
Take a look at the following script that compute the inverse dynamics for a Puma560 (but this is the same for each model)
If I run the script without setting any payload, the result that I have is the following
If now I now remove the comment to set the payload
I expect to have the same numbers (payload and center of mass are set to zero) but I have the following result instead.
I've reported a similar issue for the MATLAB toolbox, I think that the behaves the same.