Robotics StackExchange | Archived questions

read the data of a subscriber in matlab

Hi,

I want to use data from a topic to do data analysis in matlab. I set up a subscriber and call a callback function (example from matlab support document) like:

subscriber = rosmatlab.subscriber('TOPIC', 'std_msgs/String', 1, node); subscriber.setOnNewMessageListeners(@function1);

function1 does not have return values so if function1 looks like:

function function1(message) disp(char(message.getData())); end

,I can not access message.getData() in the original script. So how can I do that?

Asked by psfa_fz on 2015-01-12 09:48:51 UTC

Comments

Answers