$search
00001 """autogenerated by genmsg_py from OccupancyPointQueryRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 00007 class OccupancyPointQueryRequest(roslib.message.Message): 00008 _md5sum = "a7c84ff13976aa04656e56e300124444" 00009 _type = "collider/OccupancyPointQueryRequest" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """geometry_msgs/Point point 00012 00013 ================================================================================ 00014 MSG: geometry_msgs/Point 00015 # This contains the position of a point in free space 00016 float64 x 00017 float64 y 00018 float64 z 00019 00020 """ 00021 __slots__ = ['point'] 00022 _slot_types = ['geometry_msgs/Point'] 00023 00024 def __init__(self, *args, **kwds): 00025 """ 00026 Constructor. Any message fields that are implicitly/explicitly 00027 set to None will be assigned a default value. The recommend 00028 use is keyword arguments as this is more robust to future message 00029 changes. You cannot mix in-order arguments and keyword arguments. 00030 00031 The available fields are: 00032 point 00033 00034 @param args: complete set of field values, in .msg order 00035 @param kwds: use keyword arguments corresponding to message field names 00036 to set specific fields. 00037 """ 00038 if args or kwds: 00039 super(OccupancyPointQueryRequest, self).__init__(*args, **kwds) 00040 #message fields cannot be None, assign default values for those that are 00041 if self.point is None: 00042 self.point = geometry_msgs.msg.Point() 00043 else: 00044 self.point = geometry_msgs.msg.Point() 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.point.x, _x.point.y, _x.point.z)) 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 if self.point is None: 00072 self.point = geometry_msgs.msg.Point() 00073 end = 0 00074 _x = self 00075 start = end 00076 end += 24 00077 (_x.point.x, _x.point.y, _x.point.z,) = _struct_3d.unpack(str[start:end]) 00078 return self 00079 except struct.error as e: 00080 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00081 00082 00083 def serialize_numpy(self, buff, numpy): 00084 """ 00085 serialize message with numpy array types into buffer 00086 @param buff: buffer 00087 @type buff: StringIO 00088 @param numpy: numpy python module 00089 @type numpy module 00090 """ 00091 try: 00092 _x = self 00093 buff.write(_struct_3d.pack(_x.point.x, _x.point.y, _x.point.z)) 00094 except struct.error as se: self._check_types(se) 00095 except TypeError as te: self._check_types(te) 00096 00097 def deserialize_numpy(self, str, numpy): 00098 """ 00099 unpack serialized message in str into this message instance using numpy for array types 00100 @param str: byte array of serialized message 00101 @type str: str 00102 @param numpy: numpy python module 00103 @type numpy: module 00104 """ 00105 try: 00106 if self.point is None: 00107 self.point = geometry_msgs.msg.Point() 00108 end = 0 00109 _x = self 00110 start = end 00111 end += 24 00112 (_x.point.x, _x.point.y, _x.point.z,) = _struct_3d.unpack(str[start:end]) 00113 return self 00114 except struct.error as e: 00115 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00116 00117 _struct_I = roslib.message.struct_I 00118 _struct_3d = struct.Struct("<3d") 00119 """autogenerated by genmsg_py from OccupancyPointQueryResponse.msg. Do not edit.""" 00120 import roslib.message 00121 import struct 00122 00123 00124 class OccupancyPointQueryResponse(roslib.message.Message): 00125 _md5sum = "b10186e2fea5f7a6d94365e03877eda8" 00126 _type = "collider/OccupancyPointQueryResponse" 00127 _has_header = False #flag to mark the presence of a Header object 00128 _full_text = """int8 occupancy 00129 int8 FREE=0 00130 int8 OCCUPIED=1 00131 int8 UNKNOWN=-1 00132 00133 """ 00134 # Pseudo-constants 00135 FREE = 0 00136 OCCUPIED = 1 00137 UNKNOWN = -1 00138 00139 __slots__ = ['occupancy'] 00140 _slot_types = ['int8'] 00141 00142 def __init__(self, *args, **kwds): 00143 """ 00144 Constructor. Any message fields that are implicitly/explicitly 00145 set to None will be assigned a default value. The recommend 00146 use is keyword arguments as this is more robust to future message 00147 changes. You cannot mix in-order arguments and keyword arguments. 00148 00149 The available fields are: 00150 occupancy 00151 00152 @param args: complete set of field values, in .msg order 00153 @param kwds: use keyword arguments corresponding to message field names 00154 to set specific fields. 00155 """ 00156 if args or kwds: 00157 super(OccupancyPointQueryResponse, self).__init__(*args, **kwds) 00158 #message fields cannot be None, assign default values for those that are 00159 if self.occupancy is None: 00160 self.occupancy = 0 00161 else: 00162 self.occupancy = 0 00163 00164 def _get_types(self): 00165 """ 00166 internal API method 00167 """ 00168 return self._slot_types 00169 00170 def serialize(self, buff): 00171 """ 00172 serialize message into buffer 00173 @param buff: buffer 00174 @type buff: StringIO 00175 """ 00176 try: 00177 buff.write(_struct_b.pack(self.occupancy)) 00178 except struct.error as se: self._check_types(se) 00179 except TypeError as te: self._check_types(te) 00180 00181 def deserialize(self, str): 00182 """ 00183 unpack serialized message in str into this message instance 00184 @param str: byte array of serialized message 00185 @type str: str 00186 """ 00187 try: 00188 end = 0 00189 start = end 00190 end += 1 00191 (self.occupancy,) = _struct_b.unpack(str[start:end]) 00192 return self 00193 except struct.error as e: 00194 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00195 00196 00197 def serialize_numpy(self, buff, numpy): 00198 """ 00199 serialize message with numpy array types into buffer 00200 @param buff: buffer 00201 @type buff: StringIO 00202 @param numpy: numpy python module 00203 @type numpy module 00204 """ 00205 try: 00206 buff.write(_struct_b.pack(self.occupancy)) 00207 except struct.error as se: self._check_types(se) 00208 except TypeError as te: self._check_types(te) 00209 00210 def deserialize_numpy(self, str, numpy): 00211 """ 00212 unpack serialized message in str into this message instance using numpy for array types 00213 @param str: byte array of serialized message 00214 @type str: str 00215 @param numpy: numpy python module 00216 @type numpy: module 00217 """ 00218 try: 00219 end = 0 00220 start = end 00221 end += 1 00222 (self.occupancy,) = _struct_b.unpack(str[start:end]) 00223 return self 00224 except struct.error as e: 00225 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00226 00227 _struct_I = roslib.message.struct_I 00228 _struct_b = struct.Struct("<b") 00229 class OccupancyPointQuery(roslib.message.ServiceDefinition): 00230 _type = 'collider/OccupancyPointQuery' 00231 _md5sum = 'f4c9050c6f07f91707c922160a0acfb9' 00232 _request_class = OccupancyPointQueryRequest 00233 _response_class = OccupancyPointQueryResponse