$search
00001 """autogenerated by genmsg_py from PickAndPlaceGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 00007 class PickAndPlaceGoal(roslib.message.Message): 00008 _md5sum = "406b9d2b14d3c2ad49cf6e087a7292df" 00009 _type = "turtlebot_block_manipulation/PickAndPlaceGoal" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00012 #goal definition 00013 string frame 00014 float32 z_up 00015 float32 gripper_open 00016 float32 gripper_closed 00017 geometry_msgs/Pose pickup_pose 00018 geometry_msgs/Pose place_pose 00019 string topic 00020 00021 ================================================================================ 00022 MSG: geometry_msgs/Pose 00023 # A representation of pose in free space, composed of postion and orientation. 00024 Point position 00025 Quaternion orientation 00026 00027 ================================================================================ 00028 MSG: geometry_msgs/Point 00029 # This contains the position of a point in free space 00030 float64 x 00031 float64 y 00032 float64 z 00033 00034 ================================================================================ 00035 MSG: geometry_msgs/Quaternion 00036 # This represents an orientation in free space in quaternion form. 00037 00038 float64 x 00039 float64 y 00040 float64 z 00041 float64 w 00042 00043 """ 00044 __slots__ = ['frame','z_up','gripper_open','gripper_closed','pickup_pose','place_pose','topic'] 00045 _slot_types = ['string','float32','float32','float32','geometry_msgs/Pose','geometry_msgs/Pose','string'] 00046 00047 def __init__(self, *args, **kwds): 00048 """ 00049 Constructor. Any message fields that are implicitly/explicitly 00050 set to None will be assigned a default value. The recommend 00051 use is keyword arguments as this is more robust to future message 00052 changes. You cannot mix in-order arguments and keyword arguments. 00053 00054 The available fields are: 00055 frame,z_up,gripper_open,gripper_closed,pickup_pose,place_pose,topic 00056 00057 @param args: complete set of field values, in .msg order 00058 @param kwds: use keyword arguments corresponding to message field names 00059 to set specific fields. 00060 """ 00061 if args or kwds: 00062 super(PickAndPlaceGoal, self).__init__(*args, **kwds) 00063 #message fields cannot be None, assign default values for those that are 00064 if self.frame is None: 00065 self.frame = '' 00066 if self.z_up is None: 00067 self.z_up = 0. 00068 if self.gripper_open is None: 00069 self.gripper_open = 0. 00070 if self.gripper_closed is None: 00071 self.gripper_closed = 0. 00072 if self.pickup_pose is None: 00073 self.pickup_pose = geometry_msgs.msg.Pose() 00074 if self.place_pose is None: 00075 self.place_pose = geometry_msgs.msg.Pose() 00076 if self.topic is None: 00077 self.topic = '' 00078 else: 00079 self.frame = '' 00080 self.z_up = 0. 00081 self.gripper_open = 0. 00082 self.gripper_closed = 0. 00083 self.pickup_pose = geometry_msgs.msg.Pose() 00084 self.place_pose = geometry_msgs.msg.Pose() 00085 self.topic = '' 00086 00087 def _get_types(self): 00088 """ 00089 internal API method 00090 """ 00091 return self._slot_types 00092 00093 def serialize(self, buff): 00094 """ 00095 serialize message into buffer 00096 @param buff: buffer 00097 @type buff: StringIO 00098 """ 00099 try: 00100 _x = self.frame 00101 length = len(_x) 00102 buff.write(struct.pack('<I%ss'%length, length, _x)) 00103 _x = self 00104 buff.write(_struct_3f14d.pack(_x.z_up, _x.gripper_open, _x.gripper_closed, _x.pickup_pose.position.x, _x.pickup_pose.position.y, _x.pickup_pose.position.z, _x.pickup_pose.orientation.x, _x.pickup_pose.orientation.y, _x.pickup_pose.orientation.z, _x.pickup_pose.orientation.w, _x.place_pose.position.x, _x.place_pose.position.y, _x.place_pose.position.z, _x.place_pose.orientation.x, _x.place_pose.orientation.y, _x.place_pose.orientation.z, _x.place_pose.orientation.w)) 00105 _x = self.topic 00106 length = len(_x) 00107 buff.write(struct.pack('<I%ss'%length, length, _x)) 00108 except struct.error as se: self._check_types(se) 00109 except TypeError as te: self._check_types(te) 00110 00111 def deserialize(self, str): 00112 """ 00113 unpack serialized message in str into this message instance 00114 @param str: byte array of serialized message 00115 @type str: str 00116 """ 00117 try: 00118 if self.pickup_pose is None: 00119 self.pickup_pose = geometry_msgs.msg.Pose() 00120 if self.place_pose is None: 00121 self.place_pose = geometry_msgs.msg.Pose() 00122 end = 0 00123 start = end 00124 end += 4 00125 (length,) = _struct_I.unpack(str[start:end]) 00126 start = end 00127 end += length 00128 self.frame = str[start:end] 00129 _x = self 00130 start = end 00131 end += 124 00132 (_x.z_up, _x.gripper_open, _x.gripper_closed, _x.pickup_pose.position.x, _x.pickup_pose.position.y, _x.pickup_pose.position.z, _x.pickup_pose.orientation.x, _x.pickup_pose.orientation.y, _x.pickup_pose.orientation.z, _x.pickup_pose.orientation.w, _x.place_pose.position.x, _x.place_pose.position.y, _x.place_pose.position.z, _x.place_pose.orientation.x, _x.place_pose.orientation.y, _x.place_pose.orientation.z, _x.place_pose.orientation.w,) = _struct_3f14d.unpack(str[start:end]) 00133 start = end 00134 end += 4 00135 (length,) = _struct_I.unpack(str[start:end]) 00136 start = end 00137 end += length 00138 self.topic = str[start:end] 00139 return self 00140 except struct.error as e: 00141 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00142 00143 00144 def serialize_numpy(self, buff, numpy): 00145 """ 00146 serialize message with numpy array types into buffer 00147 @param buff: buffer 00148 @type buff: StringIO 00149 @param numpy: numpy python module 00150 @type numpy module 00151 """ 00152 try: 00153 _x = self.frame 00154 length = len(_x) 00155 buff.write(struct.pack('<I%ss'%length, length, _x)) 00156 _x = self 00157 buff.write(_struct_3f14d.pack(_x.z_up, _x.gripper_open, _x.gripper_closed, _x.pickup_pose.position.x, _x.pickup_pose.position.y, _x.pickup_pose.position.z, _x.pickup_pose.orientation.x, _x.pickup_pose.orientation.y, _x.pickup_pose.orientation.z, _x.pickup_pose.orientation.w, _x.place_pose.position.x, _x.place_pose.position.y, _x.place_pose.position.z, _x.place_pose.orientation.x, _x.place_pose.orientation.y, _x.place_pose.orientation.z, _x.place_pose.orientation.w)) 00158 _x = self.topic 00159 length = len(_x) 00160 buff.write(struct.pack('<I%ss'%length, length, _x)) 00161 except struct.error as se: self._check_types(se) 00162 except TypeError as te: self._check_types(te) 00163 00164 def deserialize_numpy(self, str, numpy): 00165 """ 00166 unpack serialized message in str into this message instance using numpy for array types 00167 @param str: byte array of serialized message 00168 @type str: str 00169 @param numpy: numpy python module 00170 @type numpy: module 00171 """ 00172 try: 00173 if self.pickup_pose is None: 00174 self.pickup_pose = geometry_msgs.msg.Pose() 00175 if self.place_pose is None: 00176 self.place_pose = geometry_msgs.msg.Pose() 00177 end = 0 00178 start = end 00179 end += 4 00180 (length,) = _struct_I.unpack(str[start:end]) 00181 start = end 00182 end += length 00183 self.frame = str[start:end] 00184 _x = self 00185 start = end 00186 end += 124 00187 (_x.z_up, _x.gripper_open, _x.gripper_closed, _x.pickup_pose.position.x, _x.pickup_pose.position.y, _x.pickup_pose.position.z, _x.pickup_pose.orientation.x, _x.pickup_pose.orientation.y, _x.pickup_pose.orientation.z, _x.pickup_pose.orientation.w, _x.place_pose.position.x, _x.place_pose.position.y, _x.place_pose.position.z, _x.place_pose.orientation.x, _x.place_pose.orientation.y, _x.place_pose.orientation.z, _x.place_pose.orientation.w,) = _struct_3f14d.unpack(str[start:end]) 00188 start = end 00189 end += 4 00190 (length,) = _struct_I.unpack(str[start:end]) 00191 start = end 00192 end += length 00193 self.topic = str[start:end] 00194 return self 00195 except struct.error as e: 00196 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00197 00198 _struct_I = roslib.message.struct_I 00199 _struct_3f14d = struct.Struct("<3f14d")