_CollisionObject.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_assisted_arm_navigation_msgs/CollisionObject.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 std_msgs.msg
00009 
00010 class CollisionObject(genpy.Message):
00011   _md5sum = "6e08640b15af10838d660fe5e8275c69"
00012   _type = "srs_assisted_arm_navigation_msgs/CollisionObject"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """string name
00015 string id
00016 geometry_msgs/PoseStamped pose
00017 geometry_msgs/Point bb_lwh
00018 bool allow_collision
00019 bool attached
00020 bool allow_pregrasps
00021 
00022 ================================================================================
00023 MSG: geometry_msgs/PoseStamped
00024 # A Pose with reference coordinate frame and timestamp
00025 Header header
00026 Pose pose
00027 
00028 ================================================================================
00029 MSG: std_msgs/Header
00030 # Standard metadata for higher-level stamped data types.
00031 # This is generally used to communicate timestamped data 
00032 # in a particular coordinate frame.
00033 # 
00034 # sequence ID: consecutively increasing ID 
00035 uint32 seq
00036 #Two-integer timestamp that is expressed as:
00037 # * stamp.secs: seconds (stamp_secs) since epoch
00038 # * stamp.nsecs: nanoseconds since stamp_secs
00039 # time-handling sugar is provided by the client library
00040 time stamp
00041 #Frame this data is associated with
00042 # 0: no frame
00043 # 1: global frame
00044 string frame_id
00045 
00046 ================================================================================
00047 MSG: geometry_msgs/Pose
00048 # A representation of pose in free space, composed of postion and orientation. 
00049 Point position
00050 Quaternion orientation
00051 
00052 ================================================================================
00053 MSG: geometry_msgs/Point
00054 # This contains the position of a point in free space
00055 float64 x
00056 float64 y
00057 float64 z
00058 
00059 ================================================================================
00060 MSG: geometry_msgs/Quaternion
00061 # This represents an orientation in free space in quaternion form.
00062 
00063 float64 x
00064 float64 y
00065 float64 z
00066 float64 w
00067 
00068 """
00069   __slots__ = ['name','id','pose','bb_lwh','allow_collision','attached','allow_pregrasps']
00070   _slot_types = ['string','string','geometry_msgs/PoseStamped','geometry_msgs/Point','bool','bool','bool']
00071 
00072   def __init__(self, *args, **kwds):
00073     """
00074     Constructor. Any message fields that are implicitly/explicitly
00075     set to None will be assigned a default value. The recommend
00076     use is keyword arguments as this is more robust to future message
00077     changes.  You cannot mix in-order arguments and keyword arguments.
00078 
00079     The available fields are:
00080        name,id,pose,bb_lwh,allow_collision,attached,allow_pregrasps
00081 
00082     :param args: complete set of field values, in .msg order
00083     :param kwds: use keyword arguments corresponding to message field names
00084     to set specific fields.
00085     """
00086     if args or kwds:
00087       super(CollisionObject, self).__init__(*args, **kwds)
00088       #message fields cannot be None, assign default values for those that are
00089       if self.name is None:
00090         self.name = ''
00091       if self.id is None:
00092         self.id = ''
00093       if self.pose is None:
00094         self.pose = geometry_msgs.msg.PoseStamped()
00095       if self.bb_lwh is None:
00096         self.bb_lwh = geometry_msgs.msg.Point()
00097       if self.allow_collision is None:
00098         self.allow_collision = False
00099       if self.attached is None:
00100         self.attached = False
00101       if self.allow_pregrasps is None:
00102         self.allow_pregrasps = False
00103     else:
00104       self.name = ''
00105       self.id = ''
00106       self.pose = geometry_msgs.msg.PoseStamped()
00107       self.bb_lwh = geometry_msgs.msg.Point()
00108       self.allow_collision = False
00109       self.attached = False
00110       self.allow_pregrasps = False
00111 
00112   def _get_types(self):
00113     """
00114     internal API method
00115     """
00116     return self._slot_types
00117 
00118   def serialize(self, buff):
00119     """
00120     serialize message into buffer
00121     :param buff: buffer, ``StringIO``
00122     """
00123     try:
00124       _x = self.name
00125       length = len(_x)
00126       if python3 or type(_x) == unicode:
00127         _x = _x.encode('utf-8')
00128         length = len(_x)
00129       buff.write(struct.pack('<I%ss'%length, length, _x))
00130       _x = self.id
00131       length = len(_x)
00132       if python3 or type(_x) == unicode:
00133         _x = _x.encode('utf-8')
00134         length = len(_x)
00135       buff.write(struct.pack('<I%ss'%length, length, _x))
00136       _x = self
00137       buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00138       _x = self.pose.header.frame_id
00139       length = len(_x)
00140       if python3 or type(_x) == unicode:
00141         _x = _x.encode('utf-8')
00142         length = len(_x)
00143       buff.write(struct.pack('<I%ss'%length, length, _x))
00144       _x = self
00145       buff.write(_struct_10d3B.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w, _x.bb_lwh.x, _x.bb_lwh.y, _x.bb_lwh.z, _x.allow_collision, _x.attached, _x.allow_pregrasps))
00146     except struct.error as se: self._check_types(se)
00147     except TypeError as te: self._check_types(te)
00148 
00149   def deserialize(self, str):
00150     """
00151     unpack serialized message in str into this message instance
00152     :param str: byte array of serialized message, ``str``
00153     """
00154     try:
00155       if self.pose is None:
00156         self.pose = geometry_msgs.msg.PoseStamped()
00157       if self.bb_lwh is None:
00158         self.bb_lwh = geometry_msgs.msg.Point()
00159       end = 0
00160       start = end
00161       end += 4
00162       (length,) = _struct_I.unpack(str[start:end])
00163       start = end
00164       end += length
00165       if python3:
00166         self.name = str[start:end].decode('utf-8')
00167       else:
00168         self.name = str[start:end]
00169       start = end
00170       end += 4
00171       (length,) = _struct_I.unpack(str[start:end])
00172       start = end
00173       end += length
00174       if python3:
00175         self.id = str[start:end].decode('utf-8')
00176       else:
00177         self.id = str[start:end]
00178       _x = self
00179       start = end
00180       end += 12
00181       (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00182       start = end
00183       end += 4
00184       (length,) = _struct_I.unpack(str[start:end])
00185       start = end
00186       end += length
00187       if python3:
00188         self.pose.header.frame_id = str[start:end].decode('utf-8')
00189       else:
00190         self.pose.header.frame_id = str[start:end]
00191       _x = self
00192       start = end
00193       end += 83
00194       (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w, _x.bb_lwh.x, _x.bb_lwh.y, _x.bb_lwh.z, _x.allow_collision, _x.attached, _x.allow_pregrasps,) = _struct_10d3B.unpack(str[start:end])
00195       self.allow_collision = bool(self.allow_collision)
00196       self.attached = bool(self.attached)
00197       self.allow_pregrasps = bool(self.allow_pregrasps)
00198       return self
00199     except struct.error as e:
00200       raise genpy.DeserializationError(e) #most likely buffer underfill
00201 
00202 
00203   def serialize_numpy(self, buff, numpy):
00204     """
00205     serialize message with numpy array types into buffer
00206     :param buff: buffer, ``StringIO``
00207     :param numpy: numpy python module
00208     """
00209     try:
00210       _x = self.name
00211       length = len(_x)
00212       if python3 or type(_x) == unicode:
00213         _x = _x.encode('utf-8')
00214         length = len(_x)
00215       buff.write(struct.pack('<I%ss'%length, length, _x))
00216       _x = self.id
00217       length = len(_x)
00218       if python3 or type(_x) == unicode:
00219         _x = _x.encode('utf-8')
00220         length = len(_x)
00221       buff.write(struct.pack('<I%ss'%length, length, _x))
00222       _x = self
00223       buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00224       _x = self.pose.header.frame_id
00225       length = len(_x)
00226       if python3 or type(_x) == unicode:
00227         _x = _x.encode('utf-8')
00228         length = len(_x)
00229       buff.write(struct.pack('<I%ss'%length, length, _x))
00230       _x = self
00231       buff.write(_struct_10d3B.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w, _x.bb_lwh.x, _x.bb_lwh.y, _x.bb_lwh.z, _x.allow_collision, _x.attached, _x.allow_pregrasps))
00232     except struct.error as se: self._check_types(se)
00233     except TypeError as te: self._check_types(te)
00234 
00235   def deserialize_numpy(self, str, numpy):
00236     """
00237     unpack serialized message in str into this message instance using numpy for array types
00238     :param str: byte array of serialized message, ``str``
00239     :param numpy: numpy python module
00240     """
00241     try:
00242       if self.pose is None:
00243         self.pose = geometry_msgs.msg.PoseStamped()
00244       if self.bb_lwh is None:
00245         self.bb_lwh = geometry_msgs.msg.Point()
00246       end = 0
00247       start = end
00248       end += 4
00249       (length,) = _struct_I.unpack(str[start:end])
00250       start = end
00251       end += length
00252       if python3:
00253         self.name = str[start:end].decode('utf-8')
00254       else:
00255         self.name = str[start:end]
00256       start = end
00257       end += 4
00258       (length,) = _struct_I.unpack(str[start:end])
00259       start = end
00260       end += length
00261       if python3:
00262         self.id = str[start:end].decode('utf-8')
00263       else:
00264         self.id = str[start:end]
00265       _x = self
00266       start = end
00267       end += 12
00268       (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00269       start = end
00270       end += 4
00271       (length,) = _struct_I.unpack(str[start:end])
00272       start = end
00273       end += length
00274       if python3:
00275         self.pose.header.frame_id = str[start:end].decode('utf-8')
00276       else:
00277         self.pose.header.frame_id = str[start:end]
00278       _x = self
00279       start = end
00280       end += 83
00281       (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w, _x.bb_lwh.x, _x.bb_lwh.y, _x.bb_lwh.z, _x.allow_collision, _x.attached, _x.allow_pregrasps,) = _struct_10d3B.unpack(str[start:end])
00282       self.allow_collision = bool(self.allow_collision)
00283       self.attached = bool(self.attached)
00284       self.allow_pregrasps = bool(self.allow_pregrasps)
00285       return self
00286     except struct.error as e:
00287       raise genpy.DeserializationError(e) #most likely buffer underfill
00288 
00289 _struct_I = genpy.struct_I
00290 _struct_3I = struct.Struct("<3I")
00291 _struct_10d3B = struct.Struct("<10d3B")


srs_assisted_arm_navigation_msgs
Author(s): Zdenek Materna
autogenerated on Sun Jan 5 2014 11:52:58