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