$search
00001 """autogenerated by genmsg_py from RVIZCameraPosition.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import std_msgs.msg 00007 00008 class RVIZCameraPosition(roslib.message.Message): 00009 _md5sum = "2a42aa57dda1717b6865f2b444c08b8e" 00010 _type = "srs_env_model_msgs/RVIZCameraPosition" 00011 _has_header = True #flag to mark the presence of a Header object 00012 _full_text = """Header header 00013 geometry_msgs/Vector3 position 00014 geometry_msgs/Vector3 direction 00015 geometry_msgs/Quaternion orientation 00016 00017 00018 ================================================================================ 00019 MSG: std_msgs/Header 00020 # Standard metadata for higher-level stamped data types. 00021 # This is generally used to communicate timestamped data 00022 # in a particular coordinate frame. 00023 # 00024 # sequence ID: consecutively increasing ID 00025 uint32 seq 00026 #Two-integer timestamp that is expressed as: 00027 # * stamp.secs: seconds (stamp_secs) since epoch 00028 # * stamp.nsecs: nanoseconds since stamp_secs 00029 # time-handling sugar is provided by the client library 00030 time stamp 00031 #Frame this data is associated with 00032 # 0: no frame 00033 # 1: global frame 00034 string frame_id 00035 00036 ================================================================================ 00037 MSG: geometry_msgs/Vector3 00038 # This represents a vector in free space. 00039 00040 float64 x 00041 float64 y 00042 float64 z 00043 ================================================================================ 00044 MSG: geometry_msgs/Quaternion 00045 # This represents an orientation in free space in quaternion form. 00046 00047 float64 x 00048 float64 y 00049 float64 z 00050 float64 w 00051 00052 """ 00053 __slots__ = ['header','position','direction','orientation'] 00054 _slot_types = ['Header','geometry_msgs/Vector3','geometry_msgs/Vector3','geometry_msgs/Quaternion'] 00055 00056 def __init__(self, *args, **kwds): 00057 """ 00058 Constructor. Any message fields that are implicitly/explicitly 00059 set to None will be assigned a default value. The recommend 00060 use is keyword arguments as this is more robust to future message 00061 changes. You cannot mix in-order arguments and keyword arguments. 00062 00063 The available fields are: 00064 header,position,direction,orientation 00065 00066 @param args: complete set of field values, in .msg order 00067 @param kwds: use keyword arguments corresponding to message field names 00068 to set specific fields. 00069 """ 00070 if args or kwds: 00071 super(RVIZCameraPosition, self).__init__(*args, **kwds) 00072 #message fields cannot be None, assign default values for those that are 00073 if self.header is None: 00074 self.header = std_msgs.msg._Header.Header() 00075 if self.position is None: 00076 self.position = geometry_msgs.msg.Vector3() 00077 if self.direction is None: 00078 self.direction = geometry_msgs.msg.Vector3() 00079 if self.orientation is None: 00080 self.orientation = geometry_msgs.msg.Quaternion() 00081 else: 00082 self.header = std_msgs.msg._Header.Header() 00083 self.position = geometry_msgs.msg.Vector3() 00084 self.direction = geometry_msgs.msg.Vector3() 00085 self.orientation = geometry_msgs.msg.Quaternion() 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_10d.pack(_x.position.x, _x.position.y, _x.position.z, _x.direction.x, _x.direction.y, _x.direction.z, _x.orientation.x, _x.orientation.y, _x.orientation.z, _x.orientation.w)) 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.position is None: 00120 self.position = geometry_msgs.msg.Vector3() 00121 if self.direction is None: 00122 self.direction = geometry_msgs.msg.Vector3() 00123 if self.orientation is None: 00124 self.orientation = geometry_msgs.msg.Quaternion() 00125 end = 0 00126 _x = self 00127 start = end 00128 end += 12 00129 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00130 start = end 00131 end += 4 00132 (length,) = _struct_I.unpack(str[start:end]) 00133 start = end 00134 end += length 00135 self.header.frame_id = str[start:end] 00136 _x = self 00137 start = end 00138 end += 80 00139 (_x.position.x, _x.position.y, _x.position.z, _x.direction.x, _x.direction.y, _x.direction.z, _x.orientation.x, _x.orientation.y, _x.orientation.z, _x.orientation.w,) = _struct_10d.unpack(str[start:end]) 00140 return self 00141 except struct.error as e: 00142 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00143 00144 00145 def serialize_numpy(self, buff, numpy): 00146 """ 00147 serialize message with numpy array types into buffer 00148 @param buff: buffer 00149 @type buff: StringIO 00150 @param numpy: numpy python module 00151 @type numpy module 00152 """ 00153 try: 00154 _x = self 00155 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00156 _x = self.header.frame_id 00157 length = len(_x) 00158 buff.write(struct.pack('<I%ss'%length, length, _x)) 00159 _x = self 00160 buff.write(_struct_10d.pack(_x.position.x, _x.position.y, _x.position.z, _x.direction.x, _x.direction.y, _x.direction.z, _x.orientation.x, _x.orientation.y, _x.orientation.z, _x.orientation.w)) 00161 except struct.error as se: self._check_types(se) 00162 except TypeError as te: self._check_types(te) 00163 00164 def deserialize_numpy(self, str, numpy): 00165 """ 00166 unpack serialized message in str into this message instance using numpy for array types 00167 @param str: byte array of serialized message 00168 @type str: str 00169 @param numpy: numpy python module 00170 @type numpy: module 00171 """ 00172 try: 00173 if self.header is None: 00174 self.header = std_msgs.msg._Header.Header() 00175 if self.position is None: 00176 self.position = geometry_msgs.msg.Vector3() 00177 if self.direction is None: 00178 self.direction = geometry_msgs.msg.Vector3() 00179 if self.orientation is None: 00180 self.orientation = geometry_msgs.msg.Quaternion() 00181 end = 0 00182 _x = self 00183 start = end 00184 end += 12 00185 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00186 start = end 00187 end += 4 00188 (length,) = _struct_I.unpack(str[start:end]) 00189 start = end 00190 end += length 00191 self.header.frame_id = str[start:end] 00192 _x = self 00193 start = end 00194 end += 80 00195 (_x.position.x, _x.position.y, _x.position.z, _x.direction.x, _x.direction.y, _x.direction.z, _x.orientation.x, _x.orientation.y, _x.orientation.z, _x.orientation.w,) = _struct_10d.unpack(str[start:end]) 00196 return self 00197 except struct.error as e: 00198 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00199 00200 _struct_I = roslib.message.struct_I 00201 _struct_3I = struct.Struct("<3I") 00202 _struct_10d = struct.Struct("<10d")