User Tools

Site Tools


ece4560:maniplots

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ece4560:maniplots [2015/02/25 21:43] – [Elbow 6R] pvelaece4560:maniplots [2024/08/20 21:38] (current) – external edit 127.0.0.1
Line 15: Line 15:
 planarRX_display(alphaJoints, linkLens, gripLen); planarRX_display(alphaJoints, linkLens, gripLen);
 </code> </code>
-although the second and third arguments are optional.  The revolute joint variables are given in radians. 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:+although the second and third arguments are optional.  The revolute joint variables are given in radians. 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). An example invocation for the ``planarR2_display`` function is 
 +<code matlab> 
 +planarR2_display([pi/4; pi/8]); 
 +</code> 
 +Note that the argument is a vertical/column vector.  It will not work otherwise.  The optional arguments can be either row- or column- vectors: 
 +<code matlab> 
 +planarR2_display([pi/4; pi/8], [3/4, 3/4]); 
 +</code> 
 +or 
 +<code matlab> 
 +planarR2_display([pi/4; pi/8], [3/4; 3/4], 1/6); 
 +</code> 
 +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:
 <code matlab> <code matlab>
 nframes = 100; nframes = 100;
 tvect = linspace(ti,tf,nframes); tvect = linspace(ti,tf,nframes);
 for tT = tvect for tT = tvect
-  alphaT = interp1(tsol, alphasol, tT);+  alphaT = transpose(interp1(tsol, alphasol, tT));
   planarRX_display(alphaT, ll, gl);   planarRX_display(alphaT, ll, gl);
 end end
Line 75: Line 87:
 --------- ---------
 ;#; ;#;
-[[: | Main ]]+[[ECE4560:start | ECE4560]] -- [[: | Main ]]
 ;#; ;#;
ece4560/maniplots.1424918607.txt.gz · Last modified: 2024/08/20 21:38 (external edit)