_DoorActionGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from door_msgs/DoorActionGoal.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 door_msgs.msg
00009 import genpy
00010 import actionlib_msgs.msg
00011 import std_msgs.msg
00012 
00013 class DoorActionGoal(genpy.Message):
00014   _md5sum = "e7c640d872c5b169f989efc688f55658"
00015   _type = "door_msgs/DoorActionGoal"
00016   _has_header = True #flag to mark the presence of a Header object
00017   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00018 
00019 Header header
00020 actionlib_msgs/GoalID goal_id
00021 DoorGoal goal
00022 
00023 ================================================================================
00024 MSG: std_msgs/Header
00025 # Standard metadata for higher-level stamped data types.
00026 # This is generally used to communicate timestamped data 
00027 # in a particular coordinate frame.
00028 # 
00029 # sequence ID: consecutively increasing ID 
00030 uint32 seq
00031 #Two-integer timestamp that is expressed as:
00032 # * stamp.secs: seconds (stamp_secs) since epoch
00033 # * stamp.nsecs: nanoseconds since stamp_secs
00034 # time-handling sugar is provided by the client library
00035 time stamp
00036 #Frame this data is associated with
00037 # 0: no frame
00038 # 1: global frame
00039 string frame_id
00040 
00041 ================================================================================
00042 MSG: actionlib_msgs/GoalID
00043 # The stamp should store the time at which this goal was requested.
00044 # It is used by an action server when it tries to preempt all
00045 # goals that were requested before a certain time
00046 time stamp
00047 
00048 # The id provides a way to associate feedback and
00049 # result message with specific goal requests. The id
00050 # specified must be unique.
00051 string id
00052 
00053 
00054 ================================================================================
00055 MSG: door_msgs/DoorGoal
00056 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00057 # goal
00058 door_msgs/Door door
00059 
00060 ================================================================================
00061 MSG: door_msgs/Door
00062 Header header
00063 geometry_msgs/Point32 frame_p1  ## position of the door frame
00064 geometry_msgs/Point32 frame_p2  ## position of the door frame
00065 geometry_msgs/Point32 door_p1   ## Ground plane projection of a point on the plane of the door 
00066 geometry_msgs/Point32 door_p2   ## Ground plane projection of a point on the plane of the door
00067 geometry_msgs/Point32 handle    ## Position of the door handle
00068 float32 height               ## Height of the door
00069 
00070 int32 UNKNOWN=0
00071 
00072 int32 HINGE_P1=1
00073 int32 HINGE_P2=2
00074 int32 hinge                  
00075 
00076 int32 ROT_DIR_CLOCKWISE=1
00077 int32 ROT_DIR_COUNTERCLOCKWISE=2
00078 int32 rot_dir                
00079 
00080 int32 LOCKED=1
00081 int32 LATCHED=2
00082 int32 UNLATCHED=3
00083 int32 latch_state            
00084 
00085 geometry_msgs/Vector3 travel_dir           ## vector pointing in the direction the robot is going to travel through the door
00086 float32 weight               ## @Sachin: what do we use this for?
00087 
00088 
00089 
00090 ================================================================================
00091 MSG: geometry_msgs/Point32
00092 # This contains the position of a point in free space(with 32 bits of precision).
00093 # It is recommeded to use Point wherever possible instead of Point32.  
00094 # 
00095 # This recommendation is to promote interoperability.  
00096 #
00097 # This message is designed to take up less space when sending
00098 # lots of points at once, as in the case of a PointCloud.  
00099 
00100 float32 x
00101 float32 y
00102 float32 z
00103 ================================================================================
00104 MSG: geometry_msgs/Vector3
00105 # This represents a vector in free space. 
00106 
00107 float64 x
00108 float64 y
00109 float64 z
00110 """
00111   __slots__ = ['header','goal_id','goal']
00112   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalID','door_msgs/DoorGoal']
00113 
00114   def __init__(self, *args, **kwds):
00115     """
00116     Constructor. Any message fields that are implicitly/explicitly
00117     set to None will be assigned a default value. The recommend
00118     use is keyword arguments as this is more robust to future message
00119     changes.  You cannot mix in-order arguments and keyword arguments.
00120 
00121     The available fields are:
00122        header,goal_id,goal
00123 
00124     :param args: complete set of field values, in .msg order
00125     :param kwds: use keyword arguments corresponding to message field names
00126     to set specific fields.
00127     """
00128     if args or kwds:
00129       super(DoorActionGoal, self).__init__(*args, **kwds)
00130       #message fields cannot be None, assign default values for those that are
00131       if self.header is None:
00132         self.header = std_msgs.msg.Header()
00133       if self.goal_id is None:
00134         self.goal_id = actionlib_msgs.msg.GoalID()
00135       if self.goal is None:
00136         self.goal = door_msgs.msg.DoorGoal()
00137     else:
00138       self.header = std_msgs.msg.Header()
00139       self.goal_id = actionlib_msgs.msg.GoalID()
00140       self.goal = door_msgs.msg.DoorGoal()
00141 
00142   def _get_types(self):
00143     """
00144     internal API method
00145     """
00146     return self._slot_types
00147 
00148   def serialize(self, buff):
00149     """
00150     serialize message into buffer
00151     :param buff: buffer, ``StringIO``
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       if python3 or type(_x) == unicode:
00159         _x = _x.encode('utf-8')
00160         length = len(_x)
00161       buff.write(struct.pack('<I%ss'%length, length, _x))
00162       _x = self
00163       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00164       _x = self.goal_id.id
00165       length = len(_x)
00166       if python3 or type(_x) == unicode:
00167         _x = _x.encode('utf-8')
00168         length = len(_x)
00169       buff.write(struct.pack('<I%ss'%length, length, _x))
00170       _x = self
00171       buff.write(_struct_3I.pack(_x.goal.door.header.seq, _x.goal.door.header.stamp.secs, _x.goal.door.header.stamp.nsecs))
00172       _x = self.goal.door.header.frame_id
00173       length = len(_x)
00174       if python3 or type(_x) == unicode:
00175         _x = _x.encode('utf-8')
00176         length = len(_x)
00177       buff.write(struct.pack('<I%ss'%length, length, _x))
00178       _x = self
00179       buff.write(_struct_16f3i3df.pack(_x.goal.door.frame_p1.x, _x.goal.door.frame_p1.y, _x.goal.door.frame_p1.z, _x.goal.door.frame_p2.x, _x.goal.door.frame_p2.y, _x.goal.door.frame_p2.z, _x.goal.door.door_p1.x, _x.goal.door.door_p1.y, _x.goal.door.door_p1.z, _x.goal.door.door_p2.x, _x.goal.door.door_p2.y, _x.goal.door.door_p2.z, _x.goal.door.handle.x, _x.goal.door.handle.y, _x.goal.door.handle.z, _x.goal.door.height, _x.goal.door.hinge, _x.goal.door.rot_dir, _x.goal.door.latch_state, _x.goal.door.travel_dir.x, _x.goal.door.travel_dir.y, _x.goal.door.travel_dir.z, _x.goal.door.weight))
00180     except struct.error as se: self._check_types(se)
00181     except TypeError as te: self._check_types(te)
00182 
00183   def deserialize(self, str):
00184     """
00185     unpack serialized message in str into this message instance
00186     :param str: byte array of serialized message, ``str``
00187     """
00188     try:
00189       if self.header is None:
00190         self.header = std_msgs.msg.Header()
00191       if self.goal_id is None:
00192         self.goal_id = actionlib_msgs.msg.GoalID()
00193       if self.goal is None:
00194         self.goal = door_msgs.msg.DoorGoal()
00195       end = 0
00196       _x = self
00197       start = end
00198       end += 12
00199       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00200       start = end
00201       end += 4
00202       (length,) = _struct_I.unpack(str[start:end])
00203       start = end
00204       end += length
00205       if python3:
00206         self.header.frame_id = str[start:end].decode('utf-8')
00207       else:
00208         self.header.frame_id = str[start:end]
00209       _x = self
00210       start = end
00211       end += 8
00212       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00213       start = end
00214       end += 4
00215       (length,) = _struct_I.unpack(str[start:end])
00216       start = end
00217       end += length
00218       if python3:
00219         self.goal_id.id = str[start:end].decode('utf-8')
00220       else:
00221         self.goal_id.id = str[start:end]
00222       _x = self
00223       start = end
00224       end += 12
00225       (_x.goal.door.header.seq, _x.goal.door.header.stamp.secs, _x.goal.door.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00226       start = end
00227       end += 4
00228       (length,) = _struct_I.unpack(str[start:end])
00229       start = end
00230       end += length
00231       if python3:
00232         self.goal.door.header.frame_id = str[start:end].decode('utf-8')
00233       else:
00234         self.goal.door.header.frame_id = str[start:end]
00235       _x = self
00236       start = end
00237       end += 104
00238       (_x.goal.door.frame_p1.x, _x.goal.door.frame_p1.y, _x.goal.door.frame_p1.z, _x.goal.door.frame_p2.x, _x.goal.door.frame_p2.y, _x.goal.door.frame_p2.z, _x.goal.door.door_p1.x, _x.goal.door.door_p1.y, _x.goal.door.door_p1.z, _x.goal.door.door_p2.x, _x.goal.door.door_p2.y, _x.goal.door.door_p2.z, _x.goal.door.handle.x, _x.goal.door.handle.y, _x.goal.door.handle.z, _x.goal.door.height, _x.goal.door.hinge, _x.goal.door.rot_dir, _x.goal.door.latch_state, _x.goal.door.travel_dir.x, _x.goal.door.travel_dir.y, _x.goal.door.travel_dir.z, _x.goal.door.weight,) = _struct_16f3i3df.unpack(str[start:end])
00239       return self
00240     except struct.error as e:
00241       raise genpy.DeserializationError(e) #most likely buffer underfill
00242 
00243 
00244   def serialize_numpy(self, buff, numpy):
00245     """
00246     serialize message with numpy array types into buffer
00247     :param buff: buffer, ``StringIO``
00248     :param numpy: numpy python module
00249     """
00250     try:
00251       _x = self
00252       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00253       _x = self.header.frame_id
00254       length = len(_x)
00255       if python3 or type(_x) == unicode:
00256         _x = _x.encode('utf-8')
00257         length = len(_x)
00258       buff.write(struct.pack('<I%ss'%length, length, _x))
00259       _x = self
00260       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00261       _x = self.goal_id.id
00262       length = len(_x)
00263       if python3 or type(_x) == unicode:
00264         _x = _x.encode('utf-8')
00265         length = len(_x)
00266       buff.write(struct.pack('<I%ss'%length, length, _x))
00267       _x = self
00268       buff.write(_struct_3I.pack(_x.goal.door.header.seq, _x.goal.door.header.stamp.secs, _x.goal.door.header.stamp.nsecs))
00269       _x = self.goal.door.header.frame_id
00270       length = len(_x)
00271       if python3 or type(_x) == unicode:
00272         _x = _x.encode('utf-8')
00273         length = len(_x)
00274       buff.write(struct.pack('<I%ss'%length, length, _x))
00275       _x = self
00276       buff.write(_struct_16f3i3df.pack(_x.goal.door.frame_p1.x, _x.goal.door.frame_p1.y, _x.goal.door.frame_p1.z, _x.goal.door.frame_p2.x, _x.goal.door.frame_p2.y, _x.goal.door.frame_p2.z, _x.goal.door.door_p1.x, _x.goal.door.door_p1.y, _x.goal.door.door_p1.z, _x.goal.door.door_p2.x, _x.goal.door.door_p2.y, _x.goal.door.door_p2.z, _x.goal.door.handle.x, _x.goal.door.handle.y, _x.goal.door.handle.z, _x.goal.door.height, _x.goal.door.hinge, _x.goal.door.rot_dir, _x.goal.door.latch_state, _x.goal.door.travel_dir.x, _x.goal.door.travel_dir.y, _x.goal.door.travel_dir.z, _x.goal.door.weight))
00277     except struct.error as se: self._check_types(se)
00278     except TypeError as te: self._check_types(te)
00279 
00280   def deserialize_numpy(self, str, numpy):
00281     """
00282     unpack serialized message in str into this message instance using numpy for array types
00283     :param str: byte array of serialized message, ``str``
00284     :param numpy: numpy python module
00285     """
00286     try:
00287       if self.header is None:
00288         self.header = std_msgs.msg.Header()
00289       if self.goal_id is None:
00290         self.goal_id = actionlib_msgs.msg.GoalID()
00291       if self.goal is None:
00292         self.goal = door_msgs.msg.DoorGoal()
00293       end = 0
00294       _x = self
00295       start = end
00296       end += 12
00297       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00298       start = end
00299       end += 4
00300       (length,) = _struct_I.unpack(str[start:end])
00301       start = end
00302       end += length
00303       if python3:
00304         self.header.frame_id = str[start:end].decode('utf-8')
00305       else:
00306         self.header.frame_id = str[start:end]
00307       _x = self
00308       start = end
00309       end += 8
00310       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00311       start = end
00312       end += 4
00313       (length,) = _struct_I.unpack(str[start:end])
00314       start = end
00315       end += length
00316       if python3:
00317         self.goal_id.id = str[start:end].decode('utf-8')
00318       else:
00319         self.goal_id.id = str[start:end]
00320       _x = self
00321       start = end
00322       end += 12
00323       (_x.goal.door.header.seq, _x.goal.door.header.stamp.secs, _x.goal.door.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00324       start = end
00325       end += 4
00326       (length,) = _struct_I.unpack(str[start:end])
00327       start = end
00328       end += length
00329       if python3:
00330         self.goal.door.header.frame_id = str[start:end].decode('utf-8')
00331       else:
00332         self.goal.door.header.frame_id = str[start:end]
00333       _x = self
00334       start = end
00335       end += 104
00336       (_x.goal.door.frame_p1.x, _x.goal.door.frame_p1.y, _x.goal.door.frame_p1.z, _x.goal.door.frame_p2.x, _x.goal.door.frame_p2.y, _x.goal.door.frame_p2.z, _x.goal.door.door_p1.x, _x.goal.door.door_p1.y, _x.goal.door.door_p1.z, _x.goal.door.door_p2.x, _x.goal.door.door_p2.y, _x.goal.door.door_p2.z, _x.goal.door.handle.x, _x.goal.door.handle.y, _x.goal.door.handle.z, _x.goal.door.height, _x.goal.door.hinge, _x.goal.door.rot_dir, _x.goal.door.latch_state, _x.goal.door.travel_dir.x, _x.goal.door.travel_dir.y, _x.goal.door.travel_dir.z, _x.goal.door.weight,) = _struct_16f3i3df.unpack(str[start:end])
00337       return self
00338     except struct.error as e:
00339       raise genpy.DeserializationError(e) #most likely buffer underfill
00340 
00341 _struct_I = genpy.struct_I
00342 _struct_3I = struct.Struct("<3I")
00343 _struct_16f3i3df = struct.Struct("<16f3i3df")
00344 _struct_2I = struct.Struct("<2I")


door_msgs
Author(s): Wim Meeussen
autogenerated on Wed Dec 11 2013 14:16:35