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