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


arm_navigation_msgs
Author(s): Gil Jones
autogenerated on Thu Dec 12 2013 11:08:10