MATLAB iCub models - Problems with kinematics #667
-
Hi everyone, I am making some data analysis on position and force on iCub arms with MatLab. I saved the force data from To understand if my algorithm is working fine, I made additional test reading also the joints state and the force from the cartesianEndEffectorWrench:o, and I compared the read position from In the following the snap of the code used: iCub = importrobot("..\icub-models\iCub\robots\iCubNancy01\model.urdf");
evaluatedPosition = zeros(height(positionDataSet),3);
for i = 1:height(positionDataSet)
% Generate the actual configuration from joints
pose = homeConfiguration(iCub);
newPose(16).JointPosition = armJoints(1); % Shoulder Pitch joint
newPose(17).JointPosition = armJoints(2); % Shoulder Roll joint
newPose(18).JointPosition = armJoints(3); % Shoulder Yaw joint
newPose(19).JointPosition = armJoints(4); % Elbow joint
newPose(20).JointPosition = armJoints(5); % Wrist Prosup joint
newPose(21).JointPosition = armJoints(6); % Wrist Pitch joint
newPose(22).JointPosition = armJoints(7); % Wrist Roll joint
% Evaluate the transformation matrix from the hand frame to the root frame
T = getTransform(iCub,pose,'l_hand_dh_frame','root_link');
% Evaluate the position in the root frame
tmpPos = T*[0,0,0,1]';
evaluatedPosition(i,:) = tmpPos(1:3);
end Where positionDataSet is the x-y-z position read from iCub and armJoints is an array containing the 7 joints in radiants involved in the movement, whilst all the other joints of iCub are all sets to home position. The problemFinally I leave you with my issue, comparing the results with the dumped signal, I got an error both in module and in phase, and also I got it mean shifted, as you can see in the following plot. I am wondering if the model could influence these results, I am working with iCubGenova07, which is not available in the model folder (where I can find it? Is there any equivalent?), or am I making something wrong which I cannot figure it out? Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
You can explore what this means in terms of arm kinematics by perusing the DH tables in our documentation. Not only this, but one needs to also consider that the URDF may show slight differences with the DH tables, even when the models are aligned. This is due to the fact that DH tables (used by the Cartesian Controller) were manually extracted from the CAD, whereas the URDF models are generally exported automatically. In the past, we commenced an activity to realign the DH tables with the CAD, although this task is now "on hold". That said, we're talking here about discrepancies smaller than those you reported in your graphs above, which are mainly caused by the different HW versions. |
Beta Was this translation helpful? Give feedback.
-
Hi! After a call with @pattacini in order to analyze deeply the problem, we manage to figure it out. The remaining issue to solve is to use the proper .urdf model, which MatLab does not accept, and the reason will try to be evaluated in another issue here. So up to know I thank again @pattacini and close this discussion as solved! |
Beta Was this translation helpful? Give feedback.
Hi!
After a call with @pattacini in order to analyze deeply the problem, we manage to figure it out.
To briefly summarize it, I was mainly making a wrong comparison between the signal of the force made up from the inverse kinematics from the raw sensor signal with the signal from
/wholeBodyDynamics/involved_arm/cartesianEndEffectorWrench:o
which removes the force shift created by the arm weight.Also the raw signal which I am analyzing has been collected from a not properly working F/T sensor and without the initial calibration command calib all of the WBD to help evaluate the weight drift, so the overall error could not be totally removed.
The remaining issue to solve is to use the prope…