ROS Messages from Baseclass struct's
Hey, I'm using ROS in a larger project. Therefore platform independend Baseclasses are used. The Baseclass has public functions that need special Input structs. Up to now I was rebuilding these structs as a special custom message, but to parse it to my baseclass function I need to remap every single value of two structs, that have the same structure.
My Question is: Is there any posibility to create ROS Messages without this need to convert the ROSmsgstruct to the (equal) input_struct value-by-value?
Please note: It is very important that the baseclass stay's platform independet.
Thank you in advance!
Asked by MarcelKr on 2019-02-22 04:49:47 UTC
Comments
There is no way I'm aware of to do this. ROS messages are built for multiple languages using a custom system. If you have a very large amount of structs to convert it's possible you could write a script to automatically generate the .msg files and the two conversion functions to save time.
Asked by PeteBlackerThe3rd on 2019-02-22 06:38:45 UTC
I'm not entirely sure I understand what you're trying to do, but perhaps roscpp/Overview/MessagesTraits and roscpp/Overview/MessagesSerializationAndAdaptingTypes help.
Asked by gvdhoorn on 2019-02-22 11:25:48 UTC