How to store in a variable some data published by node using rosmatlab?

asked 2014-08-14 16:42:09 -0600

JoaoPedro gravatar image

How can store data using ROS I/O Matlab. For instance, I have a code that subscribe on a topic and display for me on Matlab the messages that is sending on this topic. Now, I'm trying to store this data on a variable or an array, but i can't. Is there a way to do that? The code below show the information:

clear all close all

node = rosmatlab.node('No_Teste', 192.168.1.119';, 11311, 'rosIP',192.168.1.119');

subscriber = rosmatlab.subscriber('Fluxo', 'std_msgs/String', 10, node);

subscriber.setOnNewMessageListeners({@get});

 function get(message)
      disp(char(message.getData()));
 end
edit retag flag offensive close merge delete