Problem with ikine

679 views
Skip to first unread message

Emanuel Jesus

unread,
Oct 27, 2011, 2:06:24 PM10/27/11
to Robotics & Machine Vision Toolboxes
Hello

I've a problem with the function ikine on the new version of the
toolbox (9.2), in the old one (8) it works ok.
The problem i got is with a three-link Planar Robot (like this:
https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Planar-three-link-manipulator.svg/210px-Planar-three-link-manipulator.svg.png).
When i whant to know the inverse manipulator kinematics for a forward
kinematics of q=[10º 20 º30º] the function ikine does not converge in
the new toolbox but in the old one it converges for the correct
angles.

The matlab script that i use is:

% DH parameters (4,3 and 2 are the links lengths)
PJ_DH=[0 0 0 4;0 0 0 3;0 0 0 2]

link1=Link([ PJ_DH(1,1) PJ_DH(1,2) PJ_DH(1,4) PJ_DH(1,3) 0 0]);
link2=Link([ PJ_DH(2,1) PJ_DH(2,2) PJ_DH(2,4) PJ_DH(2,3) 0 0]);
link3=Link([ PJ_DH(3,1) PJ_DH(3,2) PJ_DH(3,4) PJ_DH(3,3) 0 0]);

R1=SerialLink([link1 link2 link3],'name','Robot1 3DOF');

t1=0.1745;
t2=0.3491;
t3=0.5236;

FK=R1.fkine([t1 t2 t3])

IK=R1.ikine(FK,[0 0 0],[1 1 0 0 0 1])

and the result is:

i=1, nm=2.673688
Warning: Solution wouldn't converge, final error 2.674
> In SerialLink.ikine at 145
In Untitled at 20

IK =

889.6727 354.6802 342.8974

Am i doing something wrong?? Or there is a problem with the function??

Peter

unread,
Oct 27, 2011, 5:38:04 PM10/27/11
to Robotics & Machine Vision Toolboxes


On Oct 28, 4:06 am, Emanuel Jesus <emanuelade...@gmail.com> wrote:

>
> Am i doing something wrong?? Or there is a problem with the function??

I try not to ship functions with problems :) The function does work
for the 2link and puma examples in the book.

The kinematic parameters have a different order in the Link
constructor compared to r8. Display the robot
>> R1

to cross check

Peter

Emanuel Jesus

unread,
Oct 27, 2011, 6:22:04 PM10/27/11
to Robotics & Machine Vision Toolboxes
On Oct 27, 10:38 pm, Peter <peter.i.co...@gmail.com> wrote:

> The kinematic parameters have a different order in the Link
> constructor compared to r8.  Display the robot
>
> >> R1
>
> to cross check
>
> Peter

Thanks for the reply, Peter.

I know that the order is differente in the two versions and i also
checked the exemples in the book to make sure i was doing it the right
way.
Here is the R1 in the two versions:

------ r8------
name (3 axis, RRR) [Robot1 3DOF]
grav = [0.00 0.00 9.81] standard D&H parameters

alpha A theta D R/P
0.000000 4.000000 0.000000 0.000000 R (std)
0.000000 3.000000 0.000000 0.000000 R (std)
0.000000 2.000000 0.000000 0.000000 R (std)

------- r9.2 -----
Robot1 3DOF (3 axis, RRR, stdDH)
+---+-----------+-----------+-----------+-----------+
| j | theta | d | a | alpha |
+---+-----------+-----------+-----------+-----------+
| 1| q1| 0| 4| 0|
| 2| q2| 0| 3| 0|
| 3| q3| 0| 2| 0|
+---+-----------+-----------+-----------+-----------+

As you can se they are equal.
I also have tried different angles but ikine still not converge. I
only converge when the angles are zero (q=[0 0 0])
Any ideas or suggestions??

Peter

unread,
Oct 28, 2011, 3:29:22 AM10/28/11
to Robotics & Machine Vision Toolboxes
Thanks for the extra details.

No ideas come to mind, perhaps compare the ikine() code for both
versions, see what's different or port the r8 code across to r9.

Did the book 2 link example work for you?

Peter

techn...@gmail.com

unread,
Jun 19, 2013, 1:38:25 AM6/19/13
to robotics...@googlegroups.com, emanue...@gmail.com
Hi,
I'm simulating a 6 DOF Stewart platform using the 6 different objects of serial link.
Is there a way I can put a limit on ikine solution?

thanks in advance.\
Mudit

Peter Corke

unread,
Jul 2, 2013, 6:25:32 AM7/2/13
to robotics...@googlegroups.com, emanue...@gmail.com
A Stewart platform is a parallel mechanism, the toolbox only handles serial links.  Not sure how you would even express this as a Robot object.

peter

Fahrudin Muna

unread,
Jul 2, 2013, 6:52:50 AM7/2/13
to robotics...@googlegroups.com, emanue...@gmail.com
Dear Dr Peter Corke

Can you help to explain and solve my problem with vehicle.

clear;
V = diag([0.1, 1*pi/180].^2);

% then use this to create an instance of a Vehicle class
veh = Vehicle(V);

% and then add a "driver" to move it between random waypoints in a square
% region with dimensions from -10 to +10

veh.add_driver( RandomPath(10) );

map = Map(30, 10);

p = run(veh, 300)
veh.plot_xy('b');

Here, I can not figure the movement of my vehicle. I just see the track it creates using random path. How do I make the vehicle appear? and any body can explain about this command? p = run2(veh, T, x0, speed, steer) I try to use it, but I find error.
In this case I try to direct the robot to follow certain path for navigation but I still wonder how to do it. Is there any comment to define our path instead of using RandomPath()?


Best Regards
Reply all
Reply to author
Forward
0 new messages