$search
00001 """autogenerated by genmsg_py from EECartImpedFeedback.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import roslib.rostime 00007 import ee_cart_imped_msgs.msg 00008 import std_msgs.msg 00009 00010 class EECartImpedFeedback(roslib.message.Message): 00011 _md5sum = "4106b02683301dac2003809bdf610591" 00012 _type = "ee_cart_imped_msgs/EECartImpedFeedback" 00013 _has_header = True #flag to mark the presence of a Header object 00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00015 #feedback 00016 #current pose and squared error in force 00017 #and the running time of this goal so far 00018 Header header 00019 ee_cart_imped_msgs/StiffPoint[] goal 00020 ee_cart_imped_msgs/StiffPoint initial_point 00021 ee_cart_imped_msgs/StiffPoint desired 00022 ee_cart_imped_msgs/StiffPoint actual_pose 00023 float64 effort_sq_error 00024 float64[] requested_joint_efforts 00025 float64[] actual_joint_efforts 00026 duration running_time 00027 00028 00029 00030 ================================================================================ 00031 MSG: std_msgs/Header 00032 # Standard metadata for higher-level stamped data types. 00033 # This is generally used to communicate timestamped data 00034 # in a particular coordinate frame. 00035 # 00036 # sequence ID: consecutively increasing ID 00037 uint32 seq 00038 #Two-integer timestamp that is expressed as: 00039 # * stamp.secs: seconds (stamp_secs) since epoch 00040 # * stamp.nsecs: nanoseconds since stamp_secs 00041 # time-handling sugar is provided by the client library 00042 time stamp 00043 #Frame this data is associated with 00044 # 0: no frame 00045 # 1: global frame 00046 string frame_id 00047 00048 ================================================================================ 00049 MSG: ee_cart_imped_msgs/StiffPoint 00050 Header header 00051 #The pose to achieve in the stiffness directions 00052 geometry_msgs/Pose pose 00053 #Wrench or stiffness for each dimension 00054 geometry_msgs/Wrench wrench_or_stiffness 00055 #The following are True if a force/torque should 00056 #be exerted and False if a stiffness should be used. 00057 bool isForceX 00058 bool isForceY 00059 bool isForceZ 00060 bool isTorqueX 00061 bool isTorqueY 00062 bool isTorqueZ 00063 #The time from the start of the trajectory that this 00064 #point should be achieved. 00065 duration time_from_start 00066 ================================================================================ 00067 MSG: geometry_msgs/Pose 00068 # A representation of pose in free space, composed of postion and orientation. 00069 Point position 00070 Quaternion orientation 00071 00072 ================================================================================ 00073 MSG: geometry_msgs/Point 00074 # This contains the position of a point in free space 00075 float64 x 00076 float64 y 00077 float64 z 00078 00079 ================================================================================ 00080 MSG: geometry_msgs/Quaternion 00081 # This represents an orientation in free space in quaternion form. 00082 00083 float64 x 00084 float64 y 00085 float64 z 00086 float64 w 00087 00088 ================================================================================ 00089 MSG: geometry_msgs/Wrench 00090 # This represents force in free space, seperated into 00091 # it's linear and angular parts. 00092 Vector3 force 00093 Vector3 torque 00094 00095 ================================================================================ 00096 MSG: geometry_msgs/Vector3 00097 # This represents a vector in free space. 00098 00099 float64 x 00100 float64 y 00101 float64 z 00102 """ 00103 __slots__ = ['header','goal','initial_point','desired','actual_pose','effort_sq_error','requested_joint_efforts','actual_joint_efforts','running_time'] 00104 _slot_types = ['Header','ee_cart_imped_msgs/StiffPoint[]','ee_cart_imped_msgs/StiffPoint','ee_cart_imped_msgs/StiffPoint','ee_cart_imped_msgs/StiffPoint','float64','float64[]','float64[]','duration'] 00105 00106 def __init__(self, *args, **kwds): 00107 """ 00108 Constructor. Any message fields that are implicitly/explicitly 00109 set to None will be assigned a default value. The recommend 00110 use is keyword arguments as this is more robust to future message 00111 changes. You cannot mix in-order arguments and keyword arguments. 00112 00113 The available fields are: 00114 header,goal,initial_point,desired,actual_pose,effort_sq_error,requested_joint_efforts,actual_joint_efforts,running_time 00115 00116 @param args: complete set of field values, in .msg order 00117 @param kwds: use keyword arguments corresponding to message field names 00118 to set specific fields. 00119 """ 00120 if args or kwds: 00121 super(EECartImpedFeedback, self).__init__(*args, **kwds) 00122 #message fields cannot be None, assign default values for those that are 00123 if self.header is None: 00124 self.header = std_msgs.msg._Header.Header() 00125 if self.goal is None: 00126 self.goal = [] 00127 if self.initial_point is None: 00128 self.initial_point = ee_cart_imped_msgs.msg.StiffPoint() 00129 if self.desired is None: 00130 self.desired = ee_cart_imped_msgs.msg.StiffPoint() 00131 if self.actual_pose is None: 00132 self.actual_pose = ee_cart_imped_msgs.msg.StiffPoint() 00133 if self.effort_sq_error is None: 00134 self.effort_sq_error = 0. 00135 if self.requested_joint_efforts is None: 00136 self.requested_joint_efforts = [] 00137 if self.actual_joint_efforts is None: 00138 self.actual_joint_efforts = [] 00139 if self.running_time is None: 00140 self.running_time = roslib.rostime.Duration() 00141 else: 00142 self.header = std_msgs.msg._Header.Header() 00143 self.goal = [] 00144 self.initial_point = ee_cart_imped_msgs.msg.StiffPoint() 00145 self.desired = ee_cart_imped_msgs.msg.StiffPoint() 00146 self.actual_pose = ee_cart_imped_msgs.msg.StiffPoint() 00147 self.effort_sq_error = 0. 00148 self.requested_joint_efforts = [] 00149 self.actual_joint_efforts = [] 00150 self.running_time = roslib.rostime.Duration() 00151 00152 def _get_types(self): 00153 """ 00154 internal API method 00155 """ 00156 return self._slot_types 00157 00158 def serialize(self, buff): 00159 """ 00160 serialize message into buffer 00161 @param buff: buffer 00162 @type buff: StringIO 00163 """ 00164 try: 00165 _x = self 00166 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00167 _x = self.header.frame_id 00168 length = len(_x) 00169 buff.write(struct.pack('<I%ss'%length, length, _x)) 00170 length = len(self.goal) 00171 buff.write(_struct_I.pack(length)) 00172 for val1 in self.goal: 00173 _v1 = val1.header 00174 buff.write(_struct_I.pack(_v1.seq)) 00175 _v2 = _v1.stamp 00176 _x = _v2 00177 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00178 _x = _v1.frame_id 00179 length = len(_x) 00180 buff.write(struct.pack('<I%ss'%length, length, _x)) 00181 _v3 = val1.pose 00182 _v4 = _v3.position 00183 _x = _v4 00184 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00185 _v5 = _v3.orientation 00186 _x = _v5 00187 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00188 _v6 = val1.wrench_or_stiffness 00189 _v7 = _v6.force 00190 _x = _v7 00191 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00192 _v8 = _v6.torque 00193 _x = _v8 00194 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00195 _x = val1 00196 buff.write(_struct_6B.pack(_x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ)) 00197 _v9 = val1.time_from_start 00198 _x = _v9 00199 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00200 _x = self 00201 buff.write(_struct_3I.pack(_x.initial_point.header.seq, _x.initial_point.header.stamp.secs, _x.initial_point.header.stamp.nsecs)) 00202 _x = self.initial_point.header.frame_id 00203 length = len(_x) 00204 buff.write(struct.pack('<I%ss'%length, length, _x)) 00205 _x = self 00206 buff.write(_struct_13d6B2i3I.pack(_x.initial_point.pose.position.x, _x.initial_point.pose.position.y, _x.initial_point.pose.position.z, _x.initial_point.pose.orientation.x, _x.initial_point.pose.orientation.y, _x.initial_point.pose.orientation.z, _x.initial_point.pose.orientation.w, _x.initial_point.wrench_or_stiffness.force.x, _x.initial_point.wrench_or_stiffness.force.y, _x.initial_point.wrench_or_stiffness.force.z, _x.initial_point.wrench_or_stiffness.torque.x, _x.initial_point.wrench_or_stiffness.torque.y, _x.initial_point.wrench_or_stiffness.torque.z, _x.initial_point.isForceX, _x.initial_point.isForceY, _x.initial_point.isForceZ, _x.initial_point.isTorqueX, _x.initial_point.isTorqueY, _x.initial_point.isTorqueZ, _x.initial_point.time_from_start.secs, _x.initial_point.time_from_start.nsecs, _x.desired.header.seq, _x.desired.header.stamp.secs, _x.desired.header.stamp.nsecs)) 00207 _x = self.desired.header.frame_id 00208 length = len(_x) 00209 buff.write(struct.pack('<I%ss'%length, length, _x)) 00210 _x = self 00211 buff.write(_struct_13d6B2i3I.pack(_x.desired.pose.position.x, _x.desired.pose.position.y, _x.desired.pose.position.z, _x.desired.pose.orientation.x, _x.desired.pose.orientation.y, _x.desired.pose.orientation.z, _x.desired.pose.orientation.w, _x.desired.wrench_or_stiffness.force.x, _x.desired.wrench_or_stiffness.force.y, _x.desired.wrench_or_stiffness.force.z, _x.desired.wrench_or_stiffness.torque.x, _x.desired.wrench_or_stiffness.torque.y, _x.desired.wrench_or_stiffness.torque.z, _x.desired.isForceX, _x.desired.isForceY, _x.desired.isForceZ, _x.desired.isTorqueX, _x.desired.isTorqueY, _x.desired.isTorqueZ, _x.desired.time_from_start.secs, _x.desired.time_from_start.nsecs, _x.actual_pose.header.seq, _x.actual_pose.header.stamp.secs, _x.actual_pose.header.stamp.nsecs)) 00212 _x = self.actual_pose.header.frame_id 00213 length = len(_x) 00214 buff.write(struct.pack('<I%ss'%length, length, _x)) 00215 _x = self 00216 buff.write(_struct_13d6B2id.pack(_x.actual_pose.pose.position.x, _x.actual_pose.pose.position.y, _x.actual_pose.pose.position.z, _x.actual_pose.pose.orientation.x, _x.actual_pose.pose.orientation.y, _x.actual_pose.pose.orientation.z, _x.actual_pose.pose.orientation.w, _x.actual_pose.wrench_or_stiffness.force.x, _x.actual_pose.wrench_or_stiffness.force.y, _x.actual_pose.wrench_or_stiffness.force.z, _x.actual_pose.wrench_or_stiffness.torque.x, _x.actual_pose.wrench_or_stiffness.torque.y, _x.actual_pose.wrench_or_stiffness.torque.z, _x.actual_pose.isForceX, _x.actual_pose.isForceY, _x.actual_pose.isForceZ, _x.actual_pose.isTorqueX, _x.actual_pose.isTorqueY, _x.actual_pose.isTorqueZ, _x.actual_pose.time_from_start.secs, _x.actual_pose.time_from_start.nsecs, _x.effort_sq_error)) 00217 length = len(self.requested_joint_efforts) 00218 buff.write(_struct_I.pack(length)) 00219 pattern = '<%sd'%length 00220 buff.write(struct.pack(pattern, *self.requested_joint_efforts)) 00221 length = len(self.actual_joint_efforts) 00222 buff.write(_struct_I.pack(length)) 00223 pattern = '<%sd'%length 00224 buff.write(struct.pack(pattern, *self.actual_joint_efforts)) 00225 _x = self 00226 buff.write(_struct_2i.pack(_x.running_time.secs, _x.running_time.nsecs)) 00227 except struct.error as se: self._check_types(se) 00228 except TypeError as te: self._check_types(te) 00229 00230 def deserialize(self, str): 00231 """ 00232 unpack serialized message in str into this message instance 00233 @param str: byte array of serialized message 00234 @type str: str 00235 """ 00236 try: 00237 if self.header is None: 00238 self.header = std_msgs.msg._Header.Header() 00239 if self.initial_point is None: 00240 self.initial_point = ee_cart_imped_msgs.msg.StiffPoint() 00241 if self.desired is None: 00242 self.desired = ee_cart_imped_msgs.msg.StiffPoint() 00243 if self.actual_pose is None: 00244 self.actual_pose = ee_cart_imped_msgs.msg.StiffPoint() 00245 if self.running_time is None: 00246 self.running_time = roslib.rostime.Duration() 00247 end = 0 00248 _x = self 00249 start = end 00250 end += 12 00251 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00252 start = end 00253 end += 4 00254 (length,) = _struct_I.unpack(str[start:end]) 00255 start = end 00256 end += length 00257 self.header.frame_id = str[start:end] 00258 start = end 00259 end += 4 00260 (length,) = _struct_I.unpack(str[start:end]) 00261 self.goal = [] 00262 for i in range(0, length): 00263 val1 = ee_cart_imped_msgs.msg.StiffPoint() 00264 _v10 = val1.header 00265 start = end 00266 end += 4 00267 (_v10.seq,) = _struct_I.unpack(str[start:end]) 00268 _v11 = _v10.stamp 00269 _x = _v11 00270 start = end 00271 end += 8 00272 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00273 start = end 00274 end += 4 00275 (length,) = _struct_I.unpack(str[start:end]) 00276 start = end 00277 end += length 00278 _v10.frame_id = str[start:end] 00279 _v12 = val1.pose 00280 _v13 = _v12.position 00281 _x = _v13 00282 start = end 00283 end += 24 00284 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00285 _v14 = _v12.orientation 00286 _x = _v14 00287 start = end 00288 end += 32 00289 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00290 _v15 = val1.wrench_or_stiffness 00291 _v16 = _v15.force 00292 _x = _v16 00293 start = end 00294 end += 24 00295 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00296 _v17 = _v15.torque 00297 _x = _v17 00298 start = end 00299 end += 24 00300 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00301 _x = val1 00302 start = end 00303 end += 6 00304 (_x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ,) = _struct_6B.unpack(str[start:end]) 00305 val1.isForceX = bool(val1.isForceX) 00306 val1.isForceY = bool(val1.isForceY) 00307 val1.isForceZ = bool(val1.isForceZ) 00308 val1.isTorqueX = bool(val1.isTorqueX) 00309 val1.isTorqueY = bool(val1.isTorqueY) 00310 val1.isTorqueZ = bool(val1.isTorqueZ) 00311 _v18 = val1.time_from_start 00312 _x = _v18 00313 start = end 00314 end += 8 00315 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00316 self.goal.append(val1) 00317 _x = self 00318 start = end 00319 end += 12 00320 (_x.initial_point.header.seq, _x.initial_point.header.stamp.secs, _x.initial_point.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00321 start = end 00322 end += 4 00323 (length,) = _struct_I.unpack(str[start:end]) 00324 start = end 00325 end += length 00326 self.initial_point.header.frame_id = str[start:end] 00327 _x = self 00328 start = end 00329 end += 130 00330 (_x.initial_point.pose.position.x, _x.initial_point.pose.position.y, _x.initial_point.pose.position.z, _x.initial_point.pose.orientation.x, _x.initial_point.pose.orientation.y, _x.initial_point.pose.orientation.z, _x.initial_point.pose.orientation.w, _x.initial_point.wrench_or_stiffness.force.x, _x.initial_point.wrench_or_stiffness.force.y, _x.initial_point.wrench_or_stiffness.force.z, _x.initial_point.wrench_or_stiffness.torque.x, _x.initial_point.wrench_or_stiffness.torque.y, _x.initial_point.wrench_or_stiffness.torque.z, _x.initial_point.isForceX, _x.initial_point.isForceY, _x.initial_point.isForceZ, _x.initial_point.isTorqueX, _x.initial_point.isTorqueY, _x.initial_point.isTorqueZ, _x.initial_point.time_from_start.secs, _x.initial_point.time_from_start.nsecs, _x.desired.header.seq, _x.desired.header.stamp.secs, _x.desired.header.stamp.nsecs,) = _struct_13d6B2i3I.unpack(str[start:end]) 00331 self.initial_point.isForceX = bool(self.initial_point.isForceX) 00332 self.initial_point.isForceY = bool(self.initial_point.isForceY) 00333 self.initial_point.isForceZ = bool(self.initial_point.isForceZ) 00334 self.initial_point.isTorqueX = bool(self.initial_point.isTorqueX) 00335 self.initial_point.isTorqueY = bool(self.initial_point.isTorqueY) 00336 self.initial_point.isTorqueZ = bool(self.initial_point.isTorqueZ) 00337 start = end 00338 end += 4 00339 (length,) = _struct_I.unpack(str[start:end]) 00340 start = end 00341 end += length 00342 self.desired.header.frame_id = str[start:end] 00343 _x = self 00344 start = end 00345 end += 130 00346 (_x.desired.pose.position.x, _x.desired.pose.position.y, _x.desired.pose.position.z, _x.desired.pose.orientation.x, _x.desired.pose.orientation.y, _x.desired.pose.orientation.z, _x.desired.pose.orientation.w, _x.desired.wrench_or_stiffness.force.x, _x.desired.wrench_or_stiffness.force.y, _x.desired.wrench_or_stiffness.force.z, _x.desired.wrench_or_stiffness.torque.x, _x.desired.wrench_or_stiffness.torque.y, _x.desired.wrench_or_stiffness.torque.z, _x.desired.isForceX, _x.desired.isForceY, _x.desired.isForceZ, _x.desired.isTorqueX, _x.desired.isTorqueY, _x.desired.isTorqueZ, _x.desired.time_from_start.secs, _x.desired.time_from_start.nsecs, _x.actual_pose.header.seq, _x.actual_pose.header.stamp.secs, _x.actual_pose.header.stamp.nsecs,) = _struct_13d6B2i3I.unpack(str[start:end]) 00347 self.desired.isForceX = bool(self.desired.isForceX) 00348 self.desired.isForceY = bool(self.desired.isForceY) 00349 self.desired.isForceZ = bool(self.desired.isForceZ) 00350 self.desired.isTorqueX = bool(self.desired.isTorqueX) 00351 self.desired.isTorqueY = bool(self.desired.isTorqueY) 00352 self.desired.isTorqueZ = bool(self.desired.isTorqueZ) 00353 start = end 00354 end += 4 00355 (length,) = _struct_I.unpack(str[start:end]) 00356 start = end 00357 end += length 00358 self.actual_pose.header.frame_id = str[start:end] 00359 _x = self 00360 start = end 00361 end += 126 00362 (_x.actual_pose.pose.position.x, _x.actual_pose.pose.position.y, _x.actual_pose.pose.position.z, _x.actual_pose.pose.orientation.x, _x.actual_pose.pose.orientation.y, _x.actual_pose.pose.orientation.z, _x.actual_pose.pose.orientation.w, _x.actual_pose.wrench_or_stiffness.force.x, _x.actual_pose.wrench_or_stiffness.force.y, _x.actual_pose.wrench_or_stiffness.force.z, _x.actual_pose.wrench_or_stiffness.torque.x, _x.actual_pose.wrench_or_stiffness.torque.y, _x.actual_pose.wrench_or_stiffness.torque.z, _x.actual_pose.isForceX, _x.actual_pose.isForceY, _x.actual_pose.isForceZ, _x.actual_pose.isTorqueX, _x.actual_pose.isTorqueY, _x.actual_pose.isTorqueZ, _x.actual_pose.time_from_start.secs, _x.actual_pose.time_from_start.nsecs, _x.effort_sq_error,) = _struct_13d6B2id.unpack(str[start:end]) 00363 self.actual_pose.isForceX = bool(self.actual_pose.isForceX) 00364 self.actual_pose.isForceY = bool(self.actual_pose.isForceY) 00365 self.actual_pose.isForceZ = bool(self.actual_pose.isForceZ) 00366 self.actual_pose.isTorqueX = bool(self.actual_pose.isTorqueX) 00367 self.actual_pose.isTorqueY = bool(self.actual_pose.isTorqueY) 00368 self.actual_pose.isTorqueZ = bool(self.actual_pose.isTorqueZ) 00369 start = end 00370 end += 4 00371 (length,) = _struct_I.unpack(str[start:end]) 00372 pattern = '<%sd'%length 00373 start = end 00374 end += struct.calcsize(pattern) 00375 self.requested_joint_efforts = struct.unpack(pattern, str[start:end]) 00376 start = end 00377 end += 4 00378 (length,) = _struct_I.unpack(str[start:end]) 00379 pattern = '<%sd'%length 00380 start = end 00381 end += struct.calcsize(pattern) 00382 self.actual_joint_efforts = struct.unpack(pattern, str[start:end]) 00383 _x = self 00384 start = end 00385 end += 8 00386 (_x.running_time.secs, _x.running_time.nsecs,) = _struct_2i.unpack(str[start:end]) 00387 self.running_time.canon() 00388 return self 00389 except struct.error as e: 00390 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00391 00392 00393 def serialize_numpy(self, buff, numpy): 00394 """ 00395 serialize message with numpy array types into buffer 00396 @param buff: buffer 00397 @type buff: StringIO 00398 @param numpy: numpy python module 00399 @type numpy module 00400 """ 00401 try: 00402 _x = self 00403 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00404 _x = self.header.frame_id 00405 length = len(_x) 00406 buff.write(struct.pack('<I%ss'%length, length, _x)) 00407 length = len(self.goal) 00408 buff.write(_struct_I.pack(length)) 00409 for val1 in self.goal: 00410 _v19 = val1.header 00411 buff.write(_struct_I.pack(_v19.seq)) 00412 _v20 = _v19.stamp 00413 _x = _v20 00414 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00415 _x = _v19.frame_id 00416 length = len(_x) 00417 buff.write(struct.pack('<I%ss'%length, length, _x)) 00418 _v21 = val1.pose 00419 _v22 = _v21.position 00420 _x = _v22 00421 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00422 _v23 = _v21.orientation 00423 _x = _v23 00424 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00425 _v24 = val1.wrench_or_stiffness 00426 _v25 = _v24.force 00427 _x = _v25 00428 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00429 _v26 = _v24.torque 00430 _x = _v26 00431 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00432 _x = val1 00433 buff.write(_struct_6B.pack(_x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ)) 00434 _v27 = val1.time_from_start 00435 _x = _v27 00436 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00437 _x = self 00438 buff.write(_struct_3I.pack(_x.initial_point.header.seq, _x.initial_point.header.stamp.secs, _x.initial_point.header.stamp.nsecs)) 00439 _x = self.initial_point.header.frame_id 00440 length = len(_x) 00441 buff.write(struct.pack('<I%ss'%length, length, _x)) 00442 _x = self 00443 buff.write(_struct_13d6B2i3I.pack(_x.initial_point.pose.position.x, _x.initial_point.pose.position.y, _x.initial_point.pose.position.z, _x.initial_point.pose.orientation.x, _x.initial_point.pose.orientation.y, _x.initial_point.pose.orientation.z, _x.initial_point.pose.orientation.w, _x.initial_point.wrench_or_stiffness.force.x, _x.initial_point.wrench_or_stiffness.force.y, _x.initial_point.wrench_or_stiffness.force.z, _x.initial_point.wrench_or_stiffness.torque.x, _x.initial_point.wrench_or_stiffness.torque.y, _x.initial_point.wrench_or_stiffness.torque.z, _x.initial_point.isForceX, _x.initial_point.isForceY, _x.initial_point.isForceZ, _x.initial_point.isTorqueX, _x.initial_point.isTorqueY, _x.initial_point.isTorqueZ, _x.initial_point.time_from_start.secs, _x.initial_point.time_from_start.nsecs, _x.desired.header.seq, _x.desired.header.stamp.secs, _x.desired.header.stamp.nsecs)) 00444 _x = self.desired.header.frame_id 00445 length = len(_x) 00446 buff.write(struct.pack('<I%ss'%length, length, _x)) 00447 _x = self 00448 buff.write(_struct_13d6B2i3I.pack(_x.desired.pose.position.x, _x.desired.pose.position.y, _x.desired.pose.position.z, _x.desired.pose.orientation.x, _x.desired.pose.orientation.y, _x.desired.pose.orientation.z, _x.desired.pose.orientation.w, _x.desired.wrench_or_stiffness.force.x, _x.desired.wrench_or_stiffness.force.y, _x.desired.wrench_or_stiffness.force.z, _x.desired.wrench_or_stiffness.torque.x, _x.desired.wrench_or_stiffness.torque.y, _x.desired.wrench_or_stiffness.torque.z, _x.desired.isForceX, _x.desired.isForceY, _x.desired.isForceZ, _x.desired.isTorqueX, _x.desired.isTorqueY, _x.desired.isTorqueZ, _x.desired.time_from_start.secs, _x.desired.time_from_start.nsecs, _x.actual_pose.header.seq, _x.actual_pose.header.stamp.secs, _x.actual_pose.header.stamp.nsecs)) 00449 _x = self.actual_pose.header.frame_id 00450 length = len(_x) 00451 buff.write(struct.pack('<I%ss'%length, length, _x)) 00452 _x = self 00453 buff.write(_struct_13d6B2id.pack(_x.actual_pose.pose.position.x, _x.actual_pose.pose.position.y, _x.actual_pose.pose.position.z, _x.actual_pose.pose.orientation.x, _x.actual_pose.pose.orientation.y, _x.actual_pose.pose.orientation.z, _x.actual_pose.pose.orientation.w, _x.actual_pose.wrench_or_stiffness.force.x, _x.actual_pose.wrench_or_stiffness.force.y, _x.actual_pose.wrench_or_stiffness.force.z, _x.actual_pose.wrench_or_stiffness.torque.x, _x.actual_pose.wrench_or_stiffness.torque.y, _x.actual_pose.wrench_or_stiffness.torque.z, _x.actual_pose.isForceX, _x.actual_pose.isForceY, _x.actual_pose.isForceZ, _x.actual_pose.isTorqueX, _x.actual_pose.isTorqueY, _x.actual_pose.isTorqueZ, _x.actual_pose.time_from_start.secs, _x.actual_pose.time_from_start.nsecs, _x.effort_sq_error)) 00454 length = len(self.requested_joint_efforts) 00455 buff.write(_struct_I.pack(length)) 00456 pattern = '<%sd'%length 00457 buff.write(self.requested_joint_efforts.tostring()) 00458 length = len(self.actual_joint_efforts) 00459 buff.write(_struct_I.pack(length)) 00460 pattern = '<%sd'%length 00461 buff.write(self.actual_joint_efforts.tostring()) 00462 _x = self 00463 buff.write(_struct_2i.pack(_x.running_time.secs, _x.running_time.nsecs)) 00464 except struct.error as se: self._check_types(se) 00465 except TypeError as te: self._check_types(te) 00466 00467 def deserialize_numpy(self, str, numpy): 00468 """ 00469 unpack serialized message in str into this message instance using numpy for array types 00470 @param str: byte array of serialized message 00471 @type str: str 00472 @param numpy: numpy python module 00473 @type numpy: module 00474 """ 00475 try: 00476 if self.header is None: 00477 self.header = std_msgs.msg._Header.Header() 00478 if self.initial_point is None: 00479 self.initial_point = ee_cart_imped_msgs.msg.StiffPoint() 00480 if self.desired is None: 00481 self.desired = ee_cart_imped_msgs.msg.StiffPoint() 00482 if self.actual_pose is None: 00483 self.actual_pose = ee_cart_imped_msgs.msg.StiffPoint() 00484 if self.running_time is None: 00485 self.running_time = roslib.rostime.Duration() 00486 end = 0 00487 _x = self 00488 start = end 00489 end += 12 00490 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00491 start = end 00492 end += 4 00493 (length,) = _struct_I.unpack(str[start:end]) 00494 start = end 00495 end += length 00496 self.header.frame_id = str[start:end] 00497 start = end 00498 end += 4 00499 (length,) = _struct_I.unpack(str[start:end]) 00500 self.goal = [] 00501 for i in range(0, length): 00502 val1 = ee_cart_imped_msgs.msg.StiffPoint() 00503 _v28 = val1.header 00504 start = end 00505 end += 4 00506 (_v28.seq,) = _struct_I.unpack(str[start:end]) 00507 _v29 = _v28.stamp 00508 _x = _v29 00509 start = end 00510 end += 8 00511 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00512 start = end 00513 end += 4 00514 (length,) = _struct_I.unpack(str[start:end]) 00515 start = end 00516 end += length 00517 _v28.frame_id = str[start:end] 00518 _v30 = val1.pose 00519 _v31 = _v30.position 00520 _x = _v31 00521 start = end 00522 end += 24 00523 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00524 _v32 = _v30.orientation 00525 _x = _v32 00526 start = end 00527 end += 32 00528 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00529 _v33 = val1.wrench_or_stiffness 00530 _v34 = _v33.force 00531 _x = _v34 00532 start = end 00533 end += 24 00534 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00535 _v35 = _v33.torque 00536 _x = _v35 00537 start = end 00538 end += 24 00539 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00540 _x = val1 00541 start = end 00542 end += 6 00543 (_x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ,) = _struct_6B.unpack(str[start:end]) 00544 val1.isForceX = bool(val1.isForceX) 00545 val1.isForceY = bool(val1.isForceY) 00546 val1.isForceZ = bool(val1.isForceZ) 00547 val1.isTorqueX = bool(val1.isTorqueX) 00548 val1.isTorqueY = bool(val1.isTorqueY) 00549 val1.isTorqueZ = bool(val1.isTorqueZ) 00550 _v36 = val1.time_from_start 00551 _x = _v36 00552 start = end 00553 end += 8 00554 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00555 self.goal.append(val1) 00556 _x = self 00557 start = end 00558 end += 12 00559 (_x.initial_point.header.seq, _x.initial_point.header.stamp.secs, _x.initial_point.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00560 start = end 00561 end += 4 00562 (length,) = _struct_I.unpack(str[start:end]) 00563 start = end 00564 end += length 00565 self.initial_point.header.frame_id = str[start:end] 00566 _x = self 00567 start = end 00568 end += 130 00569 (_x.initial_point.pose.position.x, _x.initial_point.pose.position.y, _x.initial_point.pose.position.z, _x.initial_point.pose.orientation.x, _x.initial_point.pose.orientation.y, _x.initial_point.pose.orientation.z, _x.initial_point.pose.orientation.w, _x.initial_point.wrench_or_stiffness.force.x, _x.initial_point.wrench_or_stiffness.force.y, _x.initial_point.wrench_or_stiffness.force.z, _x.initial_point.wrench_or_stiffness.torque.x, _x.initial_point.wrench_or_stiffness.torque.y, _x.initial_point.wrench_or_stiffness.torque.z, _x.initial_point.isForceX, _x.initial_point.isForceY, _x.initial_point.isForceZ, _x.initial_point.isTorqueX, _x.initial_point.isTorqueY, _x.initial_point.isTorqueZ, _x.initial_point.time_from_start.secs, _x.initial_point.time_from_start.nsecs, _x.desired.header.seq, _x.desired.header.stamp.secs, _x.desired.header.stamp.nsecs,) = _struct_13d6B2i3I.unpack(str[start:end]) 00570 self.initial_point.isForceX = bool(self.initial_point.isForceX) 00571 self.initial_point.isForceY = bool(self.initial_point.isForceY) 00572 self.initial_point.isForceZ = bool(self.initial_point.isForceZ) 00573 self.initial_point.isTorqueX = bool(self.initial_point.isTorqueX) 00574 self.initial_point.isTorqueY = bool(self.initial_point.isTorqueY) 00575 self.initial_point.isTorqueZ = bool(self.initial_point.isTorqueZ) 00576 start = end 00577 end += 4 00578 (length,) = _struct_I.unpack(str[start:end]) 00579 start = end 00580 end += length 00581 self.desired.header.frame_id = str[start:end] 00582 _x = self 00583 start = end 00584 end += 130 00585 (_x.desired.pose.position.x, _x.desired.pose.position.y, _x.desired.pose.position.z, _x.desired.pose.orientation.x, _x.desired.pose.orientation.y, _x.desired.pose.orientation.z, _x.desired.pose.orientation.w, _x.desired.wrench_or_stiffness.force.x, _x.desired.wrench_or_stiffness.force.y, _x.desired.wrench_or_stiffness.force.z, _x.desired.wrench_or_stiffness.torque.x, _x.desired.wrench_or_stiffness.torque.y, _x.desired.wrench_or_stiffness.torque.z, _x.desired.isForceX, _x.desired.isForceY, _x.desired.isForceZ, _x.desired.isTorqueX, _x.desired.isTorqueY, _x.desired.isTorqueZ, _x.desired.time_from_start.secs, _x.desired.time_from_start.nsecs, _x.actual_pose.header.seq, _x.actual_pose.header.stamp.secs, _x.actual_pose.header.stamp.nsecs,) = _struct_13d6B2i3I.unpack(str[start:end]) 00586 self.desired.isForceX = bool(self.desired.isForceX) 00587 self.desired.isForceY = bool(self.desired.isForceY) 00588 self.desired.isForceZ = bool(self.desired.isForceZ) 00589 self.desired.isTorqueX = bool(self.desired.isTorqueX) 00590 self.desired.isTorqueY = bool(self.desired.isTorqueY) 00591 self.desired.isTorqueZ = bool(self.desired.isTorqueZ) 00592 start = end 00593 end += 4 00594 (length,) = _struct_I.unpack(str[start:end]) 00595 start = end 00596 end += length 00597 self.actual_pose.header.frame_id = str[start:end] 00598 _x = self 00599 start = end 00600 end += 126 00601 (_x.actual_pose.pose.position.x, _x.actual_pose.pose.position.y, _x.actual_pose.pose.position.z, _x.actual_pose.pose.orientation.x, _x.actual_pose.pose.orientation.y, _x.actual_pose.pose.orientation.z, _x.actual_pose.pose.orientation.w, _x.actual_pose.wrench_or_stiffness.force.x, _x.actual_pose.wrench_or_stiffness.force.y, _x.actual_pose.wrench_or_stiffness.force.z, _x.actual_pose.wrench_or_stiffness.torque.x, _x.actual_pose.wrench_or_stiffness.torque.y, _x.actual_pose.wrench_or_stiffness.torque.z, _x.actual_pose.isForceX, _x.actual_pose.isForceY, _x.actual_pose.isForceZ, _x.actual_pose.isTorqueX, _x.actual_pose.isTorqueY, _x.actual_pose.isTorqueZ, _x.actual_pose.time_from_start.secs, _x.actual_pose.time_from_start.nsecs, _x.effort_sq_error,) = _struct_13d6B2id.unpack(str[start:end]) 00602 self.actual_pose.isForceX = bool(self.actual_pose.isForceX) 00603 self.actual_pose.isForceY = bool(self.actual_pose.isForceY) 00604 self.actual_pose.isForceZ = bool(self.actual_pose.isForceZ) 00605 self.actual_pose.isTorqueX = bool(self.actual_pose.isTorqueX) 00606 self.actual_pose.isTorqueY = bool(self.actual_pose.isTorqueY) 00607 self.actual_pose.isTorqueZ = bool(self.actual_pose.isTorqueZ) 00608 start = end 00609 end += 4 00610 (length,) = _struct_I.unpack(str[start:end]) 00611 pattern = '<%sd'%length 00612 start = end 00613 end += struct.calcsize(pattern) 00614 self.requested_joint_efforts = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00615 start = end 00616 end += 4 00617 (length,) = _struct_I.unpack(str[start:end]) 00618 pattern = '<%sd'%length 00619 start = end 00620 end += struct.calcsize(pattern) 00621 self.actual_joint_efforts = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00622 _x = self 00623 start = end 00624 end += 8 00625 (_x.running_time.secs, _x.running_time.nsecs,) = _struct_2i.unpack(str[start:end]) 00626 self.running_time.canon() 00627 return self 00628 except struct.error as e: 00629 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00630 00631 _struct_I = roslib.message.struct_I 00632 _struct_6B = struct.Struct("<6B") 00633 _struct_13d6B2id = struct.Struct("<13d6B2id") 00634 _struct_2i = struct.Struct("<2i") 00635 _struct_3I = struct.Struct("<3I") 00636 _struct_13d6B2i3I = struct.Struct("<13d6B2i3I") 00637 _struct_4d = struct.Struct("<4d") 00638 _struct_2I = struct.Struct("<2I") 00639 _struct_3d = struct.Struct("<3d")