Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 84

custom message for matrix or 2d array

$
0
0
Hi! I need to publish a matrix as a ROS message and I was looking around for common types of messages to see how 2d arrays were used. I checked on the following links [http://ros.org/wiki/std_msgs](http://www.ros.org/wiki/common_msgs) [http://www.ros.org/wiki/common_msgs](http://www.ros.org/wiki/common_msgs) I found many similar, but I couldn't find one with a 2D array or a matrix, only 1d arrays. Is that because I can just use a msg that has an array? Any tutorials on this? Just out of curiosity,trying to understand how the ROS message system handles the different possible sizes of arrays: I have seen other people using Int32MultiArray, for example, And they do array.data.push_back(value); So the message does not really contain a C++ int[] but something like a vector container, and that is how it can handle different sizes? Thanks!

Viewing all articles
Browse latest Browse all 84

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>