_FurnitureGeometry.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_symbolic_grounding/FurnitureGeometry.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 
00009 class FurnitureGeometry(genpy.Message):
00010   _md5sum = "9eadcd72801a473181cb7b090c264a15"
00011   _type = "srs_symbolic_grounding/FurnitureGeometry"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """geometry_msgs/Pose2D pose
00014 float32 l
00015 float32 w
00016 float32 h
00017 
00018 ================================================================================
00019 MSG: geometry_msgs/Pose2D
00020 # This expresses a position and orientation on a 2D manifold.
00021 
00022 float64 x
00023 float64 y
00024 float64 theta
00025 """
00026   __slots__ = ['pose','l','w','h']
00027   _slot_types = ['geometry_msgs/Pose2D','float32','float32','float32']
00028 
00029   def __init__(self, *args, **kwds):
00030     """
00031     Constructor. Any message fields that are implicitly/explicitly
00032     set to None will be assigned a default value. The recommend
00033     use is keyword arguments as this is more robust to future message
00034     changes.  You cannot mix in-order arguments and keyword arguments.
00035 
00036     The available fields are:
00037        pose,l,w,h
00038 
00039     :param args: complete set of field values, in .msg order
00040     :param kwds: use keyword arguments corresponding to message field names
00041     to set specific fields.
00042     """
00043     if args or kwds:
00044       super(FurnitureGeometry, self).__init__(*args, **kwds)
00045       #message fields cannot be None, assign default values for those that are
00046       if self.pose is None:
00047         self.pose = geometry_msgs.msg.Pose2D()
00048       if self.l is None:
00049         self.l = 0.
00050       if self.w is None:
00051         self.w = 0.
00052       if self.h is None:
00053         self.h = 0.
00054     else:
00055       self.pose = geometry_msgs.msg.Pose2D()
00056       self.l = 0.
00057       self.w = 0.
00058       self.h = 0.
00059 
00060   def _get_types(self):
00061     """
00062     internal API method
00063     """
00064     return self._slot_types
00065 
00066   def serialize(self, buff):
00067     """
00068     serialize message into buffer
00069     :param buff: buffer, ``StringIO``
00070     """
00071     try:
00072       _x = self
00073       buff.write(_struct_3d3f.pack(_x.pose.x, _x.pose.y, _x.pose.theta, _x.l, _x.w, _x.h))
00074     except struct.error as se: self._check_types(se)
00075     except TypeError as te: self._check_types(te)
00076 
00077   def deserialize(self, str):
00078     """
00079     unpack serialized message in str into this message instance
00080     :param str: byte array of serialized message, ``str``
00081     """
00082     try:
00083       if self.pose is None:
00084         self.pose = geometry_msgs.msg.Pose2D()
00085       end = 0
00086       _x = self
00087       start = end
00088       end += 36
00089       (_x.pose.x, _x.pose.y, _x.pose.theta, _x.l, _x.w, _x.h,) = _struct_3d3f.unpack(str[start:end])
00090       return self
00091     except struct.error as e:
00092       raise genpy.DeserializationError(e) #most likely buffer underfill
00093 
00094 
00095   def serialize_numpy(self, buff, numpy):
00096     """
00097     serialize message with numpy array types into buffer
00098     :param buff: buffer, ``StringIO``
00099     :param numpy: numpy python module
00100     """
00101     try:
00102       _x = self
00103       buff.write(_struct_3d3f.pack(_x.pose.x, _x.pose.y, _x.pose.theta, _x.l, _x.w, _x.h))
00104     except struct.error as se: self._check_types(se)
00105     except TypeError as te: self._check_types(te)
00106 
00107   def deserialize_numpy(self, str, numpy):
00108     """
00109     unpack serialized message in str into this message instance using numpy for array types
00110     :param str: byte array of serialized message, ``str``
00111     :param numpy: numpy python module
00112     """
00113     try:
00114       if self.pose is None:
00115         self.pose = geometry_msgs.msg.Pose2D()
00116       end = 0
00117       _x = self
00118       start = end
00119       end += 36
00120       (_x.pose.x, _x.pose.y, _x.pose.theta, _x.l, _x.w, _x.h,) = _struct_3d3f.unpack(str[start:end])
00121       return self
00122     except struct.error as e:
00123       raise genpy.DeserializationError(e) #most likely buffer underfill
00124 
00125 _struct_I = genpy.struct_I
00126 _struct_3d3f = struct.Struct("<3d3f")


srs_symbolic_grounding
Author(s): Beisheng Liu
autogenerated on Sun Jan 5 2014 12:01:26