00001 """autogenerated by genmsg_py from GetOctomapRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class GetOctomapRequest(roslib.message.Message):
00007 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00008 _type = "octomap_ros/GetOctomapRequest"
00009 _has_header = False
00010 _full_text = """
00011
00012 """
00013 __slots__ = []
00014 _slot_types = []
00015
00016 def __init__(self, *args, **kwds):
00017 """
00018 Constructor. Any message fields that are implicitly/explicitly
00019 set to None will be assigned a default value. The recommend
00020 use is keyword arguments as this is more robust to future message
00021 changes. You cannot mix in-order arguments and keyword arguments.
00022
00023 The available fields are:
00024
00025
00026 @param args: complete set of field values, in .msg order
00027 @param kwds: use keyword arguments corresponding to message field names
00028 to set specific fields.
00029 """
00030 if args or kwds:
00031 super(GetOctomapRequest, self).__init__(*args, **kwds)
00032
00033 def _get_types(self):
00034 """
00035 internal API method
00036 """
00037 return self._slot_types
00038
00039 def serialize(self, buff):
00040 """
00041 serialize message into buffer
00042 @param buff: buffer
00043 @type buff: StringIO
00044 """
00045 try:
00046 pass
00047 except struct.error, se: self._check_types(se)
00048 except TypeError, te: self._check_types(te)
00049
00050 def deserialize(self, str):
00051 """
00052 unpack serialized message in str into this message instance
00053 @param str: byte array of serialized message
00054 @type str: str
00055 """
00056 try:
00057 end = 0
00058 return self
00059 except struct.error, e:
00060 raise roslib.message.DeserializationError(e)
00061
00062
00063 def serialize_numpy(self, buff, numpy):
00064 """
00065 serialize message with numpy array types into buffer
00066 @param buff: buffer
00067 @type buff: StringIO
00068 @param numpy: numpy python module
00069 @type numpy module
00070 """
00071 try:
00072 pass
00073 except struct.error, se: self._check_types(se)
00074 except TypeError, te: self._check_types(te)
00075
00076 def deserialize_numpy(self, str, numpy):
00077 """
00078 unpack serialized message in str into this message instance using numpy for array types
00079 @param str: byte array of serialized message
00080 @type str: str
00081 @param numpy: numpy python module
00082 @type numpy: module
00083 """
00084 try:
00085 end = 0
00086 return self
00087 except struct.error, e:
00088 raise roslib.message.DeserializationError(e)
00089
00090 _struct_I = roslib.message.struct_I
00091 """autogenerated by genmsg_py from GetOctomapResponse.msg. Do not edit."""
00092 import roslib.message
00093 import struct
00094
00095 import octomap_ros.msg
00096 import std_msgs.msg
00097
00098 class GetOctomapResponse(roslib.message.Message):
00099 _md5sum = "c74335a6bc30ba3766f4f6bcc2364be3"
00100 _type = "octomap_ros/GetOctomapResponse"
00101 _has_header = False
00102 _full_text = """octomap_ros/OctomapBinary map
00103
00104
00105 ================================================================================
00106 MSG: octomap_ros/OctomapBinary
00107 # A 3D map in binary format, as Octree
00108 Header header
00109 int8[] data
00110 ================================================================================
00111 MSG: std_msgs/Header
00112 # Standard metadata for higher-level stamped data types.
00113 # This is generally used to communicate timestamped data
00114 # in a particular coordinate frame.
00115 #
00116 # sequence ID: consecutively increasing ID
00117 uint32 seq
00118 #Two-integer timestamp that is expressed as:
00119 # * stamp.secs: seconds (stamp_secs) since epoch
00120 # * stamp.nsecs: nanoseconds since stamp_secs
00121 # time-handling sugar is provided by the client library
00122 time stamp
00123 #Frame this data is associated with
00124 # 0: no frame
00125 # 1: global frame
00126 string frame_id
00127
00128 """
00129 __slots__ = ['map']
00130 _slot_types = ['octomap_ros/OctomapBinary']
00131
00132 def __init__(self, *args, **kwds):
00133 """
00134 Constructor. Any message fields that are implicitly/explicitly
00135 set to None will be assigned a default value. The recommend
00136 use is keyword arguments as this is more robust to future message
00137 changes. You cannot mix in-order arguments and keyword arguments.
00138
00139 The available fields are:
00140 map
00141
00142 @param args: complete set of field values, in .msg order
00143 @param kwds: use keyword arguments corresponding to message field names
00144 to set specific fields.
00145 """
00146 if args or kwds:
00147 super(GetOctomapResponse, self).__init__(*args, **kwds)
00148
00149 if self.map is None:
00150 self.map = octomap_ros.msg.OctomapBinary()
00151 else:
00152 self.map = octomap_ros.msg.OctomapBinary()
00153
00154 def _get_types(self):
00155 """
00156 internal API method
00157 """
00158 return self._slot_types
00159
00160 def serialize(self, buff):
00161 """
00162 serialize message into buffer
00163 @param buff: buffer
00164 @type buff: StringIO
00165 """
00166 try:
00167 _x = self
00168 buff.write(_struct_3I.pack(_x.map.header.seq, _x.map.header.stamp.secs, _x.map.header.stamp.nsecs))
00169 _x = self.map.header.frame_id
00170 length = len(_x)
00171 buff.write(struct.pack('<I%ss'%length, length, _x))
00172 length = len(self.map.data)
00173 buff.write(_struct_I.pack(length))
00174 pattern = '<%sb'%length
00175 buff.write(struct.pack(pattern, *self.map.data))
00176 except struct.error, se: self._check_types(se)
00177 except TypeError, te: self._check_types(te)
00178
00179 def deserialize(self, str):
00180 """
00181 unpack serialized message in str into this message instance
00182 @param str: byte array of serialized message
00183 @type str: str
00184 """
00185 try:
00186 if self.map is None:
00187 self.map = octomap_ros.msg.OctomapBinary()
00188 end = 0
00189 _x = self
00190 start = end
00191 end += 12
00192 (_x.map.header.seq, _x.map.header.stamp.secs, _x.map.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00193 start = end
00194 end += 4
00195 (length,) = _struct_I.unpack(str[start:end])
00196 start = end
00197 end += length
00198 self.map.header.frame_id = str[start:end]
00199 start = end
00200 end += 4
00201 (length,) = _struct_I.unpack(str[start:end])
00202 pattern = '<%sb'%length
00203 start = end
00204 end += struct.calcsize(pattern)
00205 self.map.data = struct.unpack(pattern, str[start:end])
00206 return self
00207 except struct.error, e:
00208 raise roslib.message.DeserializationError(e)
00209
00210
00211 def serialize_numpy(self, buff, numpy):
00212 """
00213 serialize message with numpy array types into buffer
00214 @param buff: buffer
00215 @type buff: StringIO
00216 @param numpy: numpy python module
00217 @type numpy module
00218 """
00219 try:
00220 _x = self
00221 buff.write(_struct_3I.pack(_x.map.header.seq, _x.map.header.stamp.secs, _x.map.header.stamp.nsecs))
00222 _x = self.map.header.frame_id
00223 length = len(_x)
00224 buff.write(struct.pack('<I%ss'%length, length, _x))
00225 length = len(self.map.data)
00226 buff.write(_struct_I.pack(length))
00227 pattern = '<%sb'%length
00228 buff.write(self.map.data.tostring())
00229 except struct.error, se: self._check_types(se)
00230 except TypeError, te: self._check_types(te)
00231
00232 def deserialize_numpy(self, str, numpy):
00233 """
00234 unpack serialized message in str into this message instance using numpy for array types
00235 @param str: byte array of serialized message
00236 @type str: str
00237 @param numpy: numpy python module
00238 @type numpy: module
00239 """
00240 try:
00241 if self.map is None:
00242 self.map = octomap_ros.msg.OctomapBinary()
00243 end = 0
00244 _x = self
00245 start = end
00246 end += 12
00247 (_x.map.header.seq, _x.map.header.stamp.secs, _x.map.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00248 start = end
00249 end += 4
00250 (length,) = _struct_I.unpack(str[start:end])
00251 start = end
00252 end += length
00253 self.map.header.frame_id = str[start:end]
00254 start = end
00255 end += 4
00256 (length,) = _struct_I.unpack(str[start:end])
00257 pattern = '<%sb'%length
00258 start = end
00259 end += struct.calcsize(pattern)
00260 self.map.data = numpy.frombuffer(str[start:end], dtype=numpy.int8, count=length)
00261 return self
00262 except struct.error, e:
00263 raise roslib.message.DeserializationError(e)
00264
00265 _struct_I = roslib.message.struct_I
00266 _struct_3I = struct.Struct("<3I")
00267 class GetOctomap(roslib.message.ServiceDefinition):
00268 _type = 'octomap_ros/GetOctomap'
00269 _md5sum = 'c74335a6bc30ba3766f4f6bcc2364be3'
00270 _request_class = GetOctomapRequest
00271 _response_class = GetOctomapResponse