36 """ The node provided by this file exposes a helper service used by 37 the C++ rosserial_server. The service allows the C++ driver to look 38 up message definitions and hash strings which would not have been 39 known to it at compile time, allowing it to fully advertise topics 40 originating from microcontrollers. 42 This allows rosserial_server to be distributed in binary form. """ 45 from rosserial_msgs.srv
import RequestMessageInfo
46 from rosserial_msgs.srv
import RequestServiceInfo
47 from rosserial_python
import load_message
48 from rosserial_python
import load_service
54 rospy.init_node(
"message_info_service")
55 rospy.loginfo(
"rosserial message_info_service node")
62 package_message = tuple(req.type.split(
"/"))
63 if not self.message_cache.has_key(package_message):
64 rospy.loginfo(
"Loading module to return info on %s/%s." % package_message)
66 self.
message_cache[package_message] = (msg._md5sum, msg._full_text)
68 rospy.loginfo(
"Returning info from cache on %s/%s." % package_message)
72 rospy.logdebug(
"req.service is %s" % req.service)
73 package_service = tuple(req.service.split(
"/"))
74 if not self.service_cache.has_key(package_service):
75 rospy.loginfo(
"Loading module to return info on service %s/%s." % package_service)
77 self.
service_cache[package_service] = (srv._md5sum,mreq._md5sum,mres._md5sum)
79 rospy.loginfo(
"Returning info from cache on %s/%s." % package_service)
85 if __name__==
"__main__":
def _message_info_cb(self, req)
def load_message(package, message)
def load_service(package, service)
def _service_info_cb(self, req)