User Tools

Site Tools


ece4560:maniplots

This is an old revision of the document!


Plotting/Displaying Manipulators in Matlab

This site has links to display code for the different manipulators as well as implementation examples. You should be able to incorporate these display functions into your homework assignments. Some are rudimentary (simple lines and circles), some are more complex (3D models).

Simple Planar Manipulators


The manipulators to appear in the homework range from a simple R2 manipulator up to an R4 manipulator. The code for each of the functions below is here. What is provided a Matlab pcode files (pre-compiled Matlab code) and empty m-files with help documentation.

  • planarR2_display: Planar R2 (default link lengths: 1, 3/4)
  • planarR3_display: Planar R3 (default link lengths: 1, 1/2, 1/4)
  • planarR4_display: Planar R4 (default link lengths: 1, 1, 1/2, 1/4)

Invocation is pretty straightforward. Almost always goes as follows:

planarRX_display(alphaJoints, linkLens, gripLen);

although the second and third arguments are optional. For each of them, it is possible to give X+1 joint coordinates; the additional joint value is a length that specifies the gripper opening width (it defaults to some half-open state if not passed). Suppose that you had run ode45 or some other numerical integrator in Matlab and want to visualize the resulting simulation, then the following should work:

nframes = 100;
tvect = linspace(ti,tf,nframes);
for tT = tvect
  alphaT = interp1(tsol, alphasol, tT);
  planarRX_display(alphaT, ll, gl);
end

where it is assumed that tsol and alphasol were the ouputs of the numerical integrator. The reason for interpolating on linearly spaced out time points is that the numerical integration doesn't return evenly spaced time points. They are irregularly spaced and depend on the complexity of the velocity at that point in time (simpler velocities allow the numerical integrator to jump larger spans of time because the integration looks linear).

If you have issues, you can always type

help planarRX_display

with the proper X value and you will get some documentation (assuming that you kept the documentation m-files around).

Piktul


The simplest manipulator to be used in the course is called piktul as named by the student who helped me design it. It is the simplest instantiation of a SCARA manipulator that we could create using laser cut parts and the lowest-torque, lowest-cost servo motors available. It is like a planar R3 manipulator where the last joint angle has no length, however it can also actuate vertically meaning that it can pick up and place things in a roughly planar landscape (you can think of it as being able to manipulate things at different heights, but within a horizontal slice). More technically the workspace is SE(2) x |R.

Lynx6


The slightly more fully functional manipulator to be used in the course is called the Lynx 6 manipulator made by Lynxmotion. We have different versions, from the earliest Lexan one, up to the more recent aluminum ones. Eventually we'll probably design a better one, but for now, this is it.


Main

ece4560/maniplots.1424739476.txt.gz · Last modified: 2023/03/06 10:31 (external edit)