How to work with std_msgs::Int16MultiArray message type?
What is needed to publish a How to work with std_msgs::Int16MultiArray message?
I tried
std_msgs::Int16MultiArray msg;
int16_t *velocities;
msg.data = velocities;
but just those few lines gives me errors while compiling
error: no match for ‘operator=’ (operand types are ‘std_msgs::Int16MultiArray_<std::allocator<void> >::_data_type {aka std::vector<short int, std::allocator<short int> >}’ and ‘int16_t* {aka short int*}’)
msg.data = velocities;
I believe this is a duplicate of #q37185.