running rosmsg show from code
Hi,
is there a way (possibly in Python) to call the command line command rosmsg show
from code, passing as an argument the name of the message/service and getting an object representing the message/the class with the message structure? I know that some commands can be called from rospy
(as rostopic list
, for example), but I can't find how to run rosmsg
.
What do you really want to achieve? This sounds like an xy-problem
I need to build instances of all the ros messages and services in a KB, so I need to understand which are all the messages/services being published, and which re their structures in terms of submessages/primitive types.