plot(robo2, [0 -pi/2]) ??
As per my previous reply:
> But the functions that use the robot model actually take the values for
> theta from the passed joint coordinate argument. So if joint is
> revolute it substitutes q for theta, if prismatic it substitute q for
> d. This is actually done in the link object itself, since mostly we are
> interested in a link transform matrix A, so the object abstracts all this.
So plot is a function that uses the robot model. You have asked it to
substitute 0 for theta in each joint (since they are both revolute).
When you create a link object either of d or theta is irrelevant
(depending on whether it is prismatic or revolute respectively).
Looking at this thread it seems this causes a lot of confusion. The
options are to have different arguments for each of the prismatic and
revolute cases so that in Mike's example he'd just write:
L2 = link([ 0 0 134]);
But I was trying to keep the API simple and consistent...
We could also use the Matlab string/value convention:
L2 = link('revolute', 'alpha', 0, 'a', 0, 'd', 134);
and it would complain if theta was specified for this revolute joint:
you get an error message instead of confusion.
What do people think?
peter
L2.offset = -pi/2;
to achieve what you want.
I was trying to be pure with respect to D&H conventions as they are
widely understood. However a big problem, one that always trips people
up, is the zero-angle pose. The D&H conventions define the pose of the
robot for joint angles of zero, which is rarely how people envisage or
design the zero-angle pose. The offsets were introduced into the
toolbox quite a few versions ago to fix that (but always the curse of
backward compatability).
It would perhaps be cleaner to consider that q is added to that the
values defined in the link as you thought was the case, but in my
experience this would just trip up a different group of users...
D&H conventions are covered in every textbook and taught in most
courses, but I find them very unintuitive, and my hunch is that
everybody curses them. They do however lead to nice formulations for
dynamics, Jacobians etc.
An alternative is to just write down a string of simple transformations
that define the robot, and then factor the D&H parameters out from that,
check out:
http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=4252158
peter.