How to plot two moving robot in the same figure and change one of them transparency?
Afficher commentaires plus anciens
Hello guys ,i want plot two moving robot in the the figure and change on of them transparency.
but i don't know how to change just on of them transparency use the code
alpha(robot,0.2) %change robot transparency
and i just want to implement the effect like below

The code are below for the purpose change
axis([-.8 .8 -.8 .8 0 1.2]);
view(135,15)
for i=1:length(trajTimes)
% Current time
tNow= trajTimes(i);
% Interpolate simulated joint positions to get configuration at current time
configNow = interp1(tJoint,stateJoint(:,1:numJoints),tNow);
configNow1 = interp1(tJoint,stateJoint(:,1:numJoints),tNow+1);
poseNow = getTransform(robot,configNow,endEffector);
show(robot,configNow1,'PreservePlot',false,'Frames','off');
hold on
show(robot,configNow,'PreservePlot',false,'Frames','off');
jointSpaceMarker = plot3(poseNow(1,4),poseNow(2,4),poseNow(3,4),'r.-','MarkerSize',2);
% alpha(robot,0.2)% here didn't works
alpha 0.2
drawnow limitrate ;
end
but only one moveing like below picture shows

Can someone help me
Best wishes,
-jian
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Robotics System Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

