yuck ! Using popen to call rostopic to get the topic type.... not cool. I hope we can use getSubscribedTopics from the node handle instead (https://code.ros.org/trac/ros/ticket/2693)