Skip to content
Advertisement

Get ros message type at runtime

I’m hoping to have a config file loaded in via rosparam that includes the type for a generic callback to subscribe to. Right now this is what I have but can’t figure out how to make it work with the subscriber.

JavaScript

Advertisement

Answer

In Python you can use globals to lookup and return the message type from a string

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement