How to send arrays with std_msgs/UInt8MultiArray and std_msgs/Float64MultiArray?
Hi! I woul like to send arrays to a node, I've tried with this code, but I think there is something wrong when I try to copy the array values in the data structure...
uint8_t SSS_ground_unito[doppio_bins]={0};
immagine::pixel_ned messaggio;
double point_seabed_n[doppio_bins]={0};
double point_seabed_e[doppio_bins]={0};
//funzione per inviare il messaggio al nuovo nodo
void send_immagine(uint8_t SSS_grnd_unito[],double point_sbed_n[], double point_sbed_e[]){
messaggio.pixel.data=SSS_ground_unito;
messaggio.nord.data=point_seabed_n;
messaggio.est.data=point_seabed_e;
cout <<"send"<< messaggio.pixel.data<<endl;
write_Out.publish(messaggio);//pubblica il messaggio sul topic
ROS_INFO("ping inviato");
}
this is my msg
std_msgs/UInt8MultiArray pixel
std_msgs/Float64MultiArray nord
std_msgs/Float64MultiArray est