$search
00001 """autogenerated by genmsg_py from SetPointClusterGraspParamsRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class SetPointClusterGraspParamsRequest(roslib.message.Message): 00007 _md5sum = "176c495282fca5febd8468900b9ef915" 00008 _type = "pr2_gripper_grasp_planner_cluster/SetPointClusterGraspParamsRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 float64 height_good_for_side_grasps 00012 00013 00014 float64 gripper_opening 00015 00016 00017 float64 side_step 00018 00019 00020 float64 palm_step 00021 00022 00023 bool overhead_grasps_only 00024 00025 00026 bool side_grasps_only 00027 00028 00029 bool include_high_point_grasps 00030 00031 00032 bool pregrasp_just_outside_box 00033 00034 00035 int32 backoff_depth_steps 00036 00037 00038 bool disable_grasp_neighbor_check 00039 00040 00041 bool randomize_grasps 00042 00043 00044 """ 00045 __slots__ = ['height_good_for_side_grasps','gripper_opening','side_step','palm_step','overhead_grasps_only','side_grasps_only','include_high_point_grasps','pregrasp_just_outside_box','backoff_depth_steps','disable_grasp_neighbor_check','randomize_grasps'] 00046 _slot_types = ['float64','float64','float64','float64','bool','bool','bool','bool','int32','bool','bool'] 00047 00048 def __init__(self, *args, **kwds): 00049 """ 00050 Constructor. Any message fields that are implicitly/explicitly 00051 set to None will be assigned a default value. The recommend 00052 use is keyword arguments as this is more robust to future message 00053 changes. You cannot mix in-order arguments and keyword arguments. 00054 00055 The available fields are: 00056 height_good_for_side_grasps,gripper_opening,side_step,palm_step,overhead_grasps_only,side_grasps_only,include_high_point_grasps,pregrasp_just_outside_box,backoff_depth_steps,disable_grasp_neighbor_check,randomize_grasps 00057 00058 @param args: complete set of field values, in .msg order 00059 @param kwds: use keyword arguments corresponding to message field names 00060 to set specific fields. 00061 """ 00062 if args or kwds: 00063 super(SetPointClusterGraspParamsRequest, self).__init__(*args, **kwds) 00064 #message fields cannot be None, assign default values for those that are 00065 if self.height_good_for_side_grasps is None: 00066 self.height_good_for_side_grasps = 0. 00067 if self.gripper_opening is None: 00068 self.gripper_opening = 0. 00069 if self.side_step is None: 00070 self.side_step = 0. 00071 if self.palm_step is None: 00072 self.palm_step = 0. 00073 if self.overhead_grasps_only is None: 00074 self.overhead_grasps_only = False 00075 if self.side_grasps_only is None: 00076 self.side_grasps_only = False 00077 if self.include_high_point_grasps is None: 00078 self.include_high_point_grasps = False 00079 if self.pregrasp_just_outside_box is None: 00080 self.pregrasp_just_outside_box = False 00081 if self.backoff_depth_steps is None: 00082 self.backoff_depth_steps = 0 00083 if self.disable_grasp_neighbor_check is None: 00084 self.disable_grasp_neighbor_check = False 00085 if self.randomize_grasps is None: 00086 self.randomize_grasps = False 00087 else: 00088 self.height_good_for_side_grasps = 0. 00089 self.gripper_opening = 0. 00090 self.side_step = 0. 00091 self.palm_step = 0. 00092 self.overhead_grasps_only = False 00093 self.side_grasps_only = False 00094 self.include_high_point_grasps = False 00095 self.pregrasp_just_outside_box = False 00096 self.backoff_depth_steps = 0 00097 self.disable_grasp_neighbor_check = False 00098 self.randomize_grasps = False 00099 00100 def _get_types(self): 00101 """ 00102 internal API method 00103 """ 00104 return self._slot_types 00105 00106 def serialize(self, buff): 00107 """ 00108 serialize message into buffer 00109 @param buff: buffer 00110 @type buff: StringIO 00111 """ 00112 try: 00113 _x = self 00114 buff.write(_struct_4d4Bi2B.pack(_x.height_good_for_side_grasps, _x.gripper_opening, _x.side_step, _x.palm_step, _x.overhead_grasps_only, _x.side_grasps_only, _x.include_high_point_grasps, _x.pregrasp_just_outside_box, _x.backoff_depth_steps, _x.disable_grasp_neighbor_check, _x.randomize_grasps)) 00115 except struct.error as se: self._check_types(se) 00116 except TypeError as te: self._check_types(te) 00117 00118 def deserialize(self, str): 00119 """ 00120 unpack serialized message in str into this message instance 00121 @param str: byte array of serialized message 00122 @type str: str 00123 """ 00124 try: 00125 end = 0 00126 _x = self 00127 start = end 00128 end += 42 00129 (_x.height_good_for_side_grasps, _x.gripper_opening, _x.side_step, _x.palm_step, _x.overhead_grasps_only, _x.side_grasps_only, _x.include_high_point_grasps, _x.pregrasp_just_outside_box, _x.backoff_depth_steps, _x.disable_grasp_neighbor_check, _x.randomize_grasps,) = _struct_4d4Bi2B.unpack(str[start:end]) 00130 self.overhead_grasps_only = bool(self.overhead_grasps_only) 00131 self.side_grasps_only = bool(self.side_grasps_only) 00132 self.include_high_point_grasps = bool(self.include_high_point_grasps) 00133 self.pregrasp_just_outside_box = bool(self.pregrasp_just_outside_box) 00134 self.disable_grasp_neighbor_check = bool(self.disable_grasp_neighbor_check) 00135 self.randomize_grasps = bool(self.randomize_grasps) 00136 return self 00137 except struct.error as e: 00138 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00139 00140 00141 def serialize_numpy(self, buff, numpy): 00142 """ 00143 serialize message with numpy array types into buffer 00144 @param buff: buffer 00145 @type buff: StringIO 00146 @param numpy: numpy python module 00147 @type numpy module 00148 """ 00149 try: 00150 _x = self 00151 buff.write(_struct_4d4Bi2B.pack(_x.height_good_for_side_grasps, _x.gripper_opening, _x.side_step, _x.palm_step, _x.overhead_grasps_only, _x.side_grasps_only, _x.include_high_point_grasps, _x.pregrasp_just_outside_box, _x.backoff_depth_steps, _x.disable_grasp_neighbor_check, _x.randomize_grasps)) 00152 except struct.error as se: self._check_types(se) 00153 except TypeError as te: self._check_types(te) 00154 00155 def deserialize_numpy(self, str, numpy): 00156 """ 00157 unpack serialized message in str into this message instance using numpy for array types 00158 @param str: byte array of serialized message 00159 @type str: str 00160 @param numpy: numpy python module 00161 @type numpy: module 00162 """ 00163 try: 00164 end = 0 00165 _x = self 00166 start = end 00167 end += 42 00168 (_x.height_good_for_side_grasps, _x.gripper_opening, _x.side_step, _x.palm_step, _x.overhead_grasps_only, _x.side_grasps_only, _x.include_high_point_grasps, _x.pregrasp_just_outside_box, _x.backoff_depth_steps, _x.disable_grasp_neighbor_check, _x.randomize_grasps,) = _struct_4d4Bi2B.unpack(str[start:end]) 00169 self.overhead_grasps_only = bool(self.overhead_grasps_only) 00170 self.side_grasps_only = bool(self.side_grasps_only) 00171 self.include_high_point_grasps = bool(self.include_high_point_grasps) 00172 self.pregrasp_just_outside_box = bool(self.pregrasp_just_outside_box) 00173 self.disable_grasp_neighbor_check = bool(self.disable_grasp_neighbor_check) 00174 self.randomize_grasps = bool(self.randomize_grasps) 00175 return self 00176 except struct.error as e: 00177 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00178 00179 _struct_I = roslib.message.struct_I 00180 _struct_4d4Bi2B = struct.Struct("<4d4Bi2B") 00181 """autogenerated by genmsg_py from SetPointClusterGraspParamsResponse.msg. Do not edit.""" 00182 import roslib.message 00183 import struct 00184 00185 00186 class SetPointClusterGraspParamsResponse(roslib.message.Message): 00187 _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 00188 _type = "pr2_gripper_grasp_planner_cluster/SetPointClusterGraspParamsResponse" 00189 _has_header = False #flag to mark the presence of a Header object 00190 _full_text = """ 00191 """ 00192 __slots__ = [] 00193 _slot_types = [] 00194 00195 def __init__(self, *args, **kwds): 00196 """ 00197 Constructor. Any message fields that are implicitly/explicitly 00198 set to None will be assigned a default value. The recommend 00199 use is keyword arguments as this is more robust to future message 00200 changes. You cannot mix in-order arguments and keyword arguments. 00201 00202 The available fields are: 00203 00204 00205 @param args: complete set of field values, in .msg order 00206 @param kwds: use keyword arguments corresponding to message field names 00207 to set specific fields. 00208 """ 00209 if args or kwds: 00210 super(SetPointClusterGraspParamsResponse, self).__init__(*args, **kwds) 00211 00212 def _get_types(self): 00213 """ 00214 internal API method 00215 """ 00216 return self._slot_types 00217 00218 def serialize(self, buff): 00219 """ 00220 serialize message into buffer 00221 @param buff: buffer 00222 @type buff: StringIO 00223 """ 00224 try: 00225 pass 00226 except struct.error as se: self._check_types(se) 00227 except TypeError as te: self._check_types(te) 00228 00229 def deserialize(self, str): 00230 """ 00231 unpack serialized message in str into this message instance 00232 @param str: byte array of serialized message 00233 @type str: str 00234 """ 00235 try: 00236 end = 0 00237 return self 00238 except struct.error as e: 00239 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00240 00241 00242 def serialize_numpy(self, buff, numpy): 00243 """ 00244 serialize message with numpy array types into buffer 00245 @param buff: buffer 00246 @type buff: StringIO 00247 @param numpy: numpy python module 00248 @type numpy module 00249 """ 00250 try: 00251 pass 00252 except struct.error as se: self._check_types(se) 00253 except TypeError as te: self._check_types(te) 00254 00255 def deserialize_numpy(self, str, numpy): 00256 """ 00257 unpack serialized message in str into this message instance using numpy for array types 00258 @param str: byte array of serialized message 00259 @type str: str 00260 @param numpy: numpy python module 00261 @type numpy: module 00262 """ 00263 try: 00264 end = 0 00265 return self 00266 except struct.error as e: 00267 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00268 00269 _struct_I = roslib.message.struct_I 00270 class SetPointClusterGraspParams(roslib.message.ServiceDefinition): 00271 _type = 'pr2_gripper_grasp_planner_cluster/SetPointClusterGraspParams' 00272 _md5sum = '176c495282fca5febd8468900b9ef915' 00273 _request_class = SetPointClusterGraspParamsRequest 00274 _response_class = SetPointClusterGraspParamsResponse