petercorke / robotics-toolbox-matlab

Robotics Toolbox for MATLAB
GNU Lesser General Public License v2.1
1.26k stars 440 forks source link

Why does ETS2 produce a conj(a1) variable when computing symbolic forward kinematics #133

Open rojas70 opened 7 months ago

rojas70 commented 7 months ago

I have installed rtb10.4 and rvctools within Matlab 2023b.

Consider the simple 1 DoF robot prsented in Ch7 of the books.

  1. Import ETS2.*
  2. Create the symoblic variables q1 a1
  3. Create the chain via Rz(), Tx()
  4. Then compute fkine()
import ETS2.*
syms a1 q1
E = Rz(q1)*Tx(a1)
E.fkine(0)

The result is:

[cos(q1), -sin(q1), conj(a1)*cos(q1)]
[sin(q1),  cos(q1), conj(a1)*sin(q1)]
[      0,        0,                1]

Why is there an conj(a1) in the translation components instead of an a1cos(q1) for example?