roslib.message.get_message_class returns None
I'm trying to create a tool that can dynamicly read service call descriptions from a yaml file and call the services accordingly. (in rospy on kinetic)
If i try to resolve a non-standard service type form a string, roslib.message.get_message_class returns None. Why does this happen? Shouldn't it either throw an error, like when the string doesn't mean anything, or return the correct type?
try:
msg_type = roslib.message.get_message_class('somethingstupid')
if msg_type is None:
rospy.logwarn('msg_type is None')
except:
rospy.logerr('roslib.message.get_message_class failed')
results in
roslib.message.get_message_class failed
while
try:
msg_type = roslib.message.get_message_class('my_package/MyMsgType')
if msg_type is None:
rospy.logwarn('msg_type is None')
except:
rospy.logerr('roslib.message.get_message_class failed')
results in
msg_type is None