hello reader,
do i need a msg-file when i want to write a publisher and a subscriber? and if yes, how do i have to integrate the file into the publisher-code and the subscriber-code?
thx in advance
Originally posted by shane on ROS Answers with karma: 1 on 2012-08-28
Post score: 0
Original comments
Comment by shane on 2012-08-28:
and what if i want to publish an 1 dimensional array? do i just need to include "std_msgs/Float64MultiArray.h" or do i need something else?
Comment by Lorenz on 2012-08-28:
You can use Float64MultiArray but it might be a bit tricky because you need to give a layout definition. Have a look at the message definitions for more info. They contain some documentation. I personally think that Float64MultiArray doesn't provide enough semantics and I'd define my own message.
Comment by shane on 2012-08-28:
hm, i see.
and what do i write into my own defined message?
double arrayname[4]?
Comment by Lorenz on 2012-08-28:
Depends on what you want to send around. Have a look at this page for data types you can use.
Comment by shane on 2012-08-28:
i want to send a 1-dim double array with the size of 4
Comment by joq on 2012-08-29:
It would be float64 arrayname[4]