00001 """autogenerated by genmsg_py from getPoseRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006
00007 class getPoseRequest(roslib.message.Message):
00008 _md5sum = "7ee2fbad0c07db0b009763e855e9b2ac"
00009 _type = "wviz_kinematic_manager/getPoseRequest"
00010 _has_header = False
00011 _full_text = """string[] target_links
00012 geometry_msgs/Pose target_pose
00013
00014 ================================================================================
00015 MSG: geometry_msgs/Pose
00016 # A representation of pose in free space, composed of postion and orientation.
00017 Point position
00018 Quaternion orientation
00019
00020 ================================================================================
00021 MSG: geometry_msgs/Point
00022 # This contains the position of a point in free space
00023 float64 x
00024 float64 y
00025 float64 z
00026
00027 ================================================================================
00028 MSG: geometry_msgs/Quaternion
00029 # This represents an orientation in free space in quaternion form.
00030
00031 float64 x
00032 float64 y
00033 float64 z
00034 float64 w
00035
00036 """
00037 __slots__ = ['target_links','target_pose']
00038 _slot_types = ['string[]','geometry_msgs/Pose']
00039
00040 def __init__(self, *args, **kwds):
00041 """
00042 Constructor. Any message fields that are implicitly/explicitly
00043 set to None will be assigned a default value. The recommend
00044 use is keyword arguments as this is more robust to future message
00045 changes. You cannot mix in-order arguments and keyword arguments.
00046
00047 The available fields are:
00048 target_links,target_pose
00049
00050 @param args: complete set of field values, in .msg order
00051 @param kwds: use keyword arguments corresponding to message field names
00052 to set specific fields.
00053 """
00054 if args or kwds:
00055 super(getPoseRequest, self).__init__(*args, **kwds)
00056
00057 if self.target_links is None:
00058 self.target_links = []
00059 if self.target_pose is None:
00060 self.target_pose = geometry_msgs.msg.Pose()
00061 else:
00062 self.target_links = []
00063 self.target_pose = geometry_msgs.msg.Pose()
00064
00065 def _get_types(self):
00066 """
00067 internal API method
00068 """
00069 return self._slot_types
00070
00071 def serialize(self, buff):
00072 """
00073 serialize message into buffer
00074 @param buff: buffer
00075 @type buff: StringIO
00076 """
00077 try:
00078 length = len(self.target_links)
00079 buff.write(_struct_I.pack(length))
00080 for val1 in self.target_links:
00081 length = len(val1)
00082 buff.write(struct.pack('<I%ss'%length, length, val1))
00083 _x = self
00084 buff.write(_struct_7d.pack(_x.target_pose.position.x, _x.target_pose.position.y, _x.target_pose.position.z, _x.target_pose.orientation.x, _x.target_pose.orientation.y, _x.target_pose.orientation.z, _x.target_pose.orientation.w))
00085 except struct.error, se: self._check_types(se)
00086 except TypeError, te: self._check_types(te)
00087
00088 def deserialize(self, str):
00089 """
00090 unpack serialized message in str into this message instance
00091 @param str: byte array of serialized message
00092 @type str: str
00093 """
00094 try:
00095 if self.target_pose is None:
00096 self.target_pose = geometry_msgs.msg.Pose()
00097 end = 0
00098 start = end
00099 end += 4
00100 (length,) = _struct_I.unpack(str[start:end])
00101 self.target_links = []
00102 for i in xrange(0, length):
00103 start = end
00104 end += 4
00105 (length,) = _struct_I.unpack(str[start:end])
00106 start = end
00107 end += length
00108 val1 = str[start:end]
00109 self.target_links.append(val1)
00110 _x = self
00111 start = end
00112 end += 56
00113 (_x.target_pose.position.x, _x.target_pose.position.y, _x.target_pose.position.z, _x.target_pose.orientation.x, _x.target_pose.orientation.y, _x.target_pose.orientation.z, _x.target_pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00114 return self
00115 except struct.error, e:
00116 raise roslib.message.DeserializationError(e)
00117
00118
00119 def serialize_numpy(self, buff, numpy):
00120 """
00121 serialize message with numpy array types into buffer
00122 @param buff: buffer
00123 @type buff: StringIO
00124 @param numpy: numpy python module
00125 @type numpy module
00126 """
00127 try:
00128 length = len(self.target_links)
00129 buff.write(_struct_I.pack(length))
00130 for val1 in self.target_links:
00131 length = len(val1)
00132 buff.write(struct.pack('<I%ss'%length, length, val1))
00133 _x = self
00134 buff.write(_struct_7d.pack(_x.target_pose.position.x, _x.target_pose.position.y, _x.target_pose.position.z, _x.target_pose.orientation.x, _x.target_pose.orientation.y, _x.target_pose.orientation.z, _x.target_pose.orientation.w))
00135 except struct.error, se: self._check_types(se)
00136 except TypeError, te: self._check_types(te)
00137
00138 def deserialize_numpy(self, str, numpy):
00139 """
00140 unpack serialized message in str into this message instance using numpy for array types
00141 @param str: byte array of serialized message
00142 @type str: str
00143 @param numpy: numpy python module
00144 @type numpy: module
00145 """
00146 try:
00147 if self.target_pose is None:
00148 self.target_pose = geometry_msgs.msg.Pose()
00149 end = 0
00150 start = end
00151 end += 4
00152 (length,) = _struct_I.unpack(str[start:end])
00153 self.target_links = []
00154 for i in xrange(0, length):
00155 start = end
00156 end += 4
00157 (length,) = _struct_I.unpack(str[start:end])
00158 start = end
00159 end += length
00160 val1 = str[start:end]
00161 self.target_links.append(val1)
00162 _x = self
00163 start = end
00164 end += 56
00165 (_x.target_pose.position.x, _x.target_pose.position.y, _x.target_pose.position.z, _x.target_pose.orientation.x, _x.target_pose.orientation.y, _x.target_pose.orientation.z, _x.target_pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00166 return self
00167 except struct.error, e:
00168 raise roslib.message.DeserializationError(e)
00169
00170 _struct_I = roslib.message.struct_I
00171 _struct_7d = struct.Struct("<7d")
00172 """autogenerated by genmsg_py from getPoseResponse.msg. Do not edit."""
00173 import roslib.message
00174 import struct
00175
00176 import geometry_msgs.msg
00177 import std_msgs.msg
00178
00179 class getPoseResponse(roslib.message.Message):
00180 _md5sum = "7451f3d6bd520fd7f0ba4283adfac02c"
00181 _type = "wviz_kinematic_manager/getPoseResponse"
00182 _has_header = False
00183 _full_text = """geometry_msgs/PoseStamped[] pose_stamped
00184 string[] link_names
00185 int32 error_code
00186
00187
00188 ================================================================================
00189 MSG: geometry_msgs/PoseStamped
00190 # A Pose with reference coordinate frame and timestamp
00191 Header header
00192 Pose pose
00193
00194 ================================================================================
00195 MSG: std_msgs/Header
00196 # Standard metadata for higher-level stamped data types.
00197 # This is generally used to communicate timestamped data
00198 # in a particular coordinate frame.
00199 #
00200 # sequence ID: consecutively increasing ID
00201 uint32 seq
00202 #Two-integer timestamp that is expressed as:
00203 # * stamp.secs: seconds (stamp_secs) since epoch
00204 # * stamp.nsecs: nanoseconds since stamp_secs
00205 # time-handling sugar is provided by the client library
00206 time stamp
00207 #Frame this data is associated with
00208 # 0: no frame
00209 # 1: global frame
00210 string frame_id
00211
00212 ================================================================================
00213 MSG: geometry_msgs/Pose
00214 # A representation of pose in free space, composed of postion and orientation.
00215 Point position
00216 Quaternion orientation
00217
00218 ================================================================================
00219 MSG: geometry_msgs/Point
00220 # This contains the position of a point in free space
00221 float64 x
00222 float64 y
00223 float64 z
00224
00225 ================================================================================
00226 MSG: geometry_msgs/Quaternion
00227 # This represents an orientation in free space in quaternion form.
00228
00229 float64 x
00230 float64 y
00231 float64 z
00232 float64 w
00233
00234 """
00235 __slots__ = ['pose_stamped','link_names','error_code']
00236 _slot_types = ['geometry_msgs/PoseStamped[]','string[]','int32']
00237
00238 def __init__(self, *args, **kwds):
00239 """
00240 Constructor. Any message fields that are implicitly/explicitly
00241 set to None will be assigned a default value. The recommend
00242 use is keyword arguments as this is more robust to future message
00243 changes. You cannot mix in-order arguments and keyword arguments.
00244
00245 The available fields are:
00246 pose_stamped,link_names,error_code
00247
00248 @param args: complete set of field values, in .msg order
00249 @param kwds: use keyword arguments corresponding to message field names
00250 to set specific fields.
00251 """
00252 if args or kwds:
00253 super(getPoseResponse, self).__init__(*args, **kwds)
00254
00255 if self.pose_stamped is None:
00256 self.pose_stamped = []
00257 if self.link_names is None:
00258 self.link_names = []
00259 if self.error_code is None:
00260 self.error_code = 0
00261 else:
00262 self.pose_stamped = []
00263 self.link_names = []
00264 self.error_code = 0
00265
00266 def _get_types(self):
00267 """
00268 internal API method
00269 """
00270 return self._slot_types
00271
00272 def serialize(self, buff):
00273 """
00274 serialize message into buffer
00275 @param buff: buffer
00276 @type buff: StringIO
00277 """
00278 try:
00279 length = len(self.pose_stamped)
00280 buff.write(_struct_I.pack(length))
00281 for val1 in self.pose_stamped:
00282 _v1 = val1.header
00283 buff.write(_struct_I.pack(_v1.seq))
00284 _v2 = _v1.stamp
00285 _x = _v2
00286 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00287 _x = _v1.frame_id
00288 length = len(_x)
00289 buff.write(struct.pack('<I%ss'%length, length, _x))
00290 _v3 = val1.pose
00291 _v4 = _v3.position
00292 _x = _v4
00293 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00294 _v5 = _v3.orientation
00295 _x = _v5
00296 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00297 length = len(self.link_names)
00298 buff.write(_struct_I.pack(length))
00299 for val1 in self.link_names:
00300 length = len(val1)
00301 buff.write(struct.pack('<I%ss'%length, length, val1))
00302 buff.write(_struct_i.pack(self.error_code))
00303 except struct.error, se: self._check_types(se)
00304 except TypeError, te: self._check_types(te)
00305
00306 def deserialize(self, str):
00307 """
00308 unpack serialized message in str into this message instance
00309 @param str: byte array of serialized message
00310 @type str: str
00311 """
00312 try:
00313 end = 0
00314 start = end
00315 end += 4
00316 (length,) = _struct_I.unpack(str[start:end])
00317 self.pose_stamped = []
00318 for i in xrange(0, length):
00319 val1 = geometry_msgs.msg.PoseStamped()
00320 _v6 = val1.header
00321 start = end
00322 end += 4
00323 (_v6.seq,) = _struct_I.unpack(str[start:end])
00324 _v7 = _v6.stamp
00325 _x = _v7
00326 start = end
00327 end += 8
00328 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00329 start = end
00330 end += 4
00331 (length,) = _struct_I.unpack(str[start:end])
00332 start = end
00333 end += length
00334 _v6.frame_id = str[start:end]
00335 _v8 = val1.pose
00336 _v9 = _v8.position
00337 _x = _v9
00338 start = end
00339 end += 24
00340 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00341 _v10 = _v8.orientation
00342 _x = _v10
00343 start = end
00344 end += 32
00345 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00346 self.pose_stamped.append(val1)
00347 start = end
00348 end += 4
00349 (length,) = _struct_I.unpack(str[start:end])
00350 self.link_names = []
00351 for i in xrange(0, length):
00352 start = end
00353 end += 4
00354 (length,) = _struct_I.unpack(str[start:end])
00355 start = end
00356 end += length
00357 val1 = str[start:end]
00358 self.link_names.append(val1)
00359 start = end
00360 end += 4
00361 (self.error_code,) = _struct_i.unpack(str[start:end])
00362 return self
00363 except struct.error, e:
00364 raise roslib.message.DeserializationError(e)
00365
00366
00367 def serialize_numpy(self, buff, numpy):
00368 """
00369 serialize message with numpy array types into buffer
00370 @param buff: buffer
00371 @type buff: StringIO
00372 @param numpy: numpy python module
00373 @type numpy module
00374 """
00375 try:
00376 length = len(self.pose_stamped)
00377 buff.write(_struct_I.pack(length))
00378 for val1 in self.pose_stamped:
00379 _v11 = val1.header
00380 buff.write(_struct_I.pack(_v11.seq))
00381 _v12 = _v11.stamp
00382 _x = _v12
00383 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00384 _x = _v11.frame_id
00385 length = len(_x)
00386 buff.write(struct.pack('<I%ss'%length, length, _x))
00387 _v13 = val1.pose
00388 _v14 = _v13.position
00389 _x = _v14
00390 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00391 _v15 = _v13.orientation
00392 _x = _v15
00393 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00394 length = len(self.link_names)
00395 buff.write(_struct_I.pack(length))
00396 for val1 in self.link_names:
00397 length = len(val1)
00398 buff.write(struct.pack('<I%ss'%length, length, val1))
00399 buff.write(_struct_i.pack(self.error_code))
00400 except struct.error, se: self._check_types(se)
00401 except TypeError, te: self._check_types(te)
00402
00403 def deserialize_numpy(self, str, numpy):
00404 """
00405 unpack serialized message in str into this message instance using numpy for array types
00406 @param str: byte array of serialized message
00407 @type str: str
00408 @param numpy: numpy python module
00409 @type numpy: module
00410 """
00411 try:
00412 end = 0
00413 start = end
00414 end += 4
00415 (length,) = _struct_I.unpack(str[start:end])
00416 self.pose_stamped = []
00417 for i in xrange(0, length):
00418 val1 = geometry_msgs.msg.PoseStamped()
00419 _v16 = val1.header
00420 start = end
00421 end += 4
00422 (_v16.seq,) = _struct_I.unpack(str[start:end])
00423 _v17 = _v16.stamp
00424 _x = _v17
00425 start = end
00426 end += 8
00427 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00428 start = end
00429 end += 4
00430 (length,) = _struct_I.unpack(str[start:end])
00431 start = end
00432 end += length
00433 _v16.frame_id = str[start:end]
00434 _v18 = val1.pose
00435 _v19 = _v18.position
00436 _x = _v19
00437 start = end
00438 end += 24
00439 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00440 _v20 = _v18.orientation
00441 _x = _v20
00442 start = end
00443 end += 32
00444 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00445 self.pose_stamped.append(val1)
00446 start = end
00447 end += 4
00448 (length,) = _struct_I.unpack(str[start:end])
00449 self.link_names = []
00450 for i in xrange(0, length):
00451 start = end
00452 end += 4
00453 (length,) = _struct_I.unpack(str[start:end])
00454 start = end
00455 end += length
00456 val1 = str[start:end]
00457 self.link_names.append(val1)
00458 start = end
00459 end += 4
00460 (self.error_code,) = _struct_i.unpack(str[start:end])
00461 return self
00462 except struct.error, e:
00463 raise roslib.message.DeserializationError(e)
00464
00465 _struct_I = roslib.message.struct_I
00466 _struct_i = struct.Struct("<i")
00467 _struct_4d = struct.Struct("<4d")
00468 _struct_2I = struct.Struct("<2I")
00469 _struct_3d = struct.Struct("<3d")
00470 class getPose(roslib.message.ServiceDefinition):
00471 _type = 'wviz_kinematic_manager/getPose'
00472 _md5sum = 'f83421ab90906a7c0f59d3af9b0985c9'
00473 _request_class = getPoseRequest
00474 _response_class = getPoseResponse