00001 """autogenerated by genpy from srs_symbolic_grounding/SymbolGroundingGraspBaseRegionRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import geometry_msgs.msg
00008 import srs_msgs.msg
00009
00010 class SymbolGroundingGraspBaseRegionRequest(genpy.Message):
00011 _md5sum = "929217c873801a8d83a0ef0a0ff55374"
00012 _type = "srs_symbolic_grounding/SymbolGroundingGraspBaseRegionRequest"
00013 _has_header = False
00014 _full_text = """geometry_msgs/Pose target_obj_pose
00015
00016
00017 srs_msgs/SRSSpatialInfo parent_obj_geometry
00018 srs_msgs/SRSSpatialInfo[] furniture_geometry_list
00019
00020 ================================================================================
00021 MSG: geometry_msgs/Pose
00022 # A representation of pose in free space, composed of postion and orientation.
00023 Point position
00024 Quaternion orientation
00025
00026 ================================================================================
00027 MSG: geometry_msgs/Point
00028 # This contains the position of a point in free space
00029 float64 x
00030 float64 y
00031 float64 z
00032
00033 ================================================================================
00034 MSG: geometry_msgs/Quaternion
00035 # This represents an orientation in free space in quaternion form.
00036
00037 float64 x
00038 float64 y
00039 float64 z
00040 float64 w
00041
00042 ================================================================================
00043 MSG: srs_msgs/SRSSpatialInfo
00044 # Point point
00045 # Orientation angles
00046 float32 l
00047 float32 w
00048 float32 h
00049
00050 geometry_msgs/Pose pose
00051
00052 """
00053 __slots__ = ['target_obj_pose','parent_obj_geometry','furniture_geometry_list']
00054 _slot_types = ['geometry_msgs/Pose','srs_msgs/SRSSpatialInfo','srs_msgs/SRSSpatialInfo[]']
00055
00056 def __init__(self, *args, **kwds):
00057 """
00058 Constructor. Any message fields that are implicitly/explicitly
00059 set to None will be assigned a default value. The recommend
00060 use is keyword arguments as this is more robust to future message
00061 changes. You cannot mix in-order arguments and keyword arguments.
00062
00063 The available fields are:
00064 target_obj_pose,parent_obj_geometry,furniture_geometry_list
00065
00066 :param args: complete set of field values, in .msg order
00067 :param kwds: use keyword arguments corresponding to message field names
00068 to set specific fields.
00069 """
00070 if args or kwds:
00071 super(SymbolGroundingGraspBaseRegionRequest, self).__init__(*args, **kwds)
00072
00073 if self.target_obj_pose is None:
00074 self.target_obj_pose = geometry_msgs.msg.Pose()
00075 if self.parent_obj_geometry is None:
00076 self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00077 if self.furniture_geometry_list is None:
00078 self.furniture_geometry_list = []
00079 else:
00080 self.target_obj_pose = geometry_msgs.msg.Pose()
00081 self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00082 self.furniture_geometry_list = []
00083
00084 def _get_types(self):
00085 """
00086 internal API method
00087 """
00088 return self._slot_types
00089
00090 def serialize(self, buff):
00091 """
00092 serialize message into buffer
00093 :param buff: buffer, ``StringIO``
00094 """
00095 try:
00096 _x = self
00097 buff.write(_struct_7d3f7d.pack(_x.target_obj_pose.position.x, _x.target_obj_pose.position.y, _x.target_obj_pose.position.z, _x.target_obj_pose.orientation.x, _x.target_obj_pose.orientation.y, _x.target_obj_pose.orientation.z, _x.target_obj_pose.orientation.w, _x.parent_obj_geometry.l, _x.parent_obj_geometry.w, _x.parent_obj_geometry.h, _x.parent_obj_geometry.pose.position.x, _x.parent_obj_geometry.pose.position.y, _x.parent_obj_geometry.pose.position.z, _x.parent_obj_geometry.pose.orientation.x, _x.parent_obj_geometry.pose.orientation.y, _x.parent_obj_geometry.pose.orientation.z, _x.parent_obj_geometry.pose.orientation.w))
00098 length = len(self.furniture_geometry_list)
00099 buff.write(_struct_I.pack(length))
00100 for val1 in self.furniture_geometry_list:
00101 _x = val1
00102 buff.write(_struct_3f.pack(_x.l, _x.w, _x.h))
00103 _v1 = val1.pose
00104 _v2 = _v1.position
00105 _x = _v2
00106 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00107 _v3 = _v1.orientation
00108 _x = _v3
00109 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00110 except struct.error as se: self._check_types(se)
00111 except TypeError as te: self._check_types(te)
00112
00113 def deserialize(self, str):
00114 """
00115 unpack serialized message in str into this message instance
00116 :param str: byte array of serialized message, ``str``
00117 """
00118 try:
00119 if self.target_obj_pose is None:
00120 self.target_obj_pose = geometry_msgs.msg.Pose()
00121 if self.parent_obj_geometry is None:
00122 self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00123 if self.furniture_geometry_list is None:
00124 self.furniture_geometry_list = None
00125 end = 0
00126 _x = self
00127 start = end
00128 end += 124
00129 (_x.target_obj_pose.position.x, _x.target_obj_pose.position.y, _x.target_obj_pose.position.z, _x.target_obj_pose.orientation.x, _x.target_obj_pose.orientation.y, _x.target_obj_pose.orientation.z, _x.target_obj_pose.orientation.w, _x.parent_obj_geometry.l, _x.parent_obj_geometry.w, _x.parent_obj_geometry.h, _x.parent_obj_geometry.pose.position.x, _x.parent_obj_geometry.pose.position.y, _x.parent_obj_geometry.pose.position.z, _x.parent_obj_geometry.pose.orientation.x, _x.parent_obj_geometry.pose.orientation.y, _x.parent_obj_geometry.pose.orientation.z, _x.parent_obj_geometry.pose.orientation.w,) = _struct_7d3f7d.unpack(str[start:end])
00130 start = end
00131 end += 4
00132 (length,) = _struct_I.unpack(str[start:end])
00133 self.furniture_geometry_list = []
00134 for i in range(0, length):
00135 val1 = srs_msgs.msg.SRSSpatialInfo()
00136 _x = val1
00137 start = end
00138 end += 12
00139 (_x.l, _x.w, _x.h,) = _struct_3f.unpack(str[start:end])
00140 _v4 = val1.pose
00141 _v5 = _v4.position
00142 _x = _v5
00143 start = end
00144 end += 24
00145 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00146 _v6 = _v4.orientation
00147 _x = _v6
00148 start = end
00149 end += 32
00150 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00151 self.furniture_geometry_list.append(val1)
00152 return self
00153 except struct.error as e:
00154 raise genpy.DeserializationError(e)
00155
00156
00157 def serialize_numpy(self, buff, numpy):
00158 """
00159 serialize message with numpy array types into buffer
00160 :param buff: buffer, ``StringIO``
00161 :param numpy: numpy python module
00162 """
00163 try:
00164 _x = self
00165 buff.write(_struct_7d3f7d.pack(_x.target_obj_pose.position.x, _x.target_obj_pose.position.y, _x.target_obj_pose.position.z, _x.target_obj_pose.orientation.x, _x.target_obj_pose.orientation.y, _x.target_obj_pose.orientation.z, _x.target_obj_pose.orientation.w, _x.parent_obj_geometry.l, _x.parent_obj_geometry.w, _x.parent_obj_geometry.h, _x.parent_obj_geometry.pose.position.x, _x.parent_obj_geometry.pose.position.y, _x.parent_obj_geometry.pose.position.z, _x.parent_obj_geometry.pose.orientation.x, _x.parent_obj_geometry.pose.orientation.y, _x.parent_obj_geometry.pose.orientation.z, _x.parent_obj_geometry.pose.orientation.w))
00166 length = len(self.furniture_geometry_list)
00167 buff.write(_struct_I.pack(length))
00168 for val1 in self.furniture_geometry_list:
00169 _x = val1
00170 buff.write(_struct_3f.pack(_x.l, _x.w, _x.h))
00171 _v7 = val1.pose
00172 _v8 = _v7.position
00173 _x = _v8
00174 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00175 _v9 = _v7.orientation
00176 _x = _v9
00177 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00178 except struct.error as se: self._check_types(se)
00179 except TypeError as te: self._check_types(te)
00180
00181 def deserialize_numpy(self, str, numpy):
00182 """
00183 unpack serialized message in str into this message instance using numpy for array types
00184 :param str: byte array of serialized message, ``str``
00185 :param numpy: numpy python module
00186 """
00187 try:
00188 if self.target_obj_pose is None:
00189 self.target_obj_pose = geometry_msgs.msg.Pose()
00190 if self.parent_obj_geometry is None:
00191 self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00192 if self.furniture_geometry_list is None:
00193 self.furniture_geometry_list = None
00194 end = 0
00195 _x = self
00196 start = end
00197 end += 124
00198 (_x.target_obj_pose.position.x, _x.target_obj_pose.position.y, _x.target_obj_pose.position.z, _x.target_obj_pose.orientation.x, _x.target_obj_pose.orientation.y, _x.target_obj_pose.orientation.z, _x.target_obj_pose.orientation.w, _x.parent_obj_geometry.l, _x.parent_obj_geometry.w, _x.parent_obj_geometry.h, _x.parent_obj_geometry.pose.position.x, _x.parent_obj_geometry.pose.position.y, _x.parent_obj_geometry.pose.position.z, _x.parent_obj_geometry.pose.orientation.x, _x.parent_obj_geometry.pose.orientation.y, _x.parent_obj_geometry.pose.orientation.z, _x.parent_obj_geometry.pose.orientation.w,) = _struct_7d3f7d.unpack(str[start:end])
00199 start = end
00200 end += 4
00201 (length,) = _struct_I.unpack(str[start:end])
00202 self.furniture_geometry_list = []
00203 for i in range(0, length):
00204 val1 = srs_msgs.msg.SRSSpatialInfo()
00205 _x = val1
00206 start = end
00207 end += 12
00208 (_x.l, _x.w, _x.h,) = _struct_3f.unpack(str[start:end])
00209 _v10 = val1.pose
00210 _v11 = _v10.position
00211 _x = _v11
00212 start = end
00213 end += 24
00214 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00215 _v12 = _v10.orientation
00216 _x = _v12
00217 start = end
00218 end += 32
00219 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00220 self.furniture_geometry_list.append(val1)
00221 return self
00222 except struct.error as e:
00223 raise genpy.DeserializationError(e)
00224
00225 _struct_I = genpy.struct_I
00226 _struct_4d = struct.Struct("<4d")
00227 _struct_3d = struct.Struct("<3d")
00228 _struct_7d3f7d = struct.Struct("<7d3f7d")
00229 _struct_3f = struct.Struct("<3f")
00230 """autogenerated by genpy from srs_symbolic_grounding/SymbolGroundingGraspBaseRegionResponse.msg. Do not edit."""
00231 import sys
00232 python3 = True if sys.hexversion > 0x03000000 else False
00233 import genpy
00234 import struct
00235
00236 import geometry_msgs.msg
00237
00238 class SymbolGroundingGraspBaseRegionResponse(genpy.Message):
00239 _md5sum = "3fa00ea708fbc84242f9ea364e09f2c6"
00240 _type = "srs_symbolic_grounding/SymbolGroundingGraspBaseRegionResponse"
00241 _has_header = False
00242 _full_text = """bool obstacle_check
00243 float32 reach
00244 geometry_msgs/Pose2D grasp_base_pose
00245 float32 R
00246
00247
00248 ================================================================================
00249 MSG: geometry_msgs/Pose2D
00250 # This expresses a position and orientation on a 2D manifold.
00251
00252 float64 x
00253 float64 y
00254 float64 theta
00255 """
00256 __slots__ = ['obstacle_check','reach','grasp_base_pose','R']
00257 _slot_types = ['bool','float32','geometry_msgs/Pose2D','float32']
00258
00259 def __init__(self, *args, **kwds):
00260 """
00261 Constructor. Any message fields that are implicitly/explicitly
00262 set to None will be assigned a default value. The recommend
00263 use is keyword arguments as this is more robust to future message
00264 changes. You cannot mix in-order arguments and keyword arguments.
00265
00266 The available fields are:
00267 obstacle_check,reach,grasp_base_pose,R
00268
00269 :param args: complete set of field values, in .msg order
00270 :param kwds: use keyword arguments corresponding to message field names
00271 to set specific fields.
00272 """
00273 if args or kwds:
00274 super(SymbolGroundingGraspBaseRegionResponse, self).__init__(*args, **kwds)
00275
00276 if self.obstacle_check is None:
00277 self.obstacle_check = False
00278 if self.reach is None:
00279 self.reach = 0.
00280 if self.grasp_base_pose is None:
00281 self.grasp_base_pose = geometry_msgs.msg.Pose2D()
00282 if self.R is None:
00283 self.R = 0.
00284 else:
00285 self.obstacle_check = False
00286 self.reach = 0.
00287 self.grasp_base_pose = geometry_msgs.msg.Pose2D()
00288 self.R = 0.
00289
00290 def _get_types(self):
00291 """
00292 internal API method
00293 """
00294 return self._slot_types
00295
00296 def serialize(self, buff):
00297 """
00298 serialize message into buffer
00299 :param buff: buffer, ``StringIO``
00300 """
00301 try:
00302 _x = self
00303 buff.write(_struct_Bf3df.pack(_x.obstacle_check, _x.reach, _x.grasp_base_pose.x, _x.grasp_base_pose.y, _x.grasp_base_pose.theta, _x.R))
00304 except struct.error as se: self._check_types(se)
00305 except TypeError as te: self._check_types(te)
00306
00307 def deserialize(self, str):
00308 """
00309 unpack serialized message in str into this message instance
00310 :param str: byte array of serialized message, ``str``
00311 """
00312 try:
00313 if self.grasp_base_pose is None:
00314 self.grasp_base_pose = geometry_msgs.msg.Pose2D()
00315 end = 0
00316 _x = self
00317 start = end
00318 end += 33
00319 (_x.obstacle_check, _x.reach, _x.grasp_base_pose.x, _x.grasp_base_pose.y, _x.grasp_base_pose.theta, _x.R,) = _struct_Bf3df.unpack(str[start:end])
00320 self.obstacle_check = bool(self.obstacle_check)
00321 return self
00322 except struct.error as e:
00323 raise genpy.DeserializationError(e)
00324
00325
00326 def serialize_numpy(self, buff, numpy):
00327 """
00328 serialize message with numpy array types into buffer
00329 :param buff: buffer, ``StringIO``
00330 :param numpy: numpy python module
00331 """
00332 try:
00333 _x = self
00334 buff.write(_struct_Bf3df.pack(_x.obstacle_check, _x.reach, _x.grasp_base_pose.x, _x.grasp_base_pose.y, _x.grasp_base_pose.theta, _x.R))
00335 except struct.error as se: self._check_types(se)
00336 except TypeError as te: self._check_types(te)
00337
00338 def deserialize_numpy(self, str, numpy):
00339 """
00340 unpack serialized message in str into this message instance using numpy for array types
00341 :param str: byte array of serialized message, ``str``
00342 :param numpy: numpy python module
00343 """
00344 try:
00345 if self.grasp_base_pose is None:
00346 self.grasp_base_pose = geometry_msgs.msg.Pose2D()
00347 end = 0
00348 _x = self
00349 start = end
00350 end += 33
00351 (_x.obstacle_check, _x.reach, _x.grasp_base_pose.x, _x.grasp_base_pose.y, _x.grasp_base_pose.theta, _x.R,) = _struct_Bf3df.unpack(str[start:end])
00352 self.obstacle_check = bool(self.obstacle_check)
00353 return self
00354 except struct.error as e:
00355 raise genpy.DeserializationError(e)
00356
00357 _struct_I = genpy.struct_I
00358 _struct_Bf3df = struct.Struct("<Bf3df")
00359 class SymbolGroundingGraspBaseRegion(object):
00360 _type = 'srs_symbolic_grounding/SymbolGroundingGraspBaseRegion'
00361 _md5sum = '85656dac540bfd2cc20973338dc0825b'
00362 _request_class = SymbolGroundingGraspBaseRegionRequest
00363 _response_class = SymbolGroundingGraspBaseRegionResponse