_PoseTwistWithCovariance.py
Go to the documentation of this file.
00001 """autogenerated by genpy from collvoid_msgs/PoseTwistWithCovariance.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 PoseTwistWithCovariance(genpy.Message):
00011   _md5sum = "6a79eb6c33b8f61b28a446c70db3ab02"
00012   _type = "collvoid_msgs/PoseTwistWithCovariance"
00013   _has_header = True #flag to mark the presence of a Header object
00014   _full_text = """Header header
00015 string robot_id
00016 float32 radius
00017 bool holo_robot
00018 bool controlled
00019 geometry_msgs/Vector3 holonomic_velocity
00020 geometry_msgs/PoseWithCovariance pose
00021 geometry_msgs/TwistWithCovariance twist
00022 geometry_msgs/PolygonStamped footprint
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/Vector3
00044 # This represents a vector in free space. 
00045 
00046 float64 x
00047 float64 y
00048 float64 z
00049 ================================================================================
00050 MSG: geometry_msgs/PoseWithCovariance
00051 # This represents a pose in free space with uncertainty.
00052 
00053 Pose pose
00054 
00055 # Row-major representation of the 6x6 covariance matrix
00056 # The orientation parameters use a fixed-axis representation.
00057 # In order, the parameters are:
00058 # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)
00059 float64[36] covariance
00060 
00061 ================================================================================
00062 MSG: geometry_msgs/Pose
00063 # A representation of pose in free space, composed of postion and orientation. 
00064 Point position
00065 Quaternion orientation
00066 
00067 ================================================================================
00068 MSG: geometry_msgs/Point
00069 # This contains the position of a point in free space
00070 float64 x
00071 float64 y
00072 float64 z
00073 
00074 ================================================================================
00075 MSG: geometry_msgs/Quaternion
00076 # This represents an orientation in free space in quaternion form.
00077 
00078 float64 x
00079 float64 y
00080 float64 z
00081 float64 w
00082 
00083 ================================================================================
00084 MSG: geometry_msgs/TwistWithCovariance
00085 # This expresses velocity in free space with uncertianty.
00086 
00087 Twist twist
00088 
00089 # Row-major representation of the 6x6 covariance matrix
00090 # The orientation parameters use a fixed-axis representation.
00091 # In order, the parameters are:
00092 # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)
00093 float64[36] covariance
00094 
00095 ================================================================================
00096 MSG: geometry_msgs/Twist
00097 # This expresses velocity in free space broken into it's linear and angular parts. 
00098 Vector3  linear
00099 Vector3  angular
00100 
00101 ================================================================================
00102 MSG: geometry_msgs/PolygonStamped
00103 # This represents a Polygon with reference coordinate frame and timestamp
00104 Header header
00105 Polygon polygon
00106 
00107 ================================================================================
00108 MSG: geometry_msgs/Polygon
00109 #A specification of a polygon where the first and last points are assumed to be connected
00110 Point32[] points
00111 
00112 ================================================================================
00113 MSG: geometry_msgs/Point32
00114 # This contains the position of a point in free space(with 32 bits of precision).
00115 # It is recommeded to use Point wherever possible instead of Point32.  
00116 # 
00117 # This recommendation is to promote interoperability.  
00118 #
00119 # This message is designed to take up less space when sending
00120 # lots of points at once, as in the case of a PointCloud.  
00121 
00122 float32 x
00123 float32 y
00124 float32 z
00125 """
00126   __slots__ = ['header','robot_id','radius','holo_robot','controlled','holonomic_velocity','pose','twist','footprint']
00127   _slot_types = ['std_msgs/Header','string','float32','bool','bool','geometry_msgs/Vector3','geometry_msgs/PoseWithCovariance','geometry_msgs/TwistWithCovariance','geometry_msgs/PolygonStamped']
00128 
00129   def __init__(self, *args, **kwds):
00130     """
00131     Constructor. Any message fields that are implicitly/explicitly
00132     set to None will be assigned a default value. The recommend
00133     use is keyword arguments as this is more robust to future message
00134     changes.  You cannot mix in-order arguments and keyword arguments.
00135 
00136     The available fields are:
00137        header,robot_id,radius,holo_robot,controlled,holonomic_velocity,pose,twist,footprint
00138 
00139     :param args: complete set of field values, in .msg order
00140     :param kwds: use keyword arguments corresponding to message field names
00141     to set specific fields.
00142     """
00143     if args or kwds:
00144       super(PoseTwistWithCovariance, self).__init__(*args, **kwds)
00145       #message fields cannot be None, assign default values for those that are
00146       if self.header is None:
00147         self.header = std_msgs.msg.Header()
00148       if self.robot_id is None:
00149         self.robot_id = ''
00150       if self.radius is None:
00151         self.radius = 0.
00152       if self.holo_robot is None:
00153         self.holo_robot = False
00154       if self.controlled is None:
00155         self.controlled = False
00156       if self.holonomic_velocity is None:
00157         self.holonomic_velocity = geometry_msgs.msg.Vector3()
00158       if self.pose is None:
00159         self.pose = geometry_msgs.msg.PoseWithCovariance()
00160       if self.twist is None:
00161         self.twist = geometry_msgs.msg.TwistWithCovariance()
00162       if self.footprint is None:
00163         self.footprint = geometry_msgs.msg.PolygonStamped()
00164     else:
00165       self.header = std_msgs.msg.Header()
00166       self.robot_id = ''
00167       self.radius = 0.
00168       self.holo_robot = False
00169       self.controlled = False
00170       self.holonomic_velocity = geometry_msgs.msg.Vector3()
00171       self.pose = geometry_msgs.msg.PoseWithCovariance()
00172       self.twist = geometry_msgs.msg.TwistWithCovariance()
00173       self.footprint = geometry_msgs.msg.PolygonStamped()
00174 
00175   def _get_types(self):
00176     """
00177     internal API method
00178     """
00179     return self._slot_types
00180 
00181   def serialize(self, buff):
00182     """
00183     serialize message into buffer
00184     :param buff: buffer, ``StringIO``
00185     """
00186     try:
00187       _x = self
00188       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00189       _x = self.header.frame_id
00190       length = len(_x)
00191       if python3 or type(_x) == unicode:
00192         _x = _x.encode('utf-8')
00193         length = len(_x)
00194       buff.write(struct.pack('<I%ss'%length, length, _x))
00195       _x = self.robot_id
00196       length = len(_x)
00197       if python3 or type(_x) == unicode:
00198         _x = _x.encode('utf-8')
00199         length = len(_x)
00200       buff.write(struct.pack('<I%ss'%length, length, _x))
00201       _x = self
00202       buff.write(_struct_f2B10d.pack(_x.radius, _x.holo_robot, _x.controlled, _x.holonomic_velocity.x, _x.holonomic_velocity.y, _x.holonomic_velocity.z, _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))
00203       buff.write(_struct_36d.pack(*self.pose.covariance))
00204       _x = self
00205       buff.write(_struct_6d.pack(_x.twist.twist.linear.x, _x.twist.twist.linear.y, _x.twist.twist.linear.z, _x.twist.twist.angular.x, _x.twist.twist.angular.y, _x.twist.twist.angular.z))
00206       buff.write(_struct_36d.pack(*self.twist.covariance))
00207       _x = self
00208       buff.write(_struct_3I.pack(_x.footprint.header.seq, _x.footprint.header.stamp.secs, _x.footprint.header.stamp.nsecs))
00209       _x = self.footprint.header.frame_id
00210       length = len(_x)
00211       if python3 or type(_x) == unicode:
00212         _x = _x.encode('utf-8')
00213         length = len(_x)
00214       buff.write(struct.pack('<I%ss'%length, length, _x))
00215       length = len(self.footprint.polygon.points)
00216       buff.write(_struct_I.pack(length))
00217       for val1 in self.footprint.polygon.points:
00218         _x = val1
00219         buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00220     except struct.error as se: self._check_types(se)
00221     except TypeError as te: self._check_types(te)
00222 
00223   def deserialize(self, str):
00224     """
00225     unpack serialized message in str into this message instance
00226     :param str: byte array of serialized message, ``str``
00227     """
00228     try:
00229       if self.header is None:
00230         self.header = std_msgs.msg.Header()
00231       if self.holonomic_velocity is None:
00232         self.holonomic_velocity = geometry_msgs.msg.Vector3()
00233       if self.pose is None:
00234         self.pose = geometry_msgs.msg.PoseWithCovariance()
00235       if self.twist is None:
00236         self.twist = geometry_msgs.msg.TwistWithCovariance()
00237       if self.footprint is None:
00238         self.footprint = geometry_msgs.msg.PolygonStamped()
00239       end = 0
00240       _x = self
00241       start = end
00242       end += 12
00243       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00244       start = end
00245       end += 4
00246       (length,) = _struct_I.unpack(str[start:end])
00247       start = end
00248       end += length
00249       if python3:
00250         self.header.frame_id = str[start:end].decode('utf-8')
00251       else:
00252         self.header.frame_id = str[start:end]
00253       start = end
00254       end += 4
00255       (length,) = _struct_I.unpack(str[start:end])
00256       start = end
00257       end += length
00258       if python3:
00259         self.robot_id = str[start:end].decode('utf-8')
00260       else:
00261         self.robot_id = str[start:end]
00262       _x = self
00263       start = end
00264       end += 86
00265       (_x.radius, _x.holo_robot, _x.controlled, _x.holonomic_velocity.x, _x.holonomic_velocity.y, _x.holonomic_velocity.z, _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,) = _struct_f2B10d.unpack(str[start:end])
00266       self.holo_robot = bool(self.holo_robot)
00267       self.controlled = bool(self.controlled)
00268       start = end
00269       end += 288
00270       self.pose.covariance = _struct_36d.unpack(str[start:end])
00271       _x = self
00272       start = end
00273       end += 48
00274       (_x.twist.twist.linear.x, _x.twist.twist.linear.y, _x.twist.twist.linear.z, _x.twist.twist.angular.x, _x.twist.twist.angular.y, _x.twist.twist.angular.z,) = _struct_6d.unpack(str[start:end])
00275       start = end
00276       end += 288
00277       self.twist.covariance = _struct_36d.unpack(str[start:end])
00278       _x = self
00279       start = end
00280       end += 12
00281       (_x.footprint.header.seq, _x.footprint.header.stamp.secs, _x.footprint.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00282       start = end
00283       end += 4
00284       (length,) = _struct_I.unpack(str[start:end])
00285       start = end
00286       end += length
00287       if python3:
00288         self.footprint.header.frame_id = str[start:end].decode('utf-8')
00289       else:
00290         self.footprint.header.frame_id = str[start:end]
00291       start = end
00292       end += 4
00293       (length,) = _struct_I.unpack(str[start:end])
00294       self.footprint.polygon.points = []
00295       for i in range(0, length):
00296         val1 = geometry_msgs.msg.Point32()
00297         _x = val1
00298         start = end
00299         end += 12
00300         (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00301         self.footprint.polygon.points.append(val1)
00302       return self
00303     except struct.error as e:
00304       raise genpy.DeserializationError(e) #most likely buffer underfill
00305 
00306 
00307   def serialize_numpy(self, buff, numpy):
00308     """
00309     serialize message with numpy array types into buffer
00310     :param buff: buffer, ``StringIO``
00311     :param numpy: numpy python module
00312     """
00313     try:
00314       _x = self
00315       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00316       _x = self.header.frame_id
00317       length = len(_x)
00318       if python3 or type(_x) == unicode:
00319         _x = _x.encode('utf-8')
00320         length = len(_x)
00321       buff.write(struct.pack('<I%ss'%length, length, _x))
00322       _x = self.robot_id
00323       length = len(_x)
00324       if python3 or type(_x) == unicode:
00325         _x = _x.encode('utf-8')
00326         length = len(_x)
00327       buff.write(struct.pack('<I%ss'%length, length, _x))
00328       _x = self
00329       buff.write(_struct_f2B10d.pack(_x.radius, _x.holo_robot, _x.controlled, _x.holonomic_velocity.x, _x.holonomic_velocity.y, _x.holonomic_velocity.z, _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))
00330       buff.write(self.pose.covariance.tostring())
00331       _x = self
00332       buff.write(_struct_6d.pack(_x.twist.twist.linear.x, _x.twist.twist.linear.y, _x.twist.twist.linear.z, _x.twist.twist.angular.x, _x.twist.twist.angular.y, _x.twist.twist.angular.z))
00333       buff.write(self.twist.covariance.tostring())
00334       _x = self
00335       buff.write(_struct_3I.pack(_x.footprint.header.seq, _x.footprint.header.stamp.secs, _x.footprint.header.stamp.nsecs))
00336       _x = self.footprint.header.frame_id
00337       length = len(_x)
00338       if python3 or type(_x) == unicode:
00339         _x = _x.encode('utf-8')
00340         length = len(_x)
00341       buff.write(struct.pack('<I%ss'%length, length, _x))
00342       length = len(self.footprint.polygon.points)
00343       buff.write(_struct_I.pack(length))
00344       for val1 in self.footprint.polygon.points:
00345         _x = val1
00346         buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00347     except struct.error as se: self._check_types(se)
00348     except TypeError as te: self._check_types(te)
00349 
00350   def deserialize_numpy(self, str, numpy):
00351     """
00352     unpack serialized message in str into this message instance using numpy for array types
00353     :param str: byte array of serialized message, ``str``
00354     :param numpy: numpy python module
00355     """
00356     try:
00357       if self.header is None:
00358         self.header = std_msgs.msg.Header()
00359       if self.holonomic_velocity is None:
00360         self.holonomic_velocity = geometry_msgs.msg.Vector3()
00361       if self.pose is None:
00362         self.pose = geometry_msgs.msg.PoseWithCovariance()
00363       if self.twist is None:
00364         self.twist = geometry_msgs.msg.TwistWithCovariance()
00365       if self.footprint is None:
00366         self.footprint = geometry_msgs.msg.PolygonStamped()
00367       end = 0
00368       _x = self
00369       start = end
00370       end += 12
00371       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00372       start = end
00373       end += 4
00374       (length,) = _struct_I.unpack(str[start:end])
00375       start = end
00376       end += length
00377       if python3:
00378         self.header.frame_id = str[start:end].decode('utf-8')
00379       else:
00380         self.header.frame_id = str[start:end]
00381       start = end
00382       end += 4
00383       (length,) = _struct_I.unpack(str[start:end])
00384       start = end
00385       end += length
00386       if python3:
00387         self.robot_id = str[start:end].decode('utf-8')
00388       else:
00389         self.robot_id = str[start:end]
00390       _x = self
00391       start = end
00392       end += 86
00393       (_x.radius, _x.holo_robot, _x.controlled, _x.holonomic_velocity.x, _x.holonomic_velocity.y, _x.holonomic_velocity.z, _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,) = _struct_f2B10d.unpack(str[start:end])
00394       self.holo_robot = bool(self.holo_robot)
00395       self.controlled = bool(self.controlled)
00396       start = end
00397       end += 288
00398       self.pose.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
00399       _x = self
00400       start = end
00401       end += 48
00402       (_x.twist.twist.linear.x, _x.twist.twist.linear.y, _x.twist.twist.linear.z, _x.twist.twist.angular.x, _x.twist.twist.angular.y, _x.twist.twist.angular.z,) = _struct_6d.unpack(str[start:end])
00403       start = end
00404       end += 288
00405       self.twist.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
00406       _x = self
00407       start = end
00408       end += 12
00409       (_x.footprint.header.seq, _x.footprint.header.stamp.secs, _x.footprint.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00410       start = end
00411       end += 4
00412       (length,) = _struct_I.unpack(str[start:end])
00413       start = end
00414       end += length
00415       if python3:
00416         self.footprint.header.frame_id = str[start:end].decode('utf-8')
00417       else:
00418         self.footprint.header.frame_id = str[start:end]
00419       start = end
00420       end += 4
00421       (length,) = _struct_I.unpack(str[start:end])
00422       self.footprint.polygon.points = []
00423       for i in range(0, length):
00424         val1 = geometry_msgs.msg.Point32()
00425         _x = val1
00426         start = end
00427         end += 12
00428         (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00429         self.footprint.polygon.points.append(val1)
00430       return self
00431     except struct.error as e:
00432       raise genpy.DeserializationError(e) #most likely buffer underfill
00433 
00434 _struct_I = genpy.struct_I
00435 _struct_36d = struct.Struct("<36d")
00436 _struct_3I = struct.Struct("<3I")
00437 _struct_6d = struct.Struct("<6d")
00438 _struct_f2B10d = struct.Struct("<f2B10d")
00439 _struct_3f = struct.Struct("<3f")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


collvoid_msgs
Author(s): Daniel Claes
autogenerated on Sun Aug 25 2013 10:10:17