Ask Your Question
0

Can we save QwtPlot for everytime step as images?

asked 2017-03-15 22:09:25 -0600

Joy16 gravatar image

I am trying to visualize camera images and joint angles in matlab. Camera images are fine. For plotting the joint angles with respect to time, I am trying to save QwtPlot as image at everytime stamp collected and then load them as matlab plot.

Can you give me any idea on how to do it?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-03-16 08:02:29 -0600

lucasw gravatar image

You should save the joint angles into a rosbag http://wiki.ros.org/rosbag/Commandlin... then load the bag into matlab https://www.mathworks.com/help/roboti... .

If you really want to save the QwtPlot as an image you could screen grab it into a ros image with https://github.com/lucasw/screen_grab but the underlying plot data would not be easily recoverable for usage any other tool, it would just be a series of images.

edit flag offensive delete link more

Comments

Thank you! I have matlab 2015b, so I don't think I will be able to load rosbag in there. My idea is to save images and then stream them inmatlab plot(). I tried screen_grab, but it is not working for me(ros indigo). Failed to load nodelet [/screen_grab] of type [screen_grab/ScreenGrab]

Joy16 gravatar image Joy16  ( 2017-03-16 09:45:24 -0600 )edit

It's pretty easy to convert rosbags into csv files, which are simple to load in matlab- and maybe there is a python script to convert to mat?

lucasw gravatar image lucasw  ( 2017-03-16 11:27:43 -0600 )edit

I haven't touched screengrab in a while so I'll have to try it out- but you would have to do machine vision on the plot image to get plot data out of them, which seems much more difficult than any other approach.

lucasw gravatar image lucasw  ( 2017-03-16 11:28:55 -0600 )edit

If you want to sort out what is wrong with screengrab go ahead and make an issue on https://github.com/lucasw/screen_grab... and cut and paste the command you ran and the complete output.

lucasw gravatar image lucasw  ( 2017-03-16 11:34:07 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-03-15 22:09:25 -0600

Seen: 115 times

Last updated: Mar 16 '17