@@ -322,10 +322,10 @@ function display(ets)
322322
323323 for e = ets
324324 if e .isjoint
325- s = [s sprintf(' %s (q%d )' , e .what , e .qvar ) ];
325+ s = [s ' ' sprintf(' %s (q%d )' , e .what , e .qvar ) ];
326326
327327 else
328- s = [s sprintf(' %s (%s )' , e .what , render(e .param ))];
328+ s = [s ' ' sprintf(' %s (%s )' , e .what , render(e .param ))];
329329
330330 end
331331 end
@@ -503,7 +503,7 @@ function plot(ets, qq, varargin)
503503 end
504504 end
505505
506- opt = RTBPlot .plot_options([], [varargin ' reach' , reach ])
506+ opt = RTBPlot .plot_options([], [varargin ' reach' , reach ]);
507507
508508 if isempty(findobj(' Tag' , ' ETS3' ))
509509 h = draw_ets(ets , qq , opt );
@@ -578,7 +578,7 @@ function animate(ets, qq)
578578 % update the wrist frame
579579 T = ets .fkine(q , ' setopt' , opt );
580580 if ~isempty(h .wrist )
581- trplot2 (T , ' handle' , h .wrist );
581+ trplot (T , ' handle' , h .wrist );
582582 end
583583
584584 % render and pause
@@ -600,6 +600,7 @@ function animate(ets, qq)
600600
601601
602602 axis(opt .workspace );
603+ view(3 ); % 3D plot
603604
604605 s = opt .scale ;
605606 % create an axis
@@ -724,6 +725,12 @@ function animate(ets, qq)
724725 zlabel(' Z' )
725726 grid on
726727
728+ % deal with some display options
729+ if opt .shading
730+ lighting gouraud
731+ light(' position' , opt .lightpos )
732+ end
733+
727734 % restore hold setting
728735 if ~ish
729736 hold off
0 commit comments