Robotics StackExchange | Archived questions

How to publish/subscribe to an X,Y,Z array in ROS

I am trying to publish and subscribe to an array containing X,Y,Z values that I find useful. These values are taken directly from a PointCloud.

The general format for the array is:

my_array[x][y] = z;

However, I can't seem to find any useful tutorials for my setup. I saw multidimensional arrays, but I'm not sure how to apply them to this situation. From what I read, it doesn't seem like it would apply.

Thanks for your help!

Asked by ryan4588 on 2017-02-05 14:16:25 UTC

Comments

You can create and operate the publish/subscribe things by the ros messages defined by yourself. http://wiki.ros.org/ROS/Tutorials/CreatingMsgAndSrv

Asked by FrozenCh on 2017-02-05 21:10:50 UTC

Answers