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