2
$\begingroup$

I am using the Robotics Toolbox by Peter Corke to create a plot of a simple four-link robot. For an assignment, I want a figure of the robot with all frames according to the DH-convention. Though even after reading through the documentation and googling for an hour, I couldn't find an option.

Seriallink.plot(...) offers the options 'jaxis' and 'jvec', though they only display the joint axes, not the complete xyz-frame per link.

How can I get a plot of a robot with all DH frames included?

If this is not possible, is there any other way to quickly render such a plot from a DH table? I am almost tempted to do it on paper after already wasting so much time on such an easy task.

$\endgroup$

2 Answers 2

1
$\begingroup$

The easiest way to do this would be to use the trplot function (documented for v9 at http://www.petercorke.com/RTB/r9/html/trplot.html). You can simply call this function with the transformation matrices for each link and it will add frame axes in those locations.

$\endgroup$
2
$\begingroup$

And the forward kinematics function has a second output argument which is an array of the transforms for each frame. The following code will do what you want:

p560.plot(qz)
[T,A] = p560.fkine(qz);
hold on
for i=1:6
  trplot(A(i), 'frame', num2str(i))
end
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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