Advice needed on a suitable method to transmit ROS msgs, with unknown msg types. In cpp
Hey guys,
So I have been contracted to write a ROS driver to facilitate the transmission (and reception) of currently undefined ROS msgs underwater with an acoustic modem.
My plan is to create a node that listens to all ROS msg traffic, then to discriminate the msgs to be transmitted across the acoustic link (with aid of topic names in a conf file), then serialise those selected msgs (one at a time), and then transmit. On the receiving side the date will need to be de serialised and re-published into a msg.
Due to not knowing the msgs before compilation, and the requirement of a configuration file to discriminate, this obviously means that I need a way to serialize and de-serialize without knowing the msg type (unless I have this information in the config file aswell). I have also been asked that it is programmed in CPP.
I realise that similar questions have been asked before , mostly stating that it is impossible (?) in cpp due to introspection... but these were asked several years ago.
So I wonder if there is any new advice, possibly from changes in ROS.
Many thanks,
Chris
Hi, I've a similar problem but since m new to ros coding i'm unable to deal with the issue . can u lead through the basics ?it would b a great help.
thnx rythima