_CameraPose.py
Go to the documentation of this file.
00001 """autogenerated by genpy from camera_pose_calibration/CameraPose.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 
00009 class CameraPose(genpy.Message):
00010   _md5sum = "eb4c53d8c0c861e2c5d562bd921bb38e"
00011   _type = "camera_pose_calibration/CameraPose"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """string camera_id
00014 geometry_msgs/Pose pose
00015 
00016 ================================================================================
00017 MSG: geometry_msgs/Pose
00018 # A representation of pose in free space, composed of postion and orientation. 
00019 Point position
00020 Quaternion orientation
00021 
00022 ================================================================================
00023 MSG: geometry_msgs/Point
00024 # This contains the position of a point in free space
00025 float64 x
00026 float64 y
00027 float64 z
00028 
00029 ================================================================================
00030 MSG: geometry_msgs/Quaternion
00031 # This represents an orientation in free space in quaternion form.
00032 
00033 float64 x
00034 float64 y
00035 float64 z
00036 float64 w
00037 
00038 """
00039   __slots__ = ['camera_id','pose']
00040   _slot_types = ['string','geometry_msgs/Pose']
00041 
00042   def __init__(self, *args, **kwds):
00043     """
00044     Constructor. Any message fields that are implicitly/explicitly
00045     set to None will be assigned a default value. The recommend
00046     use is keyword arguments as this is more robust to future message
00047     changes.  You cannot mix in-order arguments and keyword arguments.
00048 
00049     The available fields are:
00050        camera_id,pose
00051 
00052     :param args: complete set of field values, in .msg order
00053     :param kwds: use keyword arguments corresponding to message field names
00054     to set specific fields.
00055     """
00056     if args or kwds:
00057       super(CameraPose, self).__init__(*args, **kwds)
00058       #message fields cannot be None, assign default values for those that are
00059       if self.camera_id is None:
00060         self.camera_id = ''
00061       if self.pose is None:
00062         self.pose = geometry_msgs.msg.Pose()
00063     else:
00064       self.camera_id = ''
00065       self.pose = geometry_msgs.msg.Pose()
00066 
00067   def _get_types(self):
00068     """
00069     internal API method
00070     """
00071     return self._slot_types
00072 
00073   def serialize(self, buff):
00074     """
00075     serialize message into buffer
00076     :param buff: buffer, ``StringIO``
00077     """
00078     try:
00079       _x = self.camera_id
00080       length = len(_x)
00081       if python3 or type(_x) == unicode:
00082         _x = _x.encode('utf-8')
00083         length = len(_x)
00084       buff.write(struct.pack('<I%ss'%length, length, _x))
00085       _x = self
00086       buff.write(_struct_7d.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))
00087     except struct.error as se: self._check_types(se)
00088     except TypeError as te: self._check_types(te)
00089 
00090   def deserialize(self, str):
00091     """
00092     unpack serialized message in str into this message instance
00093     :param str: byte array of serialized message, ``str``
00094     """
00095     try:
00096       if self.pose is None:
00097         self.pose = geometry_msgs.msg.Pose()
00098       end = 0
00099       start = end
00100       end += 4
00101       (length,) = _struct_I.unpack(str[start:end])
00102       start = end
00103       end += length
00104       if python3:
00105         self.camera_id = str[start:end].decode('utf-8')
00106       else:
00107         self.camera_id = str[start:end]
00108       _x = self
00109       start = end
00110       end += 56
00111       (_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,) = _struct_7d.unpack(str[start:end])
00112       return self
00113     except struct.error as e:
00114       raise genpy.DeserializationError(e) #most likely buffer underfill
00115 
00116 
00117   def serialize_numpy(self, buff, numpy):
00118     """
00119     serialize message with numpy array types into buffer
00120     :param buff: buffer, ``StringIO``
00121     :param numpy: numpy python module
00122     """
00123     try:
00124       _x = self.camera_id
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
00131       buff.write(_struct_7d.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))
00132     except struct.error as se: self._check_types(se)
00133     except TypeError as te: self._check_types(te)
00134 
00135   def deserialize_numpy(self, str, numpy):
00136     """
00137     unpack serialized message in str into this message instance using numpy for array types
00138     :param str: byte array of serialized message, ``str``
00139     :param numpy: numpy python module
00140     """
00141     try:
00142       if self.pose is None:
00143         self.pose = geometry_msgs.msg.Pose()
00144       end = 0
00145       start = end
00146       end += 4
00147       (length,) = _struct_I.unpack(str[start:end])
00148       start = end
00149       end += length
00150       if python3:
00151         self.camera_id = str[start:end].decode('utf-8')
00152       else:
00153         self.camera_id = str[start:end]
00154       _x = self
00155       start = end
00156       end += 56
00157       (_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,) = _struct_7d.unpack(str[start:end])
00158       return self
00159     except struct.error as e:
00160       raise genpy.DeserializationError(e) #most likely buffer underfill
00161 
00162 _struct_I = genpy.struct_I
00163 _struct_7d = struct.Struct("<7d")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


camera_pose_calibration
Author(s): Vijay Pradeep, Wim Meeussen
autogenerated on Thu Aug 15 2013 12:02:24