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