How to save dynamic picture about the trajectory of the end-effector ?

374 views
Skip to first unread message

黄俊豪

unread,
Apr 30, 2018, 11:56:20 AM4/30/18
to Robotics & Machine Vision Toolboxes
qs=[0 0 0 0 0 0];
qr=[0 6.6 -6.6 0 0 0];
q=jtraj(qs, qr, 50);
puma560.plot(q, 'trail', 'r--')

The figure is dynamic and i want to save it as .avi or .gif .   Thanks a lot !




Erik van Oene

unread,
Apr 30, 2018, 12:45:38 PM4/30/18
to Robotics & Machine Vision Toolboxes
Hi,

checkout

>> doc VideoWriter

please note this is not a RTB function. So any further questions regarding VideoWriter don't belong in this about this discussion group. For this I would suggest to google on: matlab create avi or something similar.

Erik




Op maandag 30 april 2018 17:56:20 UTC+2 schreef 黄俊豪:

Erik van Oene

unread,
Apr 30, 2018, 1:41:28 PM4/30/18
to Robotics & Machine Vision Toolboxes
Hi,

after I posted the message below I saw a .movie property in the SerialLink object. After checking how to use this, I don't see any use of this property at the moment other than throwing an error @ line 142 of animate.m

As specified in SerialLink.m the movie parameter should be filename (like 'test.mp4' ) or a folder in which the individual movie frames will be saved. However, @line 142 of animate, movie is expected to be a class which contains a method add(). Though I was not able to find any code related to this.

So it is probably an old part of code or a part of code which is still under construction. For now I suggest to manually save the video using the VideoWriter which I mentioned before.

Erik


Op maandag 30 april 2018 18:45:38 UTC+2 schreef Erik van Oene:

Peter Corke

unread,
May 5, 2018, 8:50:15 PM5/5/18
to Robotics & Machine Vision Toolboxes
>> puma560.plot(q, 'trail', 'r--', 'movie', 'mymovie.mp4')

will do the animation and save it as a movie.  I've just noticed that a vital helper class is missing in the distro, please install this on your path.

peter
Animate.m

is.er...@gmail.com

unread,
May 19, 2018, 7:03:27 PM5/19/18
to Robotics & Machine Vision Toolboxes
Hi, Mr.Corke!
Sorry to bother you again. Could you upload the Animate.m again? I can't download it. 

在 2018年5月6日星期日 UTC+8上午8:50:15,Peter Corke写道:

Peter Corke

unread,
May 19, 2018, 7:51:41 PM5/19/18
to Robotics & Machine Vision Toolboxes
I can download it OK.  Note sure I would do anything different if I uploaded again.  Try clicking on the View button and then cut and paste the text into a new file.

peter
Reply all
Reply to author
Forward
0 new messages