00001 """autogenerated by genmsg_py from ExecuteCartesianIKTrajectoryRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006 import std_msgs.msg
00007
00008 class ExecuteCartesianIKTrajectoryRequest(roslib.message.Message):
00009 _md5sum = "916c28c5764443f268b296bb671b9d97"
00010 _type = "pr2_plugs_gazebo_demo/ExecuteCartesianIKTrajectoryRequest"
00011 _has_header = True
00012 _full_text = """Header header
00013 geometry_msgs/Pose[] poses
00014
00015 ================================================================================
00016 MSG: std_msgs/Header
00017 # Standard metadata for higher-level stamped data types.
00018 # This is generally used to communicate timestamped data
00019 # in a particular coordinate frame.
00020 #
00021 # sequence ID: consecutively increasing ID
00022 uint32 seq
00023 #Two-integer timestamp that is expressed as:
00024 # * stamp.secs: seconds (stamp_secs) since epoch
00025 # * stamp.nsecs: nanoseconds since stamp_secs
00026 # time-handling sugar is provided by the client library
00027 time stamp
00028 #Frame this data is associated with
00029 # 0: no frame
00030 # 1: global frame
00031 string frame_id
00032
00033 ================================================================================
00034 MSG: geometry_msgs/Pose
00035 # A representation of pose in free space, composed of postion and orientation.
00036 Point position
00037 Quaternion orientation
00038
00039 ================================================================================
00040 MSG: geometry_msgs/Point
00041 # This contains the position of a point in free space
00042 float64 x
00043 float64 y
00044 float64 z
00045
00046 ================================================================================
00047 MSG: geometry_msgs/Quaternion
00048 # This represents an orientation in free space in quaternion form.
00049
00050 float64 x
00051 float64 y
00052 float64 z
00053 float64 w
00054
00055 """
00056 __slots__ = ['header','poses']
00057 _slot_types = ['Header','geometry_msgs/Pose[]']
00058
00059 def __init__(self, *args, **kwds):
00060 """
00061 Constructor. Any message fields that are implicitly/explicitly
00062 set to None will be assigned a default value. The recommend
00063 use is keyword arguments as this is more robust to future message
00064 changes. You cannot mix in-order arguments and keyword arguments.
00065
00066 The available fields are:
00067 header,poses
00068
00069 @param args: complete set of field values, in .msg order
00070 @param kwds: use keyword arguments corresponding to message field names
00071 to set specific fields.
00072 """
00073 if args or kwds:
00074 super(ExecuteCartesianIKTrajectoryRequest, self).__init__(*args, **kwds)
00075
00076 if self.header is None:
00077 self.header = std_msgs.msg._Header.Header()
00078 if self.poses is None:
00079 self.poses = []
00080 else:
00081 self.header = std_msgs.msg._Header.Header()
00082 self.poses = []
00083
00084 def _get_types(self):
00085 """
00086 internal API method
00087 """
00088 return self._slot_types
00089
00090 def serialize(self, buff):
00091 """
00092 serialize message into buffer
00093 @param buff: buffer
00094 @type buff: StringIO
00095 """
00096 try:
00097 _x = self
00098 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00099 _x = self.header.frame_id
00100 length = len(_x)
00101 buff.write(struct.pack('<I%ss'%length, length, _x))
00102 length = len(self.poses)
00103 buff.write(_struct_I.pack(length))
00104 for val1 in self.poses:
00105 _v1 = val1.position
00106 _x = _v1
00107 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00108 _v2 = val1.orientation
00109 _x = _v2
00110 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00111 except struct.error, se: self._check_types(se)
00112 except TypeError, te: self._check_types(te)
00113
00114 def deserialize(self, str):
00115 """
00116 unpack serialized message in str into this message instance
00117 @param str: byte array of serialized message
00118 @type str: str
00119 """
00120 try:
00121 if self.header is None:
00122 self.header = std_msgs.msg._Header.Header()
00123 end = 0
00124 _x = self
00125 start = end
00126 end += 12
00127 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00128 start = end
00129 end += 4
00130 (length,) = _struct_I.unpack(str[start:end])
00131 start = end
00132 end += length
00133 self.header.frame_id = str[start:end]
00134 start = end
00135 end += 4
00136 (length,) = _struct_I.unpack(str[start:end])
00137 self.poses = []
00138 for i in xrange(0, length):
00139 val1 = geometry_msgs.msg.Pose()
00140 _v3 = val1.position
00141 _x = _v3
00142 start = end
00143 end += 24
00144 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00145 _v4 = val1.orientation
00146 _x = _v4
00147 start = end
00148 end += 32
00149 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00150 self.poses.append(val1)
00151 return self
00152 except struct.error, e:
00153 raise roslib.message.DeserializationError(e)
00154
00155
00156 def serialize_numpy(self, buff, numpy):
00157 """
00158 serialize message with numpy array types into buffer
00159 @param buff: buffer
00160 @type buff: StringIO
00161 @param numpy: numpy python module
00162 @type numpy module
00163 """
00164 try:
00165 _x = self
00166 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00167 _x = self.header.frame_id
00168 length = len(_x)
00169 buff.write(struct.pack('<I%ss'%length, length, _x))
00170 length = len(self.poses)
00171 buff.write(_struct_I.pack(length))
00172 for val1 in self.poses:
00173 _v5 = val1.position
00174 _x = _v5
00175 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00176 _v6 = val1.orientation
00177 _x = _v6
00178 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00179 except struct.error, se: self._check_types(se)
00180 except TypeError, te: self._check_types(te)
00181
00182 def deserialize_numpy(self, str, numpy):
00183 """
00184 unpack serialized message in str into this message instance using numpy for array types
00185 @param str: byte array of serialized message
00186 @type str: str
00187 @param numpy: numpy python module
00188 @type numpy: module
00189 """
00190 try:
00191 if self.header is None:
00192 self.header = std_msgs.msg._Header.Header()
00193 end = 0
00194 _x = self
00195 start = end
00196 end += 12
00197 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00198 start = end
00199 end += 4
00200 (length,) = _struct_I.unpack(str[start:end])
00201 start = end
00202 end += length
00203 self.header.frame_id = str[start:end]
00204 start = end
00205 end += 4
00206 (length,) = _struct_I.unpack(str[start:end])
00207 self.poses = []
00208 for i in xrange(0, length):
00209 val1 = geometry_msgs.msg.Pose()
00210 _v7 = val1.position
00211 _x = _v7
00212 start = end
00213 end += 24
00214 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00215 _v8 = val1.orientation
00216 _x = _v8
00217 start = end
00218 end += 32
00219 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00220 self.poses.append(val1)
00221 return self
00222 except struct.error, e:
00223 raise roslib.message.DeserializationError(e)
00224
00225 _struct_I = roslib.message.struct_I
00226 _struct_3I = struct.Struct("<3I")
00227 _struct_4d = struct.Struct("<4d")
00228 _struct_3d = struct.Struct("<3d")
00229 """autogenerated by genmsg_py from ExecuteCartesianIKTrajectoryResponse.msg. Do not edit."""
00230 import roslib.message
00231 import struct
00232
00233
00234 class ExecuteCartesianIKTrajectoryResponse(roslib.message.Message):
00235 _md5sum = "952fc3b34491dbd8ce5170ced8b373fa"
00236 _type = "pr2_plugs_gazebo_demo/ExecuteCartesianIKTrajectoryResponse"
00237 _has_header = False
00238 _full_text = """uint32 success
00239
00240
00241 """
00242 __slots__ = ['success']
00243 _slot_types = ['uint32']
00244
00245 def __init__(self, *args, **kwds):
00246 """
00247 Constructor. Any message fields that are implicitly/explicitly
00248 set to None will be assigned a default value. The recommend
00249 use is keyword arguments as this is more robust to future message
00250 changes. You cannot mix in-order arguments and keyword arguments.
00251
00252 The available fields are:
00253 success
00254
00255 @param args: complete set of field values, in .msg order
00256 @param kwds: use keyword arguments corresponding to message field names
00257 to set specific fields.
00258 """
00259 if args or kwds:
00260 super(ExecuteCartesianIKTrajectoryResponse, self).__init__(*args, **kwds)
00261
00262 if self.success is None:
00263 self.success = 0
00264 else:
00265 self.success = 0
00266
00267 def _get_types(self):
00268 """
00269 internal API method
00270 """
00271 return self._slot_types
00272
00273 def serialize(self, buff):
00274 """
00275 serialize message into buffer
00276 @param buff: buffer
00277 @type buff: StringIO
00278 """
00279 try:
00280 buff.write(_struct_I.pack(self.success))
00281 except struct.error, se: self._check_types(se)
00282 except TypeError, te: self._check_types(te)
00283
00284 def deserialize(self, str):
00285 """
00286 unpack serialized message in str into this message instance
00287 @param str: byte array of serialized message
00288 @type str: str
00289 """
00290 try:
00291 end = 0
00292 start = end
00293 end += 4
00294 (self.success,) = _struct_I.unpack(str[start:end])
00295 return self
00296 except struct.error, e:
00297 raise roslib.message.DeserializationError(e)
00298
00299
00300 def serialize_numpy(self, buff, numpy):
00301 """
00302 serialize message with numpy array types into buffer
00303 @param buff: buffer
00304 @type buff: StringIO
00305 @param numpy: numpy python module
00306 @type numpy module
00307 """
00308 try:
00309 buff.write(_struct_I.pack(self.success))
00310 except struct.error, se: self._check_types(se)
00311 except TypeError, te: self._check_types(te)
00312
00313 def deserialize_numpy(self, str, numpy):
00314 """
00315 unpack serialized message in str into this message instance using numpy for array types
00316 @param str: byte array of serialized message
00317 @type str: str
00318 @param numpy: numpy python module
00319 @type numpy: module
00320 """
00321 try:
00322 end = 0
00323 start = end
00324 end += 4
00325 (self.success,) = _struct_I.unpack(str[start:end])
00326 return self
00327 except struct.error, e:
00328 raise roslib.message.DeserializationError(e)
00329
00330 _struct_I = roslib.message.struct_I
00331 class ExecuteCartesianIKTrajectory(roslib.message.ServiceDefinition):
00332 _type = 'pr2_plugs_gazebo_demo/ExecuteCartesianIKTrajectory'
00333 _md5sum = 'd904d75e10f01066c74bf87962ffff22'
00334 _request_class = ExecuteCartesianIKTrajectoryRequest
00335 _response_class = ExecuteCartesianIKTrajectoryResponse