pointing old generator to genpy
This commit is contained in:
parent
010df83e1e
commit
738ae45374
|
@ -920,7 +920,7 @@ def deserialize_fn_generator(package, spec, is_numpy=False):
|
||||||
|
|
||||||
yield " return self"
|
yield " return self"
|
||||||
yield "except struct.error as e:"
|
yield "except struct.error as e:"
|
||||||
yield " raise roslib.message.DeserializationError(e) #most likely buffer underfill"
|
yield " raise genpy.DeserializationError(e) #most likely buffer underfill"
|
||||||
|
|
||||||
def msg_generator(package, name, spec):
|
def msg_generator(package, name, spec):
|
||||||
"""
|
"""
|
||||||
|
@ -956,7 +956,7 @@ def msg_generator(package, name, spec):
|
||||||
clear_patterns()
|
clear_patterns()
|
||||||
|
|
||||||
yield '"""autogenerated by genmsg_py from %s.msg. Do not edit."""'%name
|
yield '"""autogenerated by genmsg_py from %s.msg. Do not edit."""'%name
|
||||||
yield 'import roslib.message\nimport struct\n'
|
yield 'import genpy\nimport struct\n'
|
||||||
import_strs = []
|
import_strs = []
|
||||||
for t in spec.types:
|
for t in spec.types:
|
||||||
import_strs.extend(compute_import(package, t))
|
import_strs.extend(compute_import(package, t))
|
||||||
|
@ -970,7 +970,7 @@ def msg_generator(package, name, spec):
|
||||||
fulltype = '%s%s%s'%(package, roslib.msgs.SEP, name)
|
fulltype = '%s%s%s'%(package, roslib.msgs.SEP, name)
|
||||||
|
|
||||||
#Yield data class first, e.g. Point2D
|
#Yield data class first, e.g. Point2D
|
||||||
yield 'class %s(roslib.message.Message):'%name
|
yield 'class %s(genpy.Message):'%name
|
||||||
yield ' _md5sum = "%s"'%(md5sum)
|
yield ' _md5sum = "%s"'%(md5sum)
|
||||||
yield ' _type = "%s"'%(fulltype)
|
yield ' _type = "%s"'%(fulltype)
|
||||||
yield ' _has_header = %s #flag to mark the presence of a Header object'%spec.has_header()
|
yield ' _has_header = %s #flag to mark the presence of a Header object'%spec.has_header()
|
||||||
|
@ -1085,7 +1085,7 @@ def msg_generator(package, name, spec):
|
||||||
|
|
||||||
# #1807 : this will be much cleaner when msggenerator library is
|
# #1807 : this will be much cleaner when msggenerator library is
|
||||||
# rewritten to not use globals
|
# rewritten to not use globals
|
||||||
yield '_struct_I = roslib.message.struct_I'
|
yield '_struct_I = genpy.struct_I'
|
||||||
patterns = get_patterns()
|
patterns = get_patterns()
|
||||||
for p in set(patterns):
|
for p in set(patterns):
|
||||||
# I patterns are already optimized
|
# I patterns are already optimized
|
||||||
|
|
Loading…
Reference in New Issue