$search
00001 """autogenerated by genmsg_py from ReactivePlaceActionGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import trajectory_msgs.msg 00006 import object_manipulation_msgs.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import geometry_msgs.msg 00010 import std_msgs.msg 00011 00012 class ReactivePlaceActionGoal(roslib.message.Message): 00013 _md5sum = "f70629d4244203e19c14919dbd7fb5d4" 00014 _type = "object_manipulation_msgs/ReactivePlaceActionGoal" 00015 _has_header = True #flag to mark the presence of a Header object 00016 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00017 00018 Header header 00019 actionlib_msgs/GoalID goal_id 00020 ReactivePlaceGoal goal 00021 00022 ================================================================================ 00023 MSG: std_msgs/Header 00024 # Standard metadata for higher-level stamped data types. 00025 # This is generally used to communicate timestamped data 00026 # in a particular coordinate frame. 00027 # 00028 # sequence ID: consecutively increasing ID 00029 uint32 seq 00030 #Two-integer timestamp that is expressed as: 00031 # * stamp.secs: seconds (stamp_secs) since epoch 00032 # * stamp.nsecs: nanoseconds since stamp_secs 00033 # time-handling sugar is provided by the client library 00034 time stamp 00035 #Frame this data is associated with 00036 # 0: no frame 00037 # 1: global frame 00038 string frame_id 00039 00040 ================================================================================ 00041 MSG: actionlib_msgs/GoalID 00042 # The stamp should store the time at which this goal was requested. 00043 # It is used by an action server when it tries to preempt all 00044 # goals that were requested before a certain time 00045 time stamp 00046 00047 # The id provides a way to associate feedback and 00048 # result message with specific goal requests. The id 00049 # specified must be unique. 00050 string id 00051 00052 00053 ================================================================================ 00054 MSG: object_manipulation_msgs/ReactivePlaceGoal 00055 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00056 # an action for placing the object using tactile sensor feedback. 00057 # a reactive place starts from the current pose of the gripper and ends 00058 # at a desired place pose, presumably using the touch sensors along the way 00059 00060 # the name of the arm being used 00061 string arm_name 00062 00063 # the desired final place pose for the hand 00064 geometry_msgs/PoseStamped final_place_pose 00065 00066 # the joint trajectory to use for the place (if available) 00067 # this trajectory is expected to start at the current pose of the gripper 00068 # and end at the desired place pose 00069 trajectory_msgs/JointTrajectory trajectory 00070 00071 # the name of the support surface in the collision environment, if any 00072 string collision_support_surface_name 00073 00074 # the name in the collision environment of the object being placed, if any 00075 string collision_object_name 00076 00077 ================================================================================ 00078 MSG: geometry_msgs/PoseStamped 00079 # A Pose with reference coordinate frame and timestamp 00080 Header header 00081 Pose pose 00082 00083 ================================================================================ 00084 MSG: geometry_msgs/Pose 00085 # A representation of pose in free space, composed of postion and orientation. 00086 Point position 00087 Quaternion orientation 00088 00089 ================================================================================ 00090 MSG: geometry_msgs/Point 00091 # This contains the position of a point in free space 00092 float64 x 00093 float64 y 00094 float64 z 00095 00096 ================================================================================ 00097 MSG: geometry_msgs/Quaternion 00098 # This represents an orientation in free space in quaternion form. 00099 00100 float64 x 00101 float64 y 00102 float64 z 00103 float64 w 00104 00105 ================================================================================ 00106 MSG: trajectory_msgs/JointTrajectory 00107 Header header 00108 string[] joint_names 00109 JointTrajectoryPoint[] points 00110 ================================================================================ 00111 MSG: trajectory_msgs/JointTrajectoryPoint 00112 float64[] positions 00113 float64[] velocities 00114 float64[] accelerations 00115 duration time_from_start 00116 """ 00117 __slots__ = ['header','goal_id','goal'] 00118 _slot_types = ['Header','actionlib_msgs/GoalID','object_manipulation_msgs/ReactivePlaceGoal'] 00119 00120 def __init__(self, *args, **kwds): 00121 """ 00122 Constructor. Any message fields that are implicitly/explicitly 00123 set to None will be assigned a default value. The recommend 00124 use is keyword arguments as this is more robust to future message 00125 changes. You cannot mix in-order arguments and keyword arguments. 00126 00127 The available fields are: 00128 header,goal_id,goal 00129 00130 @param args: complete set of field values, in .msg order 00131 @param kwds: use keyword arguments corresponding to message field names 00132 to set specific fields. 00133 """ 00134 if args or kwds: 00135 super(ReactivePlaceActionGoal, self).__init__(*args, **kwds) 00136 #message fields cannot be None, assign default values for those that are 00137 if self.header is None: 00138 self.header = std_msgs.msg._Header.Header() 00139 if self.goal_id is None: 00140 self.goal_id = actionlib_msgs.msg.GoalID() 00141 if self.goal is None: 00142 self.goal = object_manipulation_msgs.msg.ReactivePlaceGoal() 00143 else: 00144 self.header = std_msgs.msg._Header.Header() 00145 self.goal_id = actionlib_msgs.msg.GoalID() 00146 self.goal = object_manipulation_msgs.msg.ReactivePlaceGoal() 00147 00148 def _get_types(self): 00149 """ 00150 internal API method 00151 """ 00152 return self._slot_types 00153 00154 def serialize(self, buff): 00155 """ 00156 serialize message into buffer 00157 @param buff: buffer 00158 @type buff: StringIO 00159 """ 00160 try: 00161 _x = self 00162 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00163 _x = self.header.frame_id 00164 length = len(_x) 00165 buff.write(struct.pack('<I%ss'%length, length, _x)) 00166 _x = self 00167 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00168 _x = self.goal_id.id 00169 length = len(_x) 00170 buff.write(struct.pack('<I%ss'%length, length, _x)) 00171 _x = self.goal.arm_name 00172 length = len(_x) 00173 buff.write(struct.pack('<I%ss'%length, length, _x)) 00174 _x = self 00175 buff.write(_struct_3I.pack(_x.goal.final_place_pose.header.seq, _x.goal.final_place_pose.header.stamp.secs, _x.goal.final_place_pose.header.stamp.nsecs)) 00176 _x = self.goal.final_place_pose.header.frame_id 00177 length = len(_x) 00178 buff.write(struct.pack('<I%ss'%length, length, _x)) 00179 _x = self 00180 buff.write(_struct_7d3I.pack(_x.goal.final_place_pose.pose.position.x, _x.goal.final_place_pose.pose.position.y, _x.goal.final_place_pose.pose.position.z, _x.goal.final_place_pose.pose.orientation.x, _x.goal.final_place_pose.pose.orientation.y, _x.goal.final_place_pose.pose.orientation.z, _x.goal.final_place_pose.pose.orientation.w, _x.goal.trajectory.header.seq, _x.goal.trajectory.header.stamp.secs, _x.goal.trajectory.header.stamp.nsecs)) 00181 _x = self.goal.trajectory.header.frame_id 00182 length = len(_x) 00183 buff.write(struct.pack('<I%ss'%length, length, _x)) 00184 length = len(self.goal.trajectory.joint_names) 00185 buff.write(_struct_I.pack(length)) 00186 for val1 in self.goal.trajectory.joint_names: 00187 length = len(val1) 00188 buff.write(struct.pack('<I%ss'%length, length, val1)) 00189 length = len(self.goal.trajectory.points) 00190 buff.write(_struct_I.pack(length)) 00191 for val1 in self.goal.trajectory.points: 00192 length = len(val1.positions) 00193 buff.write(_struct_I.pack(length)) 00194 pattern = '<%sd'%length 00195 buff.write(struct.pack(pattern, *val1.positions)) 00196 length = len(val1.velocities) 00197 buff.write(_struct_I.pack(length)) 00198 pattern = '<%sd'%length 00199 buff.write(struct.pack(pattern, *val1.velocities)) 00200 length = len(val1.accelerations) 00201 buff.write(_struct_I.pack(length)) 00202 pattern = '<%sd'%length 00203 buff.write(struct.pack(pattern, *val1.accelerations)) 00204 _v1 = val1.time_from_start 00205 _x = _v1 00206 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00207 _x = self.goal.collision_support_surface_name 00208 length = len(_x) 00209 buff.write(struct.pack('<I%ss'%length, length, _x)) 00210 _x = self.goal.collision_object_name 00211 length = len(_x) 00212 buff.write(struct.pack('<I%ss'%length, length, _x)) 00213 except struct.error as se: self._check_types(se) 00214 except TypeError as te: self._check_types(te) 00215 00216 def deserialize(self, str): 00217 """ 00218 unpack serialized message in str into this message instance 00219 @param str: byte array of serialized message 00220 @type str: str 00221 """ 00222 try: 00223 if self.header is None: 00224 self.header = std_msgs.msg._Header.Header() 00225 if self.goal_id is None: 00226 self.goal_id = actionlib_msgs.msg.GoalID() 00227 if self.goal is None: 00228 self.goal = object_manipulation_msgs.msg.ReactivePlaceGoal() 00229 end = 0 00230 _x = self 00231 start = end 00232 end += 12 00233 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00234 start = end 00235 end += 4 00236 (length,) = _struct_I.unpack(str[start:end]) 00237 start = end 00238 end += length 00239 self.header.frame_id = str[start:end] 00240 _x = self 00241 start = end 00242 end += 8 00243 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00244 start = end 00245 end += 4 00246 (length,) = _struct_I.unpack(str[start:end]) 00247 start = end 00248 end += length 00249 self.goal_id.id = 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.goal.arm_name = str[start:end] 00256 _x = self 00257 start = end 00258 end += 12 00259 (_x.goal.final_place_pose.header.seq, _x.goal.final_place_pose.header.stamp.secs, _x.goal.final_place_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00260 start = end 00261 end += 4 00262 (length,) = _struct_I.unpack(str[start:end]) 00263 start = end 00264 end += length 00265 self.goal.final_place_pose.header.frame_id = str[start:end] 00266 _x = self 00267 start = end 00268 end += 68 00269 (_x.goal.final_place_pose.pose.position.x, _x.goal.final_place_pose.pose.position.y, _x.goal.final_place_pose.pose.position.z, _x.goal.final_place_pose.pose.orientation.x, _x.goal.final_place_pose.pose.orientation.y, _x.goal.final_place_pose.pose.orientation.z, _x.goal.final_place_pose.pose.orientation.w, _x.goal.trajectory.header.seq, _x.goal.trajectory.header.stamp.secs, _x.goal.trajectory.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end]) 00270 start = end 00271 end += 4 00272 (length,) = _struct_I.unpack(str[start:end]) 00273 start = end 00274 end += length 00275 self.goal.trajectory.header.frame_id = str[start:end] 00276 start = end 00277 end += 4 00278 (length,) = _struct_I.unpack(str[start:end]) 00279 self.goal.trajectory.joint_names = [] 00280 for i in range(0, length): 00281 start = end 00282 end += 4 00283 (length,) = _struct_I.unpack(str[start:end]) 00284 start = end 00285 end += length 00286 val1 = str[start:end] 00287 self.goal.trajectory.joint_names.append(val1) 00288 start = end 00289 end += 4 00290 (length,) = _struct_I.unpack(str[start:end]) 00291 self.goal.trajectory.points = [] 00292 for i in range(0, length): 00293 val1 = trajectory_msgs.msg.JointTrajectoryPoint() 00294 start = end 00295 end += 4 00296 (length,) = _struct_I.unpack(str[start:end]) 00297 pattern = '<%sd'%length 00298 start = end 00299 end += struct.calcsize(pattern) 00300 val1.positions = struct.unpack(pattern, str[start:end]) 00301 start = end 00302 end += 4 00303 (length,) = _struct_I.unpack(str[start:end]) 00304 pattern = '<%sd'%length 00305 start = end 00306 end += struct.calcsize(pattern) 00307 val1.velocities = struct.unpack(pattern, str[start:end]) 00308 start = end 00309 end += 4 00310 (length,) = _struct_I.unpack(str[start:end]) 00311 pattern = '<%sd'%length 00312 start = end 00313 end += struct.calcsize(pattern) 00314 val1.accelerations = struct.unpack(pattern, str[start:end]) 00315 _v2 = val1.time_from_start 00316 _x = _v2 00317 start = end 00318 end += 8 00319 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00320 self.goal.trajectory.points.append(val1) 00321 start = end 00322 end += 4 00323 (length,) = _struct_I.unpack(str[start:end]) 00324 start = end 00325 end += length 00326 self.goal.collision_support_surface_name = str[start:end] 00327 start = end 00328 end += 4 00329 (length,) = _struct_I.unpack(str[start:end]) 00330 start = end 00331 end += length 00332 self.goal.collision_object_name = str[start:end] 00333 return self 00334 except struct.error as e: 00335 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00336 00337 00338 def serialize_numpy(self, buff, numpy): 00339 """ 00340 serialize message with numpy array types into buffer 00341 @param buff: buffer 00342 @type buff: StringIO 00343 @param numpy: numpy python module 00344 @type numpy module 00345 """ 00346 try: 00347 _x = self 00348 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00349 _x = self.header.frame_id 00350 length = len(_x) 00351 buff.write(struct.pack('<I%ss'%length, length, _x)) 00352 _x = self 00353 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00354 _x = self.goal_id.id 00355 length = len(_x) 00356 buff.write(struct.pack('<I%ss'%length, length, _x)) 00357 _x = self.goal.arm_name 00358 length = len(_x) 00359 buff.write(struct.pack('<I%ss'%length, length, _x)) 00360 _x = self 00361 buff.write(_struct_3I.pack(_x.goal.final_place_pose.header.seq, _x.goal.final_place_pose.header.stamp.secs, _x.goal.final_place_pose.header.stamp.nsecs)) 00362 _x = self.goal.final_place_pose.header.frame_id 00363 length = len(_x) 00364 buff.write(struct.pack('<I%ss'%length, length, _x)) 00365 _x = self 00366 buff.write(_struct_7d3I.pack(_x.goal.final_place_pose.pose.position.x, _x.goal.final_place_pose.pose.position.y, _x.goal.final_place_pose.pose.position.z, _x.goal.final_place_pose.pose.orientation.x, _x.goal.final_place_pose.pose.orientation.y, _x.goal.final_place_pose.pose.orientation.z, _x.goal.final_place_pose.pose.orientation.w, _x.goal.trajectory.header.seq, _x.goal.trajectory.header.stamp.secs, _x.goal.trajectory.header.stamp.nsecs)) 00367 _x = self.goal.trajectory.header.frame_id 00368 length = len(_x) 00369 buff.write(struct.pack('<I%ss'%length, length, _x)) 00370 length = len(self.goal.trajectory.joint_names) 00371 buff.write(_struct_I.pack(length)) 00372 for val1 in self.goal.trajectory.joint_names: 00373 length = len(val1) 00374 buff.write(struct.pack('<I%ss'%length, length, val1)) 00375 length = len(self.goal.trajectory.points) 00376 buff.write(_struct_I.pack(length)) 00377 for val1 in self.goal.trajectory.points: 00378 length = len(val1.positions) 00379 buff.write(_struct_I.pack(length)) 00380 pattern = '<%sd'%length 00381 buff.write(val1.positions.tostring()) 00382 length = len(val1.velocities) 00383 buff.write(_struct_I.pack(length)) 00384 pattern = '<%sd'%length 00385 buff.write(val1.velocities.tostring()) 00386 length = len(val1.accelerations) 00387 buff.write(_struct_I.pack(length)) 00388 pattern = '<%sd'%length 00389 buff.write(val1.accelerations.tostring()) 00390 _v3 = val1.time_from_start 00391 _x = _v3 00392 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00393 _x = self.goal.collision_support_surface_name 00394 length = len(_x) 00395 buff.write(struct.pack('<I%ss'%length, length, _x)) 00396 _x = self.goal.collision_object_name 00397 length = len(_x) 00398 buff.write(struct.pack('<I%ss'%length, length, _x)) 00399 except struct.error as se: self._check_types(se) 00400 except TypeError as te: self._check_types(te) 00401 00402 def deserialize_numpy(self, str, numpy): 00403 """ 00404 unpack serialized message in str into this message instance using numpy for array types 00405 @param str: byte array of serialized message 00406 @type str: str 00407 @param numpy: numpy python module 00408 @type numpy: module 00409 """ 00410 try: 00411 if self.header is None: 00412 self.header = std_msgs.msg._Header.Header() 00413 if self.goal_id is None: 00414 self.goal_id = actionlib_msgs.msg.GoalID() 00415 if self.goal is None: 00416 self.goal = object_manipulation_msgs.msg.ReactivePlaceGoal() 00417 end = 0 00418 _x = self 00419 start = end 00420 end += 12 00421 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00422 start = end 00423 end += 4 00424 (length,) = _struct_I.unpack(str[start:end]) 00425 start = end 00426 end += length 00427 self.header.frame_id = str[start:end] 00428 _x = self 00429 start = end 00430 end += 8 00431 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00432 start = end 00433 end += 4 00434 (length,) = _struct_I.unpack(str[start:end]) 00435 start = end 00436 end += length 00437 self.goal_id.id = str[start:end] 00438 start = end 00439 end += 4 00440 (length,) = _struct_I.unpack(str[start:end]) 00441 start = end 00442 end += length 00443 self.goal.arm_name = str[start:end] 00444 _x = self 00445 start = end 00446 end += 12 00447 (_x.goal.final_place_pose.header.seq, _x.goal.final_place_pose.header.stamp.secs, _x.goal.final_place_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00448 start = end 00449 end += 4 00450 (length,) = _struct_I.unpack(str[start:end]) 00451 start = end 00452 end += length 00453 self.goal.final_place_pose.header.frame_id = str[start:end] 00454 _x = self 00455 start = end 00456 end += 68 00457 (_x.goal.final_place_pose.pose.position.x, _x.goal.final_place_pose.pose.position.y, _x.goal.final_place_pose.pose.position.z, _x.goal.final_place_pose.pose.orientation.x, _x.goal.final_place_pose.pose.orientation.y, _x.goal.final_place_pose.pose.orientation.z, _x.goal.final_place_pose.pose.orientation.w, _x.goal.trajectory.header.seq, _x.goal.trajectory.header.stamp.secs, _x.goal.trajectory.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end]) 00458 start = end 00459 end += 4 00460 (length,) = _struct_I.unpack(str[start:end]) 00461 start = end 00462 end += length 00463 self.goal.trajectory.header.frame_id = str[start:end] 00464 start = end 00465 end += 4 00466 (length,) = _struct_I.unpack(str[start:end]) 00467 self.goal.trajectory.joint_names = [] 00468 for i in range(0, length): 00469 start = end 00470 end += 4 00471 (length,) = _struct_I.unpack(str[start:end]) 00472 start = end 00473 end += length 00474 val1 = str[start:end] 00475 self.goal.trajectory.joint_names.append(val1) 00476 start = end 00477 end += 4 00478 (length,) = _struct_I.unpack(str[start:end]) 00479 self.goal.trajectory.points = [] 00480 for i in range(0, length): 00481 val1 = trajectory_msgs.msg.JointTrajectoryPoint() 00482 start = end 00483 end += 4 00484 (length,) = _struct_I.unpack(str[start:end]) 00485 pattern = '<%sd'%length 00486 start = end 00487 end += struct.calcsize(pattern) 00488 val1.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00489 start = end 00490 end += 4 00491 (length,) = _struct_I.unpack(str[start:end]) 00492 pattern = '<%sd'%length 00493 start = end 00494 end += struct.calcsize(pattern) 00495 val1.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00496 start = end 00497 end += 4 00498 (length,) = _struct_I.unpack(str[start:end]) 00499 pattern = '<%sd'%length 00500 start = end 00501 end += struct.calcsize(pattern) 00502 val1.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00503 _v4 = val1.time_from_start 00504 _x = _v4 00505 start = end 00506 end += 8 00507 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00508 self.goal.trajectory.points.append(val1) 00509 start = end 00510 end += 4 00511 (length,) = _struct_I.unpack(str[start:end]) 00512 start = end 00513 end += length 00514 self.goal.collision_support_surface_name = str[start:end] 00515 start = end 00516 end += 4 00517 (length,) = _struct_I.unpack(str[start:end]) 00518 start = end 00519 end += length 00520 self.goal.collision_object_name = str[start:end] 00521 return self 00522 except struct.error as e: 00523 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00524 00525 _struct_I = roslib.message.struct_I 00526 _struct_2i = struct.Struct("<2i") 00527 _struct_3I = struct.Struct("<3I") 00528 _struct_2I = struct.Struct("<2I") 00529 _struct_7d3I = struct.Struct("<7d3I")