Publish an length unknown vector message on a topic
hi, i'm trying to publish a self-defined message composed by 4 vector whose length is unknown. my .cpp code (incomplete) could be the following:
std::vector <int> l,d,r,u;
data_pub_ = it_.advertise<rd_ctrl::proc_data>("data", 1);
//vectors u,d,l,r computation
data.u=u;
data.d=d;
data.l=l;
data.r=r;
data_pub_.publish(data);
if it works (i don't know...if there are errors please tell me), how can i define the .msg file? thank you very much for your help!