How can I realize subscribing to subtopics
I have a message that consists of two (or more) submessages:
my_msgs/VehicleData:
sensor_msgs::NavSatFix gps
gps_msgs::GPSFix gps_fix
When I publish the message as /vehicle I can afterwards use these three commands:
$ rostopic echo /vehicle
$ rostopic echo /vehicle/gps
$ rostopic echo /vehicle/gps_fix
All the commands return the specific submsgs. When I now use the rqt_marble_plugin it doesn't display the /vehicle/gps submessage. Internally this program searches for NavSatFix topics but it doesn't find this one.
Can I somehow fix this?
I would like to be able to publish this VehicleData msg and subscribe either to the whole topic or to subtopics.