00001 """autogenerated by genpy from arm_navigation_msgs/MoveArmStatistics.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 arm_navigation_msgs.msg
00008
00009 class MoveArmStatistics(genpy.Message):
00010 _md5sum = "d83dee1348791a0d1414257b41bc161f"
00011 _type = "arm_navigation_msgs/MoveArmStatistics"
00012 _has_header = False
00013 _full_text = """int32 request_id
00014 string result
00015 arm_navigation_msgs/ArmNavigationErrorCodes error_code
00016
00017 float64 planning_time
00018 float64 smoothing_time
00019 float64 ik_time
00020 float64 time_to_execution
00021 float64 time_to_result
00022
00023 bool preempted
00024
00025 float64 num_replans
00026 float64 trajectory_duration
00027
00028 string planner_service_name
00029
00030 ================================================================================
00031 MSG: arm_navigation_msgs/ArmNavigationErrorCodes
00032 int32 val
00033
00034 # overall behavior
00035 int32 PLANNING_FAILED=-1
00036 int32 SUCCESS=1
00037 int32 TIMED_OUT=-2
00038
00039 # start state errors
00040 int32 START_STATE_IN_COLLISION=-3
00041 int32 START_STATE_VIOLATES_PATH_CONSTRAINTS=-4
00042
00043 # goal errors
00044 int32 GOAL_IN_COLLISION=-5
00045 int32 GOAL_VIOLATES_PATH_CONSTRAINTS=-6
00046
00047 # robot state
00048 int32 INVALID_ROBOT_STATE=-7
00049 int32 INCOMPLETE_ROBOT_STATE=-8
00050
00051 # planning request errors
00052 int32 INVALID_PLANNER_ID=-9
00053 int32 INVALID_NUM_PLANNING_ATTEMPTS=-10
00054 int32 INVALID_ALLOWED_PLANNING_TIME=-11
00055 int32 INVALID_GROUP_NAME=-12
00056 int32 INVALID_GOAL_JOINT_CONSTRAINTS=-13
00057 int32 INVALID_GOAL_POSITION_CONSTRAINTS=-14
00058 int32 INVALID_GOAL_ORIENTATION_CONSTRAINTS=-15
00059 int32 INVALID_PATH_JOINT_CONSTRAINTS=-16
00060 int32 INVALID_PATH_POSITION_CONSTRAINTS=-17
00061 int32 INVALID_PATH_ORIENTATION_CONSTRAINTS=-18
00062
00063 # state/trajectory monitor errors
00064 int32 INVALID_TRAJECTORY=-19
00065 int32 INVALID_INDEX=-20
00066 int32 JOINT_LIMITS_VIOLATED=-21
00067 int32 PATH_CONSTRAINTS_VIOLATED=-22
00068 int32 COLLISION_CONSTRAINTS_VIOLATED=-23
00069 int32 GOAL_CONSTRAINTS_VIOLATED=-24
00070 int32 JOINTS_NOT_MOVING=-25
00071 int32 TRAJECTORY_CONTROLLER_FAILED=-26
00072
00073 # system errors
00074 int32 FRAME_TRANSFORM_FAILURE=-27
00075 int32 COLLISION_CHECKING_UNAVAILABLE=-28
00076 int32 ROBOT_STATE_STALE=-29
00077 int32 SENSOR_INFO_STALE=-30
00078
00079 # kinematics errors
00080 int32 NO_IK_SOLUTION=-31
00081 int32 INVALID_LINK_NAME=-32
00082 int32 IK_LINK_IN_COLLISION=-33
00083 int32 NO_FK_SOLUTION=-34
00084 int32 KINEMATICS_STATE_IN_COLLISION=-35
00085
00086 # general errors
00087 int32 INVALID_TIMEOUT=-36
00088
00089
00090 """
00091 __slots__ = ['request_id','result','error_code','planning_time','smoothing_time','ik_time','time_to_execution','time_to_result','preempted','num_replans','trajectory_duration','planner_service_name']
00092 _slot_types = ['int32','string','arm_navigation_msgs/ArmNavigationErrorCodes','float64','float64','float64','float64','float64','bool','float64','float64','string']
00093
00094 def __init__(self, *args, **kwds):
00095 """
00096 Constructor. Any message fields that are implicitly/explicitly
00097 set to None will be assigned a default value. The recommend
00098 use is keyword arguments as this is more robust to future message
00099 changes. You cannot mix in-order arguments and keyword arguments.
00100
00101 The available fields are:
00102 request_id,result,error_code,planning_time,smoothing_time,ik_time,time_to_execution,time_to_result,preempted,num_replans,trajectory_duration,planner_service_name
00103
00104 :param args: complete set of field values, in .msg order
00105 :param kwds: use keyword arguments corresponding to message field names
00106 to set specific fields.
00107 """
00108 if args or kwds:
00109 super(MoveArmStatistics, self).__init__(*args, **kwds)
00110
00111 if self.request_id is None:
00112 self.request_id = 0
00113 if self.result is None:
00114 self.result = ''
00115 if self.error_code is None:
00116 self.error_code = arm_navigation_msgs.msg.ArmNavigationErrorCodes()
00117 if self.planning_time is None:
00118 self.planning_time = 0.
00119 if self.smoothing_time is None:
00120 self.smoothing_time = 0.
00121 if self.ik_time is None:
00122 self.ik_time = 0.
00123 if self.time_to_execution is None:
00124 self.time_to_execution = 0.
00125 if self.time_to_result is None:
00126 self.time_to_result = 0.
00127 if self.preempted is None:
00128 self.preempted = False
00129 if self.num_replans is None:
00130 self.num_replans = 0.
00131 if self.trajectory_duration is None:
00132 self.trajectory_duration = 0.
00133 if self.planner_service_name is None:
00134 self.planner_service_name = ''
00135 else:
00136 self.request_id = 0
00137 self.result = ''
00138 self.error_code = arm_navigation_msgs.msg.ArmNavigationErrorCodes()
00139 self.planning_time = 0.
00140 self.smoothing_time = 0.
00141 self.ik_time = 0.
00142 self.time_to_execution = 0.
00143 self.time_to_result = 0.
00144 self.preempted = False
00145 self.num_replans = 0.
00146 self.trajectory_duration = 0.
00147 self.planner_service_name = ''
00148
00149 def _get_types(self):
00150 """
00151 internal API method
00152 """
00153 return self._slot_types
00154
00155 def serialize(self, buff):
00156 """
00157 serialize message into buffer
00158 :param buff: buffer, ``StringIO``
00159 """
00160 try:
00161 buff.write(_struct_i.pack(self.request_id))
00162 _x = self.result
00163 length = len(_x)
00164 if python3 or type(_x) == unicode:
00165 _x = _x.encode('utf-8')
00166 length = len(_x)
00167 buff.write(struct.pack('<I%ss'%length, length, _x))
00168 _x = self
00169 buff.write(_struct_i5dB2d.pack(_x.error_code.val, _x.planning_time, _x.smoothing_time, _x.ik_time, _x.time_to_execution, _x.time_to_result, _x.preempted, _x.num_replans, _x.trajectory_duration))
00170 _x = self.planner_service_name
00171 length = len(_x)
00172 if python3 or type(_x) == unicode:
00173 _x = _x.encode('utf-8')
00174 length = len(_x)
00175 buff.write(struct.pack('<I%ss'%length, length, _x))
00176 except struct.error as se: self._check_types(se)
00177 except TypeError as te: self._check_types(te)
00178
00179 def deserialize(self, str):
00180 """
00181 unpack serialized message in str into this message instance
00182 :param str: byte array of serialized message, ``str``
00183 """
00184 try:
00185 if self.error_code is None:
00186 self.error_code = arm_navigation_msgs.msg.ArmNavigationErrorCodes()
00187 end = 0
00188 start = end
00189 end += 4
00190 (self.request_id,) = _struct_i.unpack(str[start:end])
00191 start = end
00192 end += 4
00193 (length,) = _struct_I.unpack(str[start:end])
00194 start = end
00195 end += length
00196 if python3:
00197 self.result = str[start:end].decode('utf-8')
00198 else:
00199 self.result = str[start:end]
00200 _x = self
00201 start = end
00202 end += 61
00203 (_x.error_code.val, _x.planning_time, _x.smoothing_time, _x.ik_time, _x.time_to_execution, _x.time_to_result, _x.preempted, _x.num_replans, _x.trajectory_duration,) = _struct_i5dB2d.unpack(str[start:end])
00204 self.preempted = bool(self.preempted)
00205 start = end
00206 end += 4
00207 (length,) = _struct_I.unpack(str[start:end])
00208 start = end
00209 end += length
00210 if python3:
00211 self.planner_service_name = str[start:end].decode('utf-8')
00212 else:
00213 self.planner_service_name = str[start:end]
00214 return self
00215 except struct.error as e:
00216 raise genpy.DeserializationError(e)
00217
00218
00219 def serialize_numpy(self, buff, numpy):
00220 """
00221 serialize message with numpy array types into buffer
00222 :param buff: buffer, ``StringIO``
00223 :param numpy: numpy python module
00224 """
00225 try:
00226 buff.write(_struct_i.pack(self.request_id))
00227 _x = self.result
00228 length = len(_x)
00229 if python3 or type(_x) == unicode:
00230 _x = _x.encode('utf-8')
00231 length = len(_x)
00232 buff.write(struct.pack('<I%ss'%length, length, _x))
00233 _x = self
00234 buff.write(_struct_i5dB2d.pack(_x.error_code.val, _x.planning_time, _x.smoothing_time, _x.ik_time, _x.time_to_execution, _x.time_to_result, _x.preempted, _x.num_replans, _x.trajectory_duration))
00235 _x = self.planner_service_name
00236 length = len(_x)
00237 if python3 or type(_x) == unicode:
00238 _x = _x.encode('utf-8')
00239 length = len(_x)
00240 buff.write(struct.pack('<I%ss'%length, length, _x))
00241 except struct.error as se: self._check_types(se)
00242 except TypeError as te: self._check_types(te)
00243
00244 def deserialize_numpy(self, str, numpy):
00245 """
00246 unpack serialized message in str into this message instance using numpy for array types
00247 :param str: byte array of serialized message, ``str``
00248 :param numpy: numpy python module
00249 """
00250 try:
00251 if self.error_code is None:
00252 self.error_code = arm_navigation_msgs.msg.ArmNavigationErrorCodes()
00253 end = 0
00254 start = end
00255 end += 4
00256 (self.request_id,) = _struct_i.unpack(str[start:end])
00257 start = end
00258 end += 4
00259 (length,) = _struct_I.unpack(str[start:end])
00260 start = end
00261 end += length
00262 if python3:
00263 self.result = str[start:end].decode('utf-8')
00264 else:
00265 self.result = str[start:end]
00266 _x = self
00267 start = end
00268 end += 61
00269 (_x.error_code.val, _x.planning_time, _x.smoothing_time, _x.ik_time, _x.time_to_execution, _x.time_to_result, _x.preempted, _x.num_replans, _x.trajectory_duration,) = _struct_i5dB2d.unpack(str[start:end])
00270 self.preempted = bool(self.preempted)
00271 start = end
00272 end += 4
00273 (length,) = _struct_I.unpack(str[start:end])
00274 start = end
00275 end += length
00276 if python3:
00277 self.planner_service_name = str[start:end].decode('utf-8')
00278 else:
00279 self.planner_service_name = str[start:end]
00280 return self
00281 except struct.error as e:
00282 raise genpy.DeserializationError(e)
00283
00284 _struct_I = genpy.struct_I
00285 _struct_i = struct.Struct("<i")
00286 _struct_i5dB2d = struct.Struct("<i5dB2d")