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