ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Hello,

I have a similar issue sending also float32 arrays, and I solved creating a file.msg with my array variable like this float32[] array1

And later on the subscriber I did something like this

std::vector<float> waypointsX;

void chatterCallback(const robo_move_tpc::waypoints::ConstPtr& waypointsData)

waypointsX.push_back(waypointsData-> array1[i]);

And later I put all the values on the vector and work with the vector, obviously you can work directly with the waypointData, but for me was more easy work of that way. Hope this help you.