필터 지우기
필터 지우기

Forward Kinematics and Reverse Kinematics

조회 수: 1 (최근 30일)
Ken
Ken 2016년 9월 25일
댓글: Walter Roberson 2016년 9월 25일
In Robotics F.K. we have A*Si = B*phi where A, B are known matrices, Si is a vector with x, y and z as its elements, phi is the vector containing the angular velocity of each of the 2 wheels of the robot. MATLAB says that an eqn of the form Ax=B can be solved by A\B. I am not sure if this applies in my case i.e. A*Si = B*phi. This I know has been solved and I was told that A\B is the way to do it but does not work for me. Similarly I am stuck on the R.K. case. Please help

채택된 답변

John D'Errico
John D'Errico 2016년 9월 25일
편집: John D'Errico 2016년 9월 25일
So A & B are known matrices. Si is a known vector.
OF COURSE IT APPLIES!
What A*Si? A known vector. Call it b.
So then you have a problem of the form
B*phi = v
Can you solve that using backslash? Yes. B is known. v is known.
Look at the equation. How do you solve it? Substitute variables.
  댓글 수: 3
John D'Errico
John D'Errico 2016년 9월 25일
편집: John D'Errico 2016년 9월 25일
It looks like you have an error in your equations. You give two different equations for R. I picked 0.5 for gamma. By the way, for your own good, please don't use gamma as the name of a variable. It will cause you a great deal of hell in the future, when you might need to use the function gamma. In general, don't use variable names that are the same as that of existing functions.
I picked a gamma of 0.5, then tried to test out your code.
J = @(gamma) [1,0,0; cos(gamma), sin(gamma), sin(gamma)];
C = @(gamma) [ 0, 1, 0; -sin(gamma), cos(gamma), cos(gamma)];
A = @(gamma) [J(gamma);C(gamma)];
A(.5)
ans =
1 0 0
0.87758 0.47943 0.47943
0 1 0
-0.47943 0.87758 0.87758
B = [0.3,0;0,0.3;0,0;0,0];
F = @(gamma) [.15, .15*cos(gamma) ; 0 , .15*cos(gamma);0 ,.3*sin(gamma)];
F(.5)
ans =
0.15 0.13164
0 0.13164
0 0.14383
R=B\A(.5)
R =
3.3333 0 0
2.9253 1.5981 1.5981
R = @(gamma) [10/3 ,0, 0; -(10/3)*cos(gamma), -(10/3)*sin(gamma) ,(5/3)*sin(gamma)];
R(.5)
ans =
3.3333 0 0
-2.9253 -1.5981 0.79904
So you see that the two formulas for R give different values for the second row of R. Check your equations carefully, as you have a mistake there.
Walter Roberson
Walter Roberson 2016년 9월 25일
In your code you have
F = @(gamma) [[.15, .15*cos(gamma) ;
0 , .15*cos(gamma);
0 ,.3*sin(gamma)];
That starts with two '[' but ends in only one, so MATLAB thinks the array is still being formed.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Robotics System Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by