0
$\begingroup$

I am trying to get the forward kinematics for a robot model in matlab (rigid body tree). I created a 4 x4 transformation matrix from the base to the end-effector using the gettransform() function. I have 4 different joint angles to control. But how do I multiply the joint angles with the transformation matrix so that I get the correct orientation and position output of the end-effector?

Is there otherwise a better option to get the forward kinematics?

Thanks!

$\endgroup$
4
  • $\begingroup$ By the time you obtain forward kinematic matrix, you should have each joint variable inside it (not multiply it) Maybe you need post your forward kinematic matrix here.. $\endgroup$
    – Albert H M
    Jun 16, 2021 at 0:51
  • $\begingroup$ @AlbertHM Does that mean I have to calculate the matrix again every time I change the joint values? $\endgroup$
    – Veronique
    Jun 17, 2021 at 10:15
  • $\begingroup$ Absolutely. Because forward kinematic is a function that map joint configuration into end effector position. And each joint movement will result in different position and orientation of end effector. $\endgroup$
    – Albert H M
    Jun 17, 2021 at 10:59
  • $\begingroup$ Or you wanna make matlab function using that matrix, then there is a way. Make theta1 theta2 etc as symbolic (look matlab syms), then input it in getTransform $\endgroup$
    – Albert H M
    Jun 17, 2021 at 11:00

2 Answers 2

0
$\begingroup$

After looking the documentation, in function gettransform you put your joint angle configuration there in radians.

  1. Create the struct containing your join value

    s = struct(nameofjoint1, valueofjoint1,..., nameofjointN, valueofjointN)

  2. Get the position and orientation of your end-effector

    % Syntax

    % transform = getTransform(robot,jointconfiguration,startframe,lastframe)

    transform = getTransform(robot,s,'L1','L4')
$\endgroup$
0
$\begingroup$

transform = getTransform(robot,s,'L1','L4')

$\endgroup$
1
  • $\begingroup$ Welcome to Robotics Mostafa Mahmoud. Thanks for your answer but we are looking for comprehensive answers that provide some explanation and context. Very short answers cannot do this, so please edit your answer to explain why it is right, ideally with citations. Answers that don't include explanations may be removed. See How to Answer for more info. $\endgroup$
    – Ben
    Mar 16 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.