$search
00001 """autogenerated by genmsg_py from BuildCloudAngleRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class BuildCloudAngleRequest(roslib.message.Message): 00007 _md5sum = "f30b95de7b6756e5f67b5d49f4f7affd" 00008 _type = "pr2_arm_navigation_perception/BuildCloudAngleRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """float64 angle_begin 00011 float64 angle_end 00012 float64 duration 00013 00014 """ 00015 __slots__ = ['angle_begin','angle_end','duration'] 00016 _slot_types = ['float64','float64','float64'] 00017 00018 def __init__(self, *args, **kwds): 00019 """ 00020 Constructor. Any message fields that are implicitly/explicitly 00021 set to None will be assigned a default value. The recommend 00022 use is keyword arguments as this is more robust to future message 00023 changes. You cannot mix in-order arguments and keyword arguments. 00024 00025 The available fields are: 00026 angle_begin,angle_end,duration 00027 00028 @param args: complete set of field values, in .msg order 00029 @param kwds: use keyword arguments corresponding to message field names 00030 to set specific fields. 00031 """ 00032 if args or kwds: 00033 super(BuildCloudAngleRequest, self).__init__(*args, **kwds) 00034 #message fields cannot be None, assign default values for those that are 00035 if self.angle_begin is None: 00036 self.angle_begin = 0. 00037 if self.angle_end is None: 00038 self.angle_end = 0. 00039 if self.duration is None: 00040 self.duration = 0. 00041 else: 00042 self.angle_begin = 0. 00043 self.angle_end = 0. 00044 self.duration = 0. 00045 00046 def _get_types(self): 00047 """ 00048 internal API method 00049 """ 00050 return self._slot_types 00051 00052 def serialize(self, buff): 00053 """ 00054 serialize message into buffer 00055 @param buff: buffer 00056 @type buff: StringIO 00057 """ 00058 try: 00059 _x = self 00060 buff.write(_struct_3d.pack(_x.angle_begin, _x.angle_end, _x.duration)) 00061 except struct.error as se: self._check_types(se) 00062 except TypeError as te: self._check_types(te) 00063 00064 def deserialize(self, str): 00065 """ 00066 unpack serialized message in str into this message instance 00067 @param str: byte array of serialized message 00068 @type str: str 00069 """ 00070 try: 00071 end = 0 00072 _x = self 00073 start = end 00074 end += 24 00075 (_x.angle_begin, _x.angle_end, _x.duration,) = _struct_3d.unpack(str[start:end]) 00076 return self 00077 except struct.error as e: 00078 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00079 00080 00081 def serialize_numpy(self, buff, numpy): 00082 """ 00083 serialize message with numpy array types into buffer 00084 @param buff: buffer 00085 @type buff: StringIO 00086 @param numpy: numpy python module 00087 @type numpy module 00088 """ 00089 try: 00090 _x = self 00091 buff.write(_struct_3d.pack(_x.angle_begin, _x.angle_end, _x.duration)) 00092 except struct.error as se: self._check_types(se) 00093 except TypeError as te: self._check_types(te) 00094 00095 def deserialize_numpy(self, str, numpy): 00096 """ 00097 unpack serialized message in str into this message instance using numpy for array types 00098 @param str: byte array of serialized message 00099 @type str: str 00100 @param numpy: numpy python module 00101 @type numpy: module 00102 """ 00103 try: 00104 end = 0 00105 _x = self 00106 start = end 00107 end += 24 00108 (_x.angle_begin, _x.angle_end, _x.duration,) = _struct_3d.unpack(str[start:end]) 00109 return self 00110 except struct.error as e: 00111 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00112 00113 _struct_I = roslib.message.struct_I 00114 _struct_3d = struct.Struct("<3d") 00115 """autogenerated by genmsg_py from BuildCloudAngleResponse.msg. Do not edit.""" 00116 import roslib.message 00117 import struct 00118 00119 import geometry_msgs.msg 00120 import std_msgs.msg 00121 import sensor_msgs.msg 00122 00123 class BuildCloudAngleResponse(roslib.message.Message): 00124 _md5sum = "4217b28a903e4ad7869a83b3653110ff" 00125 _type = "pr2_arm_navigation_perception/BuildCloudAngleResponse" 00126 _has_header = False #flag to mark the presence of a Header object 00127 _full_text = """sensor_msgs/PointCloud cloud 00128 00129 00130 ================================================================================ 00131 MSG: sensor_msgs/PointCloud 00132 # This message holds a collection of 3d points, plus optional additional 00133 # information about each point. 00134 00135 # Time of sensor data acquisition, coordinate frame ID. 00136 Header header 00137 00138 # Array of 3d points. Each Point32 should be interpreted as a 3d point 00139 # in the frame given in the header. 00140 geometry_msgs/Point32[] points 00141 00142 # Each channel should have the same number of elements as points array, 00143 # and the data in each channel should correspond 1:1 with each point. 00144 # Channel names in common practice are listed in ChannelFloat32.msg. 00145 ChannelFloat32[] channels 00146 00147 ================================================================================ 00148 MSG: std_msgs/Header 00149 # Standard metadata for higher-level stamped data types. 00150 # This is generally used to communicate timestamped data 00151 # in a particular coordinate frame. 00152 # 00153 # sequence ID: consecutively increasing ID 00154 uint32 seq 00155 #Two-integer timestamp that is expressed as: 00156 # * stamp.secs: seconds (stamp_secs) since epoch 00157 # * stamp.nsecs: nanoseconds since stamp_secs 00158 # time-handling sugar is provided by the client library 00159 time stamp 00160 #Frame this data is associated with 00161 # 0: no frame 00162 # 1: global frame 00163 string frame_id 00164 00165 ================================================================================ 00166 MSG: geometry_msgs/Point32 00167 # This contains the position of a point in free space(with 32 bits of precision). 00168 # It is recommeded to use Point wherever possible instead of Point32. 00169 # 00170 # This recommendation is to promote interoperability. 00171 # 00172 # This message is designed to take up less space when sending 00173 # lots of points at once, as in the case of a PointCloud. 00174 00175 float32 x 00176 float32 y 00177 float32 z 00178 ================================================================================ 00179 MSG: sensor_msgs/ChannelFloat32 00180 # This message is used by the PointCloud message to hold optional data 00181 # associated with each point in the cloud. The length of the values 00182 # array should be the same as the length of the points array in the 00183 # PointCloud, and each value should be associated with the corresponding 00184 # point. 00185 00186 # Channel names in existing practice include: 00187 # "u", "v" - row and column (respectively) in the left stereo image. 00188 # This is opposite to usual conventions but remains for 00189 # historical reasons. The newer PointCloud2 message has no 00190 # such problem. 00191 # "rgb" - For point clouds produced by color stereo cameras. uint8 00192 # (R,G,B) values packed into the least significant 24 bits, 00193 # in order. 00194 # "intensity" - laser or pixel intensity. 00195 # "distance" 00196 00197 # The channel name should give semantics of the channel (e.g. 00198 # "intensity" instead of "value"). 00199 string name 00200 00201 # The values array should be 1-1 with the elements of the associated 00202 # PointCloud. 00203 float32[] values 00204 00205 """ 00206 __slots__ = ['cloud'] 00207 _slot_types = ['sensor_msgs/PointCloud'] 00208 00209 def __init__(self, *args, **kwds): 00210 """ 00211 Constructor. Any message fields that are implicitly/explicitly 00212 set to None will be assigned a default value. The recommend 00213 use is keyword arguments as this is more robust to future message 00214 changes. You cannot mix in-order arguments and keyword arguments. 00215 00216 The available fields are: 00217 cloud 00218 00219 @param args: complete set of field values, in .msg order 00220 @param kwds: use keyword arguments corresponding to message field names 00221 to set specific fields. 00222 """ 00223 if args or kwds: 00224 super(BuildCloudAngleResponse, self).__init__(*args, **kwds) 00225 #message fields cannot be None, assign default values for those that are 00226 if self.cloud is None: 00227 self.cloud = sensor_msgs.msg.PointCloud() 00228 else: 00229 self.cloud = sensor_msgs.msg.PointCloud() 00230 00231 def _get_types(self): 00232 """ 00233 internal API method 00234 """ 00235 return self._slot_types 00236 00237 def serialize(self, buff): 00238 """ 00239 serialize message into buffer 00240 @param buff: buffer 00241 @type buff: StringIO 00242 """ 00243 try: 00244 _x = self 00245 buff.write(_struct_3I.pack(_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs)) 00246 _x = self.cloud.header.frame_id 00247 length = len(_x) 00248 buff.write(struct.pack('<I%ss'%length, length, _x)) 00249 length = len(self.cloud.points) 00250 buff.write(_struct_I.pack(length)) 00251 for val1 in self.cloud.points: 00252 _x = val1 00253 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00254 length = len(self.cloud.channels) 00255 buff.write(_struct_I.pack(length)) 00256 for val1 in self.cloud.channels: 00257 _x = val1.name 00258 length = len(_x) 00259 buff.write(struct.pack('<I%ss'%length, length, _x)) 00260 length = len(val1.values) 00261 buff.write(_struct_I.pack(length)) 00262 pattern = '<%sf'%length 00263 buff.write(struct.pack(pattern, *val1.values)) 00264 except struct.error as se: self._check_types(se) 00265 except TypeError as te: self._check_types(te) 00266 00267 def deserialize(self, str): 00268 """ 00269 unpack serialized message in str into this message instance 00270 @param str: byte array of serialized message 00271 @type str: str 00272 """ 00273 try: 00274 if self.cloud is None: 00275 self.cloud = sensor_msgs.msg.PointCloud() 00276 end = 0 00277 _x = self 00278 start = end 00279 end += 12 00280 (_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00281 start = end 00282 end += 4 00283 (length,) = _struct_I.unpack(str[start:end]) 00284 start = end 00285 end += length 00286 self.cloud.header.frame_id = str[start:end] 00287 start = end 00288 end += 4 00289 (length,) = _struct_I.unpack(str[start:end]) 00290 self.cloud.points = [] 00291 for i in range(0, length): 00292 val1 = geometry_msgs.msg.Point32() 00293 _x = val1 00294 start = end 00295 end += 12 00296 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00297 self.cloud.points.append(val1) 00298 start = end 00299 end += 4 00300 (length,) = _struct_I.unpack(str[start:end]) 00301 self.cloud.channels = [] 00302 for i in range(0, length): 00303 val1 = sensor_msgs.msg.ChannelFloat32() 00304 start = end 00305 end += 4 00306 (length,) = _struct_I.unpack(str[start:end]) 00307 start = end 00308 end += length 00309 val1.name = str[start:end] 00310 start = end 00311 end += 4 00312 (length,) = _struct_I.unpack(str[start:end]) 00313 pattern = '<%sf'%length 00314 start = end 00315 end += struct.calcsize(pattern) 00316 val1.values = struct.unpack(pattern, str[start:end]) 00317 self.cloud.channels.append(val1) 00318 return self 00319 except struct.error as e: 00320 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00321 00322 00323 def serialize_numpy(self, buff, numpy): 00324 """ 00325 serialize message with numpy array types into buffer 00326 @param buff: buffer 00327 @type buff: StringIO 00328 @param numpy: numpy python module 00329 @type numpy module 00330 """ 00331 try: 00332 _x = self 00333 buff.write(_struct_3I.pack(_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs)) 00334 _x = self.cloud.header.frame_id 00335 length = len(_x) 00336 buff.write(struct.pack('<I%ss'%length, length, _x)) 00337 length = len(self.cloud.points) 00338 buff.write(_struct_I.pack(length)) 00339 for val1 in self.cloud.points: 00340 _x = val1 00341 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00342 length = len(self.cloud.channels) 00343 buff.write(_struct_I.pack(length)) 00344 for val1 in self.cloud.channels: 00345 _x = val1.name 00346 length = len(_x) 00347 buff.write(struct.pack('<I%ss'%length, length, _x)) 00348 length = len(val1.values) 00349 buff.write(_struct_I.pack(length)) 00350 pattern = '<%sf'%length 00351 buff.write(val1.values.tostring()) 00352 except struct.error as se: self._check_types(se) 00353 except TypeError as te: self._check_types(te) 00354 00355 def deserialize_numpy(self, str, numpy): 00356 """ 00357 unpack serialized message in str into this message instance using numpy for array types 00358 @param str: byte array of serialized message 00359 @type str: str 00360 @param numpy: numpy python module 00361 @type numpy: module 00362 """ 00363 try: 00364 if self.cloud is None: 00365 self.cloud = sensor_msgs.msg.PointCloud() 00366 end = 0 00367 _x = self 00368 start = end 00369 end += 12 00370 (_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00371 start = end 00372 end += 4 00373 (length,) = _struct_I.unpack(str[start:end]) 00374 start = end 00375 end += length 00376 self.cloud.header.frame_id = str[start:end] 00377 start = end 00378 end += 4 00379 (length,) = _struct_I.unpack(str[start:end]) 00380 self.cloud.points = [] 00381 for i in range(0, length): 00382 val1 = geometry_msgs.msg.Point32() 00383 _x = val1 00384 start = end 00385 end += 12 00386 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00387 self.cloud.points.append(val1) 00388 start = end 00389 end += 4 00390 (length,) = _struct_I.unpack(str[start:end]) 00391 self.cloud.channels = [] 00392 for i in range(0, length): 00393 val1 = sensor_msgs.msg.ChannelFloat32() 00394 start = end 00395 end += 4 00396 (length,) = _struct_I.unpack(str[start:end]) 00397 start = end 00398 end += length 00399 val1.name = str[start:end] 00400 start = end 00401 end += 4 00402 (length,) = _struct_I.unpack(str[start:end]) 00403 pattern = '<%sf'%length 00404 start = end 00405 end += struct.calcsize(pattern) 00406 val1.values = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00407 self.cloud.channels.append(val1) 00408 return self 00409 except struct.error as e: 00410 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00411 00412 _struct_I = roslib.message.struct_I 00413 _struct_3I = struct.Struct("<3I") 00414 _struct_3f = struct.Struct("<3f") 00415 class BuildCloudAngle(roslib.message.ServiceDefinition): 00416 _type = 'pr2_arm_navigation_perception/BuildCloudAngle' 00417 _md5sum = '7469d22e99d2e7f342cec297b7bb49d3' 00418 _request_class = BuildCloudAngleRequest 00419 _response_class = BuildCloudAngleResponse