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