Open gabrielebndn opened 5 years ago
@gabrielebndn This is certainly due to the numerical resolution of an inverse kinematics problem I guess.
@jcarpent I doubt it. That's what I thought at first, but now I am not convinced. Look at the matrix:
1 0 0
0 0.999999 0.001708
0 -0.001708 0.999999
and the joint angle is 0.001708... We can really see sin(x) =~ x there... 1e-3 is not so small as an error, and the kinematic chain from the base to the foot is only 6 joints! And when the angle is zero, they are perfectly flat! It seems this angle was introduced kind of on purpose, and I really think there is a problem with the posture itself. Also it is weird that both feet have the roll in the same direction, if the robot posture is supposed to be symmetrical with respect to the sagittal plane I would expect the two angles to be opposite to each other...
The half-sitting position, defined in https://github.com/stack-of-tasks/sot-talos/blob/master/src/dynamic_graph/sot/pyrene/robot.py, is currently given as
With this configuration, the feet are not flat on the ground, but slightly tilted around the x-axis. These are the results I get (I add the CoM for reference):
This does not seem a good idea.
The last joint of each leg corresponds to the roll angle of the respective ankle. It is enough to set these two joints to zero instead of their current value of -0.001708, and the problem is solved. In other words, by correcting the half-sitting configuration to
the results are
The error is tiny and invisible to the naked eye (about one hundredth of a degree) but it was screwing up the expected results in some unit tests I was making, where I required really strict correspondence between the algorithmic results and the analytically-computed ones (specifically, the transformation of the vertical force to the local ankle frame was causing a tiny force along the y-axis to appear, a bit less than 1 N, which is irrelevant from the control viewpoint but was still much more than I expected).
I do not know how these values were chosen, but I really think the feet in the default position should be flat on the ground. That is what one would expect.
Should we change the half-sitting configuration to reflect this need?