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


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