_PoleSectionStamped.py
Go to the documentation of this file.
00001 """autogenerated by genmsg_py from PoleSectionStamped.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004 
00005 import geometry_msgs.msg
00006 import pole_structure_mapper.msg
00007 import std_msgs.msg
00008 
00009 class PoleSectionStamped(roslib.message.Message):
00010   _md5sum = "88747806e74b0d7df3494990a375e399"
00011   _type = "pole_structure_mapper/PoleSectionStamped"
00012   _has_header = True #flag to mark the presence of a Header object
00013   _full_text = """# Description…
00014 
00015 Header header                   # timestamp and frame_id
00016 PoleSection pole
00017 ================================================================================
00018 MSG: std_msgs/Header
00019 # Standard metadata for higher-level stamped data types.
00020 # This is generally used to communicate timestamped data 
00021 # in a particular coordinate frame.
00022 # 
00023 # sequence ID: consecutively increasing ID 
00024 uint32 seq
00025 #Two-integer timestamp that is expressed as:
00026 # * stamp.secs: seconds (stamp_secs) since epoch
00027 # * stamp.nsecs: nanoseconds since stamp_secs
00028 # time-handling sugar is provided by the client library
00029 time stamp
00030 #Frame this data is associated with
00031 # 0: no frame
00032 # 1: global frame
00033 string frame_id
00034 
00035 ================================================================================
00036 MSG: pole_structure_mapper/PoleSection
00037 # Description…
00038 
00039 geometry_msgs/Point base
00040 geometry_msgs/Vector3 axis
00041 float32 diameter                # m
00042 float32 length                  # m
00043 
00044 ================================================================================
00045 MSG: geometry_msgs/Point
00046 # This contains the position of a point in free space
00047 float64 x
00048 float64 y
00049 float64 z
00050 
00051 ================================================================================
00052 MSG: geometry_msgs/Vector3
00053 # This represents a vector in free space. 
00054 
00055 float64 x
00056 float64 y
00057 float64 z
00058 """
00059   __slots__ = ['header','pole']
00060   _slot_types = ['Header','pole_structure_mapper/PoleSection']
00061 
00062   def __init__(self, *args, **kwds):
00063     """
00064     Constructor. Any message fields that are implicitly/explicitly
00065     set to None will be assigned a default value. The recommend
00066     use is keyword arguments as this is more robust to future message
00067     changes.  You cannot mix in-order arguments and keyword arguments.
00068     
00069     The available fields are:
00070        header,pole
00071     
00072     @param args: complete set of field values, in .msg order
00073     @param kwds: use keyword arguments corresponding to message field names
00074     to set specific fields. 
00075     """
00076     if args or kwds:
00077       super(PoleSectionStamped, self).__init__(*args, **kwds)
00078       #message fields cannot be None, assign default values for those that are
00079       if self.header is None:
00080         self.header = std_msgs.msg._Header.Header()
00081       if self.pole is None:
00082         self.pole = pole_structure_mapper.msg.PoleSection()
00083     else:
00084       self.header = std_msgs.msg._Header.Header()
00085       self.pole = pole_structure_mapper.msg.PoleSection()
00086 
00087   def _get_types(self):
00088     """
00089     internal API method
00090     """
00091     return self._slot_types
00092 
00093   def serialize(self, buff):
00094     """
00095     serialize message into buffer
00096     @param buff: buffer
00097     @type  buff: StringIO
00098     """
00099     try:
00100       _x = self
00101       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00102       _x = self.header.frame_id
00103       length = len(_x)
00104       buff.write(struct.pack('<I%ss'%length, length, _x))
00105       _x = self
00106       buff.write(_struct_6d2f.pack(_x.pole.base.x, _x.pole.base.y, _x.pole.base.z, _x.pole.axis.x, _x.pole.axis.y, _x.pole.axis.z, _x.pole.diameter, _x.pole.length))
00107     except struct.error as se: self._check_types(se)
00108     except TypeError as te: self._check_types(te)
00109 
00110   def deserialize(self, str):
00111     """
00112     unpack serialized message in str into this message instance
00113     @param str: byte array of serialized message
00114     @type  str: str
00115     """
00116     try:
00117       if self.header is None:
00118         self.header = std_msgs.msg._Header.Header()
00119       if self.pole is None:
00120         self.pole = pole_structure_mapper.msg.PoleSection()
00121       end = 0
00122       _x = self
00123       start = end
00124       end += 12
00125       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00126       start = end
00127       end += 4
00128       (length,) = _struct_I.unpack(str[start:end])
00129       start = end
00130       end += length
00131       self.header.frame_id = str[start:end]
00132       _x = self
00133       start = end
00134       end += 56
00135       (_x.pole.base.x, _x.pole.base.y, _x.pole.base.z, _x.pole.axis.x, _x.pole.axis.y, _x.pole.axis.z, _x.pole.diameter, _x.pole.length,) = _struct_6d2f.unpack(str[start:end])
00136       return self
00137     except struct.error as e:
00138       raise roslib.message.DeserializationError(e) #most likely buffer underfill
00139 
00140 
00141   def serialize_numpy(self, buff, numpy):
00142     """
00143     serialize message with numpy array types into buffer
00144     @param buff: buffer
00145     @type  buff: StringIO
00146     @param numpy: numpy python module
00147     @type  numpy module
00148     """
00149     try:
00150       _x = self
00151       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00152       _x = self.header.frame_id
00153       length = len(_x)
00154       buff.write(struct.pack('<I%ss'%length, length, _x))
00155       _x = self
00156       buff.write(_struct_6d2f.pack(_x.pole.base.x, _x.pole.base.y, _x.pole.base.z, _x.pole.axis.x, _x.pole.axis.y, _x.pole.axis.z, _x.pole.diameter, _x.pole.length))
00157     except struct.error as se: self._check_types(se)
00158     except TypeError as te: self._check_types(te)
00159 
00160   def deserialize_numpy(self, str, numpy):
00161     """
00162     unpack serialized message in str into this message instance using numpy for array types
00163     @param str: byte array of serialized message
00164     @type  str: str
00165     @param numpy: numpy python module
00166     @type  numpy: module
00167     """
00168     try:
00169       if self.header is None:
00170         self.header = std_msgs.msg._Header.Header()
00171       if self.pole is None:
00172         self.pole = pole_structure_mapper.msg.PoleSection()
00173       end = 0
00174       _x = self
00175       start = end
00176       end += 12
00177       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00178       start = end
00179       end += 4
00180       (length,) = _struct_I.unpack(str[start:end])
00181       start = end
00182       end += length
00183       self.header.frame_id = str[start:end]
00184       _x = self
00185       start = end
00186       end += 56
00187       (_x.pole.base.x, _x.pole.base.y, _x.pole.base.z, _x.pole.axis.x, _x.pole.axis.y, _x.pole.axis.z, _x.pole.diameter, _x.pole.length,) = _struct_6d2f.unpack(str[start:end])
00188       return self
00189     except struct.error as e:
00190       raise roslib.message.DeserializationError(e) #most likely buffer underfill
00191 
00192 _struct_I = roslib.message.struct_I
00193 _struct_3I = struct.Struct("<3I")
00194 _struct_6d2f = struct.Struct("<6d2f")


pole_structure_mapper
Author(s): Gonçalo Cabrita and Mahmoud Tavakoli
autogenerated on Mon Jan 6 2014 11:26:24