Add yarpidl_rosmsg source files to my code or to a yarp library #79
-
I want to use the classes defined in rosmsg source in order to fill the type of a message. Using cmake and the variables defined by YARP cmake files, how should I add those files to my code? It would be possible to add those files to a YARP library? cc @drdanz |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Hi, Best, Tobias |
Beta Was this translation helpful? Give feedback.
-
@Tobias-Fischer, the tutorial does not fill type anywhere. In the tutorial they are executing the yarpidl_rosmsg externally. Instead of doing that, I want to write a code that given a ros message name, it is able to fill the type void Port::promiseType ( const Type & typ) in my code. There is a class that deals with that, which is located in the rosmsg source. And I would like to use it in my code. Plinio |
Beta Was this translation helpful? Give feedback.
-
@plinioMoreno If I understand correctly your issue, I think that you can do something like |
Beta Was this translation helpful? Give feedback.
-
I'm not sure to understand your issue, can you be more precise on what you are trying to achieve? |
Beta Was this translation helpful? Give feedback.
-
@barbalberto, yes, I do. @drdanz, your guess was correct and works properly. The reason for writing code like this is to get rid of issues on the yarp-bottle-generator, that we use to generate bridging code between ROS and YARP. Thanks |
Beta Was this translation helpful? Give feedback.
-
So the best way to do it is to use the Publisher, which is a port already customized for usage with ROS, like the controlBoardWrapper is doing.
|
Beta Was this translation helpful? Give feedback.
@plinioMoreno If I understand correctly your issue, I think that you can do something like
port.promiseType(Type::byNameOnWire("your_package/your_message"));