Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to publish a geometry_msgs/PiontStamped from Matlab

Hi all,

I'm a newest user under rosmatlab, I had made the basic tutorial and it works fine. Now I'm trying to publish a geometry_msgs/PiontStamped, then:

% Lauch roscore on port 11311

roscore = rosmatlab.roscore(11311);

% create a new node

node = rosmatlab.node('NaplesUAVM',roscore.RosMasterUri);

% create a publisher

publisher = rosmatlab.publisher('time','geometry_msgs/PointStamped',node);

% create a subscriber

msg = rosmatlab.message('geometry_msgs/PointStamped',node);

Now, when I write the message values, I only have two possibilities :

msg.setHeader and msg.setPiont

but I don't know what's the correct syntax.

Can anyone help me??

Thanks in advance Elisabetta