00001 """autogenerated by genmsg_py from EstimateRectRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006 import std_msgs.msg
00007
00008 class EstimateRectRequest(roslib.message.Message):
00009 _md5sum = "31a7fdbfddebf50fd786f2a40634cfaf"
00010 _type = "srs_env_model_percp/EstimateRectRequest"
00011 _has_header = True
00012 _full_text = """
00013
00014
00015 Header header
00016
00017
00018 geometry_msgs/Pose pose
00019
00020
00021
00022 geometry_msgs/Vector3 scale
00023
00024 ================================================================================
00025 MSG: std_msgs/Header
00026 # Standard metadata for higher-level stamped data types.
00027 # This is generally used to communicate timestamped data
00028 # in a particular coordinate frame.
00029 #
00030 # sequence ID: consecutively increasing ID
00031 uint32 seq
00032 #Two-integer timestamp that is expressed as:
00033 # * stamp.secs: seconds (stamp_secs) since epoch
00034 # * stamp.nsecs: nanoseconds since stamp_secs
00035 # time-handling sugar is provided by the client library
00036 time stamp
00037 #Frame this data is associated with
00038 # 0: no frame
00039 # 1: global frame
00040 string frame_id
00041
00042 ================================================================================
00043 MSG: geometry_msgs/Pose
00044 # A representation of pose in free space, composed of postion and orientation.
00045 Point position
00046 Quaternion orientation
00047
00048 ================================================================================
00049 MSG: geometry_msgs/Point
00050 # This contains the position of a point in free space
00051 float64 x
00052 float64 y
00053 float64 z
00054
00055 ================================================================================
00056 MSG: geometry_msgs/Quaternion
00057 # This represents an orientation in free space in quaternion form.
00058
00059 float64 x
00060 float64 y
00061 float64 z
00062 float64 w
00063
00064 ================================================================================
00065 MSG: geometry_msgs/Vector3
00066 # This represents a vector in free space.
00067
00068 float64 x
00069 float64 y
00070 float64 z
00071 """
00072 __slots__ = ['header','pose','scale']
00073 _slot_types = ['Header','geometry_msgs/Pose','geometry_msgs/Vector3']
00074
00075 def __init__(self, *args, **kwds):
00076 """
00077 Constructor. Any message fields that are implicitly/explicitly
00078 set to None will be assigned a default value. The recommend
00079 use is keyword arguments as this is more robust to future message
00080 changes. You cannot mix in-order arguments and keyword arguments.
00081
00082 The available fields are:
00083 header,pose,scale
00084
00085 @param args: complete set of field values, in .msg order
00086 @param kwds: use keyword arguments corresponding to message field names
00087 to set specific fields.
00088 """
00089 if args or kwds:
00090 super(EstimateRectRequest, self).__init__(*args, **kwds)
00091
00092 if self.header is None:
00093 self.header = std_msgs.msg._Header.Header()
00094 if self.pose is None:
00095 self.pose = geometry_msgs.msg.Pose()
00096 if self.scale is None:
00097 self.scale = geometry_msgs.msg.Vector3()
00098 else:
00099 self.header = std_msgs.msg._Header.Header()
00100 self.pose = geometry_msgs.msg.Pose()
00101 self.scale = geometry_msgs.msg.Vector3()
00102
00103 def _get_types(self):
00104 """
00105 internal API method
00106 """
00107 return self._slot_types
00108
00109 def serialize(self, buff):
00110 """
00111 serialize message into buffer
00112 @param buff: buffer
00113 @type buff: StringIO
00114 """
00115 try:
00116 _x = self
00117 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00118 _x = self.header.frame_id
00119 length = len(_x)
00120 buff.write(struct.pack('<I%ss'%length, length, _x))
00121 _x = self
00122 buff.write(_struct_10d.pack(_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.scale.x, _x.scale.y, _x.scale.z))
00123 except struct.error as se: self._check_types(se)
00124 except TypeError as te: self._check_types(te)
00125
00126 def deserialize(self, str):
00127 """
00128 unpack serialized message in str into this message instance
00129 @param str: byte array of serialized message
00130 @type str: str
00131 """
00132 try:
00133 if self.header is None:
00134 self.header = std_msgs.msg._Header.Header()
00135 if self.pose is None:
00136 self.pose = geometry_msgs.msg.Pose()
00137 if self.scale is None:
00138 self.scale = geometry_msgs.msg.Vector3()
00139 end = 0
00140 _x = self
00141 start = end
00142 end += 12
00143 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00144 start = end
00145 end += 4
00146 (length,) = _struct_I.unpack(str[start:end])
00147 start = end
00148 end += length
00149 self.header.frame_id = str[start:end]
00150 _x = self
00151 start = end
00152 end += 80
00153 (_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.scale.x, _x.scale.y, _x.scale.z,) = _struct_10d.unpack(str[start:end])
00154 return self
00155 except struct.error as e:
00156 raise roslib.message.DeserializationError(e)
00157
00158
00159 def serialize_numpy(self, buff, numpy):
00160 """
00161 serialize message with numpy array types into buffer
00162 @param buff: buffer
00163 @type buff: StringIO
00164 @param numpy: numpy python module
00165 @type numpy module
00166 """
00167 try:
00168 _x = self
00169 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00170 _x = self.header.frame_id
00171 length = len(_x)
00172 buff.write(struct.pack('<I%ss'%length, length, _x))
00173 _x = self
00174 buff.write(_struct_10d.pack(_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.scale.x, _x.scale.y, _x.scale.z))
00175 except struct.error as se: self._check_types(se)
00176 except TypeError as te: self._check_types(te)
00177
00178 def deserialize_numpy(self, str, numpy):
00179 """
00180 unpack serialized message in str into this message instance using numpy for array types
00181 @param str: byte array of serialized message
00182 @type str: str
00183 @param numpy: numpy python module
00184 @type numpy: module
00185 """
00186 try:
00187 if self.header is None:
00188 self.header = std_msgs.msg._Header.Header()
00189 if self.pose is None:
00190 self.pose = geometry_msgs.msg.Pose()
00191 if self.scale is None:
00192 self.scale = geometry_msgs.msg.Vector3()
00193 end = 0
00194 _x = self
00195 start = end
00196 end += 12
00197 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00198 start = end
00199 end += 4
00200 (length,) = _struct_I.unpack(str[start:end])
00201 start = end
00202 end += length
00203 self.header.frame_id = str[start:end]
00204 _x = self
00205 start = end
00206 end += 80
00207 (_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.scale.x, _x.scale.y, _x.scale.z,) = _struct_10d.unpack(str[start:end])
00208 return self
00209 except struct.error as e:
00210 raise roslib.message.DeserializationError(e)
00211
00212 _struct_I = roslib.message.struct_I
00213 _struct_3I = struct.Struct("<3I")
00214 _struct_10d = struct.Struct("<10d")
00215 """autogenerated by genmsg_py from EstimateRectResponse.msg. Do not edit."""
00216 import roslib.message
00217 import struct
00218
00219
00220 class EstimateRectResponse(roslib.message.Message):
00221 _md5sum = "363df5631fa30ccd790dae289b1dbcc0"
00222 _type = "srs_env_model_percp/EstimateRectResponse"
00223 _has_header = False
00224 _full_text = """
00225
00226
00227
00228
00229
00230 int16[2] p1
00231 int16[2] p2
00232
00233
00234
00235 """
00236 __slots__ = ['p1','p2']
00237 _slot_types = ['int16[2]','int16[2]']
00238
00239 def __init__(self, *args, **kwds):
00240 """
00241 Constructor. Any message fields that are implicitly/explicitly
00242 set to None will be assigned a default value. The recommend
00243 use is keyword arguments as this is more robust to future message
00244 changes. You cannot mix in-order arguments and keyword arguments.
00245
00246 The available fields are:
00247 p1,p2
00248
00249 @param args: complete set of field values, in .msg order
00250 @param kwds: use keyword arguments corresponding to message field names
00251 to set specific fields.
00252 """
00253 if args or kwds:
00254 super(EstimateRectResponse, self).__init__(*args, **kwds)
00255
00256 if self.p1 is None:
00257 self.p1 = [0,0]
00258 if self.p2 is None:
00259 self.p2 = [0,0]
00260 else:
00261 self.p1 = [0,0]
00262 self.p2 = [0,0]
00263
00264 def _get_types(self):
00265 """
00266 internal API method
00267 """
00268 return self._slot_types
00269
00270 def serialize(self, buff):
00271 """
00272 serialize message into buffer
00273 @param buff: buffer
00274 @type buff: StringIO
00275 """
00276 try:
00277 buff.write(_struct_2h.pack(*self.p1))
00278 buff.write(_struct_2h.pack(*self.p2))
00279 except struct.error as se: self._check_types(se)
00280 except TypeError as te: self._check_types(te)
00281
00282 def deserialize(self, str):
00283 """
00284 unpack serialized message in str into this message instance
00285 @param str: byte array of serialized message
00286 @type str: str
00287 """
00288 try:
00289 end = 0
00290 start = end
00291 end += 4
00292 self.p1 = _struct_2h.unpack(str[start:end])
00293 start = end
00294 end += 4
00295 self.p2 = _struct_2h.unpack(str[start:end])
00296 return self
00297 except struct.error as e:
00298 raise roslib.message.DeserializationError(e)
00299
00300
00301 def serialize_numpy(self, buff, numpy):
00302 """
00303 serialize message with numpy array types into buffer
00304 @param buff: buffer
00305 @type buff: StringIO
00306 @param numpy: numpy python module
00307 @type numpy module
00308 """
00309 try:
00310 buff.write(self.p1.tostring())
00311 buff.write(self.p2.tostring())
00312 except struct.error as se: self._check_types(se)
00313 except TypeError as te: self._check_types(te)
00314
00315 def deserialize_numpy(self, str, numpy):
00316 """
00317 unpack serialized message in str into this message instance using numpy for array types
00318 @param str: byte array of serialized message
00319 @type str: str
00320 @param numpy: numpy python module
00321 @type numpy: module
00322 """
00323 try:
00324 end = 0
00325 start = end
00326 end += 4
00327 self.p1 = numpy.frombuffer(str[start:end], dtype=numpy.int16, count=2)
00328 start = end
00329 end += 4
00330 self.p2 = numpy.frombuffer(str[start:end], dtype=numpy.int16, count=2)
00331 return self
00332 except struct.error as e:
00333 raise roslib.message.DeserializationError(e)
00334
00335 _struct_I = roslib.message.struct_I
00336 _struct_2h = struct.Struct("<2h")
00337 class EstimateRect(roslib.message.ServiceDefinition):
00338 _type = 'srs_env_model_percp/EstimateRect'
00339 _md5sum = 'ee0e40834f1493b479da3ca18fa40bb6'
00340 _request_class = EstimateRectRequest
00341 _response_class = EstimateRectResponse