00001 """autogenerated by genmsg_py from LoadDatabaseModelRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006
00007 class LoadDatabaseModelRequest(roslib.message.Message):
00008 _md5sum = "e0142126fa25500956c0574c8caa1798"
00009 _type = "graspit_interface_msgs/LoadDatabaseModelRequest"
00010 _has_header = False
00011 _full_text = """
00012
00013
00014
00015
00016 int32 model_id
00017
00018
00019 geometry_msgs/Pose model_pose
00020
00021
00022
00023 bool clear_other_models
00024
00025
00026 ================================================================================
00027 MSG: geometry_msgs/Pose
00028 # A representation of pose in free space, composed of postion and orientation.
00029 Point position
00030 Quaternion orientation
00031
00032 ================================================================================
00033 MSG: geometry_msgs/Point
00034 # This contains the position of a point in free space
00035 float64 x
00036 float64 y
00037 float64 z
00038
00039 ================================================================================
00040 MSG: geometry_msgs/Quaternion
00041 # This represents an orientation in free space in quaternion form.
00042
00043 float64 x
00044 float64 y
00045 float64 z
00046 float64 w
00047
00048 """
00049 __slots__ = ['model_id','model_pose','clear_other_models']
00050 _slot_types = ['int32','geometry_msgs/Pose','bool']
00051
00052 def __init__(self, *args, **kwds):
00053 """
00054 Constructor. Any message fields that are implicitly/explicitly
00055 set to None will be assigned a default value. The recommend
00056 use is keyword arguments as this is more robust to future message
00057 changes. You cannot mix in-order arguments and keyword arguments.
00058
00059 The available fields are:
00060 model_id,model_pose,clear_other_models
00061
00062 @param args: complete set of field values, in .msg order
00063 @param kwds: use keyword arguments corresponding to message field names
00064 to set specific fields.
00065 """
00066 if args or kwds:
00067 super(LoadDatabaseModelRequest, self).__init__(*args, **kwds)
00068
00069 if self.model_id is None:
00070 self.model_id = 0
00071 if self.model_pose is None:
00072 self.model_pose = geometry_msgs.msg.Pose()
00073 if self.clear_other_models is None:
00074 self.clear_other_models = False
00075 else:
00076 self.model_id = 0
00077 self.model_pose = geometry_msgs.msg.Pose()
00078 self.clear_other_models = False
00079
00080 def _get_types(self):
00081 """
00082 internal API method
00083 """
00084 return self._slot_types
00085
00086 def serialize(self, buff):
00087 """
00088 serialize message into buffer
00089 @param buff: buffer
00090 @type buff: StringIO
00091 """
00092 try:
00093 _x = self
00094 buff.write(_struct_i7dB.pack(_x.model_id, _x.model_pose.position.x, _x.model_pose.position.y, _x.model_pose.position.z, _x.model_pose.orientation.x, _x.model_pose.orientation.y, _x.model_pose.orientation.z, _x.model_pose.orientation.w, _x.clear_other_models))
00095 except struct.error as se: self._check_types(se)
00096 except TypeError as te: self._check_types(te)
00097
00098 def deserialize(self, str):
00099 """
00100 unpack serialized message in str into this message instance
00101 @param str: byte array of serialized message
00102 @type str: str
00103 """
00104 try:
00105 if self.model_pose is None:
00106 self.model_pose = geometry_msgs.msg.Pose()
00107 end = 0
00108 _x = self
00109 start = end
00110 end += 61
00111 (_x.model_id, _x.model_pose.position.x, _x.model_pose.position.y, _x.model_pose.position.z, _x.model_pose.orientation.x, _x.model_pose.orientation.y, _x.model_pose.orientation.z, _x.model_pose.orientation.w, _x.clear_other_models,) = _struct_i7dB.unpack(str[start:end])
00112 self.clear_other_models = bool(self.clear_other_models)
00113 return self
00114 except struct.error as e:
00115 raise roslib.message.DeserializationError(e)
00116
00117
00118 def serialize_numpy(self, buff, numpy):
00119 """
00120 serialize message with numpy array types into buffer
00121 @param buff: buffer
00122 @type buff: StringIO
00123 @param numpy: numpy python module
00124 @type numpy module
00125 """
00126 try:
00127 _x = self
00128 buff.write(_struct_i7dB.pack(_x.model_id, _x.model_pose.position.x, _x.model_pose.position.y, _x.model_pose.position.z, _x.model_pose.orientation.x, _x.model_pose.orientation.y, _x.model_pose.orientation.z, _x.model_pose.orientation.w, _x.clear_other_models))
00129 except struct.error as se: self._check_types(se)
00130 except TypeError as te: self._check_types(te)
00131
00132 def deserialize_numpy(self, str, numpy):
00133 """
00134 unpack serialized message in str into this message instance using numpy for array types
00135 @param str: byte array of serialized message
00136 @type str: str
00137 @param numpy: numpy python module
00138 @type numpy: module
00139 """
00140 try:
00141 if self.model_pose is None:
00142 self.model_pose = geometry_msgs.msg.Pose()
00143 end = 0
00144 _x = self
00145 start = end
00146 end += 61
00147 (_x.model_id, _x.model_pose.position.x, _x.model_pose.position.y, _x.model_pose.position.z, _x.model_pose.orientation.x, _x.model_pose.orientation.y, _x.model_pose.orientation.z, _x.model_pose.orientation.w, _x.clear_other_models,) = _struct_i7dB.unpack(str[start:end])
00148 self.clear_other_models = bool(self.clear_other_models)
00149 return self
00150 except struct.error as e:
00151 raise roslib.message.DeserializationError(e)
00152
00153 _struct_I = roslib.message.struct_I
00154 _struct_i7dB = struct.Struct("<i7dB")
00155 """autogenerated by genmsg_py from LoadDatabaseModelResponse.msg. Do not edit."""
00156 import roslib.message
00157 import struct
00158
00159
00160 class LoadDatabaseModelResponse(roslib.message.Message):
00161 _md5sum = "41e017e2964af6197c0f07ec9353afaf"
00162 _type = "graspit_interface_msgs/LoadDatabaseModelResponse"
00163 _has_header = False
00164 _full_text = """
00165 int32 LOAD_SUCCESS = 0
00166 int32 LOAD_FAILURE = 1
00167 int32 result
00168
00169 """
00170
00171 LOAD_SUCCESS = 0
00172 LOAD_FAILURE = 1
00173
00174 __slots__ = ['result']
00175 _slot_types = ['int32']
00176
00177 def __init__(self, *args, **kwds):
00178 """
00179 Constructor. Any message fields that are implicitly/explicitly
00180 set to None will be assigned a default value. The recommend
00181 use is keyword arguments as this is more robust to future message
00182 changes. You cannot mix in-order arguments and keyword arguments.
00183
00184 The available fields are:
00185 result
00186
00187 @param args: complete set of field values, in .msg order
00188 @param kwds: use keyword arguments corresponding to message field names
00189 to set specific fields.
00190 """
00191 if args or kwds:
00192 super(LoadDatabaseModelResponse, self).__init__(*args, **kwds)
00193
00194 if self.result is None:
00195 self.result = 0
00196 else:
00197 self.result = 0
00198
00199 def _get_types(self):
00200 """
00201 internal API method
00202 """
00203 return self._slot_types
00204
00205 def serialize(self, buff):
00206 """
00207 serialize message into buffer
00208 @param buff: buffer
00209 @type buff: StringIO
00210 """
00211 try:
00212 buff.write(_struct_i.pack(self.result))
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 end = 0
00224 start = end
00225 end += 4
00226 (self.result,) = _struct_i.unpack(str[start:end])
00227 return self
00228 except struct.error as e:
00229 raise roslib.message.DeserializationError(e)
00230
00231
00232 def serialize_numpy(self, buff, numpy):
00233 """
00234 serialize message with numpy array types into buffer
00235 @param buff: buffer
00236 @type buff: StringIO
00237 @param numpy: numpy python module
00238 @type numpy module
00239 """
00240 try:
00241 buff.write(_struct_i.pack(self.result))
00242 except struct.error as se: self._check_types(se)
00243 except TypeError as te: self._check_types(te)
00244
00245 def deserialize_numpy(self, str, numpy):
00246 """
00247 unpack serialized message in str into this message instance using numpy for array types
00248 @param str: byte array of serialized message
00249 @type str: str
00250 @param numpy: numpy python module
00251 @type numpy: module
00252 """
00253 try:
00254 end = 0
00255 start = end
00256 end += 4
00257 (self.result,) = _struct_i.unpack(str[start:end])
00258 return self
00259 except struct.error as e:
00260 raise roslib.message.DeserializationError(e)
00261
00262 _struct_I = roslib.message.struct_I
00263 _struct_i = struct.Struct("<i")
00264 class LoadDatabaseModel(roslib.message.ServiceDefinition):
00265 _type = 'graspit_interface_msgs/LoadDatabaseModel'
00266 _md5sum = '8e7f810fdd6e19434987115ec75645ca'
00267 _request_class = LoadDatabaseModelRequest
00268 _response_class = LoadDatabaseModelResponse