Robotic System Toolbox's (Get Transform Error) using Sim-Scape Multibody

3 visualizzazioni (ultimi 30 giorni)
I've made an articulated manipulator on simscapae multibody diagram rather than importing form solidworks.
The problem arises in "get transform" block. The link Lengths are: L1 = 0.5; L2 = 1 & L3 = 1m.
As can be seen in [1], At given end-effector positions [0; 2; 0.5] the computed joint angles from Inverse Kinematic Block are [0;0;0]. But when given joint angles are applied to Get Transform (Forward Kinematics) block the xyz co-ordinates are [0;1;0.5] instead of [0; 2 ;0.5]
As you can see from the attached image [2], The problem is the Get transform block selects the same block as BASE and Body 1. The Link 1 is being selected as Body 2 and Link 2 is being selected as Body 3. Is'nt Body 3 should be Link 3.
As showed in [3], the World frame is attached with the Top Face of Base and Bottom Face of Link1 (at Revolute Joint 1). I have also tried by changing the position of world frame by attaching it to the bottom face of Base and using Rigid Transform Block but problem remains there.
Is there any possible solution to this.
PS: [1], [2], [3] are attachments.

Risposte (1)

Hannes Daepp
Hannes Daepp il 10 Ago 2021
Hi,
It's hard to tell you what's going on without a model that could provide some more detail on the inputs. The following points should give you some avenues within which to look for solutions:
  • How did you construct the rigid body tree? If you constructed it manually, it's possible that the rigid body tree object and simscape multibody model don't align. In that case, I would recommend that you instead try using importrobot so that you can ensure that the two models are definitely equivalent. You can also spot-check equivalence with your current model by checking the outcomes of getTransform for a few different values.
  • What are your weights? In the model above, it's not obvious what the weights are, but it seems like you only care about matching position. If that's the case, the weights input should be something like [0 0 0 1 1 1], i.e. you should place a weight of zero on matching orientation. If you are using the usual default values, ones(1,6), you are likely trying to achieve an infeasible target pose because you'd be weighting orientation equally. See the associated documentation for reference.
  • What are the outputs of the info output? Does the IK block think that it's achieving a feasible position? If so, then your models likely don't match. If not, look at the info output to understand why, and check to make sure the result is actually feasible. See the documentation for more info: https://www.mathworks.com/help/robotics/ref/inversekinematics.html#mw_8f6480d5-ccf4-4161-be1b-4647bb763cd8
Hopefully this is helpful. However, if that still doesn't help, please provide a model and supporting data (e.g. rigid body tree object) as attachments to aid with debugging. If you're not comfortable providing the model in a public forum, please contact technical support.
Best,
Hannes
  1 Commento
M Ali
M Ali il 11 Ago 2021
Modificato: M Ali il 11 Ago 2021
Thank you for your well constructed and detailed response. I really appreciate.
1. I'm constructing rigid body tree using following lines.
Ts = 0.001;
[robo,roboinfo] = importrobot('THREE_Comp_New_for_ik_19b.slx');
config_temp = homeConfiguration(robo);
config_robo = config_temp(1).JointPosition;
2. The weights are [0 0 0 1 1 1]. I'm not using default values, ones(1,6).
3. The value of status bit from Info port of IK Block is 2 (constant).
I've tried the different coordinates, [0;0.75;0.5] as input and after computing Ik and applying joint angles to FK block the coordinates are [0;1;0.5]. This means that the Fk block even upto Link 2 is not working fine.
I've attached the Simscape Multibody model and Inverse Kinematics files for your kind prusal.
Kindly have a look at it.

Accedi per commentare.

Categorie

Scopri di più su Simulation and Analysis in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by