00001 """autogenerated by genpy from kdl_arm_kinematics/GetWeightedIKRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import sensor_msgs.msg
00008 import geometry_msgs.msg
00009 import kdl_arm_kinematics.msg
00010 import std_msgs.msg
00011
00012 class GetWeightedIKRequest(genpy.Message):
00013 _md5sum = "53b781873d4bc97a81274c9247a551d9"
00014 _type = "kdl_arm_kinematics/GetWeightedIKRequest"
00015 _has_header = False
00016 _full_text = """
00017 geometry_msgs/PoseStamped pose
00018
00019
00020 geometry_msgs/Pose tool_frame
00021
00022
00023 sensor_msgs/JointState ik_seed
00024
00025
00026 kdl_arm_kinematics/KDLWeights weights
00027
00028
00029 ================================================================================
00030 MSG: geometry_msgs/PoseStamped
00031 # A Pose with reference coordinate frame and timestamp
00032 Header header
00033 Pose pose
00034
00035 ================================================================================
00036 MSG: std_msgs/Header
00037 # Standard metadata for higher-level stamped data types.
00038 # This is generally used to communicate timestamped data
00039 # in a particular coordinate frame.
00040 #
00041 # sequence ID: consecutively increasing ID
00042 uint32 seq
00043 #Two-integer timestamp that is expressed as:
00044 # * stamp.secs: seconds (stamp_secs) since epoch
00045 # * stamp.nsecs: nanoseconds since stamp_secs
00046 # time-handling sugar is provided by the client library
00047 time stamp
00048 #Frame this data is associated with
00049 # 0: no frame
00050 # 1: global frame
00051 string frame_id
00052
00053 ================================================================================
00054 MSG: geometry_msgs/Pose
00055 # A representation of pose in free space, composed of postion and orientation.
00056 Point position
00057 Quaternion orientation
00058
00059 ================================================================================
00060 MSG: geometry_msgs/Point
00061 # This contains the position of a point in free space
00062 float64 x
00063 float64 y
00064 float64 z
00065
00066 ================================================================================
00067 MSG: geometry_msgs/Quaternion
00068 # This represents an orientation in free space in quaternion form.
00069
00070 float64 x
00071 float64 y
00072 float64 z
00073 float64 w
00074
00075 ================================================================================
00076 MSG: sensor_msgs/JointState
00077 # This is a message that holds data to describe the state of a set of torque controlled joints.
00078 #
00079 # The state of each joint (revolute or prismatic) is defined by:
00080 # * the position of the joint (rad or m),
00081 # * the velocity of the joint (rad/s or m/s) and
00082 # * the effort that is applied in the joint (Nm or N).
00083 #
00084 # Each joint is uniquely identified by its name
00085 # The header specifies the time at which the joint states were recorded. All the joint states
00086 # in one message have to be recorded at the same time.
00087 #
00088 # This message consists of a multiple arrays, one for each part of the joint state.
00089 # The goal is to make each of the fields optional. When e.g. your joints have no
00090 # effort associated with them, you can leave the effort array empty.
00091 #
00092 # All arrays in this message should have the same size, or be empty.
00093 # This is the only way to uniquely associate the joint name with the correct
00094 # states.
00095
00096
00097 Header header
00098
00099 string[] name
00100 float64[] position
00101 float64[] velocity
00102 float64[] effort
00103
00104 ================================================================================
00105 MSG: kdl_arm_kinematics/KDLWeights
00106 byte INVALID_MODE = 0
00107 byte SET_TS = 1
00108 byte SET_JS = 2
00109 byte SET_LAMBDA = 4
00110 byte SET_TS_JS = 3
00111
00112 byte mode # or-combination of values to set
00113 float64[36] weight_ts # the 6x6 matrix of task space weights in row-major order
00114 float64[] weight_js # the joints x joints matrix of joint space weights in row-major order
00115 float64 lambda # Lambda value
00116
00117 """
00118 __slots__ = ['pose','tool_frame','ik_seed','weights']
00119 _slot_types = ['geometry_msgs/PoseStamped','geometry_msgs/Pose','sensor_msgs/JointState','kdl_arm_kinematics/KDLWeights']
00120
00121 def __init__(self, *args, **kwds):
00122 """
00123 Constructor. Any message fields that are implicitly/explicitly
00124 set to None will be assigned a default value. The recommend
00125 use is keyword arguments as this is more robust to future message
00126 changes. You cannot mix in-order arguments and keyword arguments.
00127
00128 The available fields are:
00129 pose,tool_frame,ik_seed,weights
00130
00131 :param args: complete set of field values, in .msg order
00132 :param kwds: use keyword arguments corresponding to message field names
00133 to set specific fields.
00134 """
00135 if args or kwds:
00136 super(GetWeightedIKRequest, self).__init__(*args, **kwds)
00137
00138 if self.pose is None:
00139 self.pose = geometry_msgs.msg.PoseStamped()
00140 if self.tool_frame is None:
00141 self.tool_frame = geometry_msgs.msg.Pose()
00142 if self.ik_seed is None:
00143 self.ik_seed = sensor_msgs.msg.JointState()
00144 if self.weights is None:
00145 self.weights = kdl_arm_kinematics.msg.KDLWeights()
00146 else:
00147 self.pose = geometry_msgs.msg.PoseStamped()
00148 self.tool_frame = geometry_msgs.msg.Pose()
00149 self.ik_seed = sensor_msgs.msg.JointState()
00150 self.weights = kdl_arm_kinematics.msg.KDLWeights()
00151
00152 def _get_types(self):
00153 """
00154 internal API method
00155 """
00156 return self._slot_types
00157
00158 def serialize(self, buff):
00159 """
00160 serialize message into buffer
00161 :param buff: buffer, ``StringIO``
00162 """
00163 try:
00164 _x = self
00165 buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00166 _x = self.pose.header.frame_id
00167 length = len(_x)
00168 if python3 or type(_x) == unicode:
00169 _x = _x.encode('utf-8')
00170 length = len(_x)
00171 buff.write(struct.pack('<I%ss'%length, length, _x))
00172 _x = self
00173 buff.write(_struct_14d3I.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w, _x.tool_frame.position.x, _x.tool_frame.position.y, _x.tool_frame.position.z, _x.tool_frame.orientation.x, _x.tool_frame.orientation.y, _x.tool_frame.orientation.z, _x.tool_frame.orientation.w, _x.ik_seed.header.seq, _x.ik_seed.header.stamp.secs, _x.ik_seed.header.stamp.nsecs))
00174 _x = self.ik_seed.header.frame_id
00175 length = len(_x)
00176 if python3 or type(_x) == unicode:
00177 _x = _x.encode('utf-8')
00178 length = len(_x)
00179 buff.write(struct.pack('<I%ss'%length, length, _x))
00180 length = len(self.ik_seed.name)
00181 buff.write(_struct_I.pack(length))
00182 for val1 in self.ik_seed.name:
00183 length = len(val1)
00184 if python3 or type(val1) == unicode:
00185 val1 = val1.encode('utf-8')
00186 length = len(val1)
00187 buff.write(struct.pack('<I%ss'%length, length, val1))
00188 length = len(self.ik_seed.position)
00189 buff.write(_struct_I.pack(length))
00190 pattern = '<%sd'%length
00191 buff.write(struct.pack(pattern, *self.ik_seed.position))
00192 length = len(self.ik_seed.velocity)
00193 buff.write(_struct_I.pack(length))
00194 pattern = '<%sd'%length
00195 buff.write(struct.pack(pattern, *self.ik_seed.velocity))
00196 length = len(self.ik_seed.effort)
00197 buff.write(_struct_I.pack(length))
00198 pattern = '<%sd'%length
00199 buff.write(struct.pack(pattern, *self.ik_seed.effort))
00200 buff.write(_struct_b.pack(self.weights.mode))
00201 buff.write(_struct_36d.pack(*self.weights.weight_ts))
00202 length = len(self.weights.weight_js)
00203 buff.write(_struct_I.pack(length))
00204 pattern = '<%sd'%length
00205 buff.write(struct.pack(pattern, *self.weights.weight_js))
00206 buff.write(_struct_d.pack(self.weights.lambda_))
00207 except struct.error as se: self._check_types(se)
00208 except TypeError as te: self._check_types(te)
00209
00210 def deserialize(self, str):
00211 """
00212 unpack serialized message in str into this message instance
00213 :param str: byte array of serialized message, ``str``
00214 """
00215 try:
00216 if self.pose is None:
00217 self.pose = geometry_msgs.msg.PoseStamped()
00218 if self.tool_frame is None:
00219 self.tool_frame = geometry_msgs.msg.Pose()
00220 if self.ik_seed is None:
00221 self.ik_seed = sensor_msgs.msg.JointState()
00222 if self.weights is None:
00223 self.weights = kdl_arm_kinematics.msg.KDLWeights()
00224 end = 0
00225 _x = self
00226 start = end
00227 end += 12
00228 (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00229 start = end
00230 end += 4
00231 (length,) = _struct_I.unpack(str[start:end])
00232 start = end
00233 end += length
00234 if python3:
00235 self.pose.header.frame_id = str[start:end].decode('utf-8')
00236 else:
00237 self.pose.header.frame_id = str[start:end]
00238 _x = self
00239 start = end
00240 end += 124
00241 (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w, _x.tool_frame.position.x, _x.tool_frame.position.y, _x.tool_frame.position.z, _x.tool_frame.orientation.x, _x.tool_frame.orientation.y, _x.tool_frame.orientation.z, _x.tool_frame.orientation.w, _x.ik_seed.header.seq, _x.ik_seed.header.stamp.secs, _x.ik_seed.header.stamp.nsecs,) = _struct_14d3I.unpack(str[start:end])
00242 start = end
00243 end += 4
00244 (length,) = _struct_I.unpack(str[start:end])
00245 start = end
00246 end += length
00247 if python3:
00248 self.ik_seed.header.frame_id = str[start:end].decode('utf-8')
00249 else:
00250 self.ik_seed.header.frame_id = str[start:end]
00251 start = end
00252 end += 4
00253 (length,) = _struct_I.unpack(str[start:end])
00254 self.ik_seed.name = []
00255 for i in range(0, length):
00256 start = end
00257 end += 4
00258 (length,) = _struct_I.unpack(str[start:end])
00259 start = end
00260 end += length
00261 if python3:
00262 val1 = str[start:end].decode('utf-8')
00263 else:
00264 val1 = str[start:end]
00265 self.ik_seed.name.append(val1)
00266 start = end
00267 end += 4
00268 (length,) = _struct_I.unpack(str[start:end])
00269 pattern = '<%sd'%length
00270 start = end
00271 end += struct.calcsize(pattern)
00272 self.ik_seed.position = struct.unpack(pattern, str[start:end])
00273 start = end
00274 end += 4
00275 (length,) = _struct_I.unpack(str[start:end])
00276 pattern = '<%sd'%length
00277 start = end
00278 end += struct.calcsize(pattern)
00279 self.ik_seed.velocity = struct.unpack(pattern, str[start:end])
00280 start = end
00281 end += 4
00282 (length,) = _struct_I.unpack(str[start:end])
00283 pattern = '<%sd'%length
00284 start = end
00285 end += struct.calcsize(pattern)
00286 self.ik_seed.effort = struct.unpack(pattern, str[start:end])
00287 start = end
00288 end += 1
00289 (self.weights.mode,) = _struct_b.unpack(str[start:end])
00290 start = end
00291 end += 288
00292 self.weights.weight_ts = _struct_36d.unpack(str[start:end])
00293 start = end
00294 end += 4
00295 (length,) = _struct_I.unpack(str[start:end])
00296 pattern = '<%sd'%length
00297 start = end
00298 end += struct.calcsize(pattern)
00299 self.weights.weight_js = struct.unpack(pattern, str[start:end])
00300 start = end
00301 end += 8
00302 (self.weights.lambda_,) = _struct_d.unpack(str[start:end])
00303 return self
00304 except struct.error as e:
00305 raise genpy.DeserializationError(e)
00306
00307
00308 def serialize_numpy(self, buff, numpy):
00309 """
00310 serialize message with numpy array types into buffer
00311 :param buff: buffer, ``StringIO``
00312 :param numpy: numpy python module
00313 """
00314 try:
00315 _x = self
00316 buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00317 _x = self.pose.header.frame_id
00318 length = len(_x)
00319 if python3 or type(_x) == unicode:
00320 _x = _x.encode('utf-8')
00321 length = len(_x)
00322 buff.write(struct.pack('<I%ss'%length, length, _x))
00323 _x = self
00324 buff.write(_struct_14d3I.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w, _x.tool_frame.position.x, _x.tool_frame.position.y, _x.tool_frame.position.z, _x.tool_frame.orientation.x, _x.tool_frame.orientation.y, _x.tool_frame.orientation.z, _x.tool_frame.orientation.w, _x.ik_seed.header.seq, _x.ik_seed.header.stamp.secs, _x.ik_seed.header.stamp.nsecs))
00325 _x = self.ik_seed.header.frame_id
00326 length = len(_x)
00327 if python3 or type(_x) == unicode:
00328 _x = _x.encode('utf-8')
00329 length = len(_x)
00330 buff.write(struct.pack('<I%ss'%length, length, _x))
00331 length = len(self.ik_seed.name)
00332 buff.write(_struct_I.pack(length))
00333 for val1 in self.ik_seed.name:
00334 length = len(val1)
00335 if python3 or type(val1) == unicode:
00336 val1 = val1.encode('utf-8')
00337 length = len(val1)
00338 buff.write(struct.pack('<I%ss'%length, length, val1))
00339 length = len(self.ik_seed.position)
00340 buff.write(_struct_I.pack(length))
00341 pattern = '<%sd'%length
00342 buff.write(self.ik_seed.position.tostring())
00343 length = len(self.ik_seed.velocity)
00344 buff.write(_struct_I.pack(length))
00345 pattern = '<%sd'%length
00346 buff.write(self.ik_seed.velocity.tostring())
00347 length = len(self.ik_seed.effort)
00348 buff.write(_struct_I.pack(length))
00349 pattern = '<%sd'%length
00350 buff.write(self.ik_seed.effort.tostring())
00351 buff.write(_struct_b.pack(self.weights.mode))
00352 buff.write(self.weights.weight_ts.tostring())
00353 length = len(self.weights.weight_js)
00354 buff.write(_struct_I.pack(length))
00355 pattern = '<%sd'%length
00356 buff.write(self.weights.weight_js.tostring())
00357 buff.write(_struct_d.pack(self.weights.lambda_))
00358 except struct.error as se: self._check_types(se)
00359 except TypeError as te: self._check_types(te)
00360
00361 def deserialize_numpy(self, str, numpy):
00362 """
00363 unpack serialized message in str into this message instance using numpy for array types
00364 :param str: byte array of serialized message, ``str``
00365 :param numpy: numpy python module
00366 """
00367 try:
00368 if self.pose is None:
00369 self.pose = geometry_msgs.msg.PoseStamped()
00370 if self.tool_frame is None:
00371 self.tool_frame = geometry_msgs.msg.Pose()
00372 if self.ik_seed is None:
00373 self.ik_seed = sensor_msgs.msg.JointState()
00374 if self.weights is None:
00375 self.weights = kdl_arm_kinematics.msg.KDLWeights()
00376 end = 0
00377 _x = self
00378 start = end
00379 end += 12
00380 (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00381 start = end
00382 end += 4
00383 (length,) = _struct_I.unpack(str[start:end])
00384 start = end
00385 end += length
00386 if python3:
00387 self.pose.header.frame_id = str[start:end].decode('utf-8')
00388 else:
00389 self.pose.header.frame_id = str[start:end]
00390 _x = self
00391 start = end
00392 end += 124
00393 (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w, _x.tool_frame.position.x, _x.tool_frame.position.y, _x.tool_frame.position.z, _x.tool_frame.orientation.x, _x.tool_frame.orientation.y, _x.tool_frame.orientation.z, _x.tool_frame.orientation.w, _x.ik_seed.header.seq, _x.ik_seed.header.stamp.secs, _x.ik_seed.header.stamp.nsecs,) = _struct_14d3I.unpack(str[start:end])
00394 start = end
00395 end += 4
00396 (length,) = _struct_I.unpack(str[start:end])
00397 start = end
00398 end += length
00399 if python3:
00400 self.ik_seed.header.frame_id = str[start:end].decode('utf-8')
00401 else:
00402 self.ik_seed.header.frame_id = str[start:end]
00403 start = end
00404 end += 4
00405 (length,) = _struct_I.unpack(str[start:end])
00406 self.ik_seed.name = []
00407 for i in range(0, length):
00408 start = end
00409 end += 4
00410 (length,) = _struct_I.unpack(str[start:end])
00411 start = end
00412 end += length
00413 if python3:
00414 val1 = str[start:end].decode('utf-8')
00415 else:
00416 val1 = str[start:end]
00417 self.ik_seed.name.append(val1)
00418 start = end
00419 end += 4
00420 (length,) = _struct_I.unpack(str[start:end])
00421 pattern = '<%sd'%length
00422 start = end
00423 end += struct.calcsize(pattern)
00424 self.ik_seed.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00425 start = end
00426 end += 4
00427 (length,) = _struct_I.unpack(str[start:end])
00428 pattern = '<%sd'%length
00429 start = end
00430 end += struct.calcsize(pattern)
00431 self.ik_seed.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00432 start = end
00433 end += 4
00434 (length,) = _struct_I.unpack(str[start:end])
00435 pattern = '<%sd'%length
00436 start = end
00437 end += struct.calcsize(pattern)
00438 self.ik_seed.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00439 start = end
00440 end += 1
00441 (self.weights.mode,) = _struct_b.unpack(str[start:end])
00442 start = end
00443 end += 288
00444 self.weights.weight_ts = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
00445 start = end
00446 end += 4
00447 (length,) = _struct_I.unpack(str[start:end])
00448 pattern = '<%sd'%length
00449 start = end
00450 end += struct.calcsize(pattern)
00451 self.weights.weight_js = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00452 start = end
00453 end += 8
00454 (self.weights.lambda_,) = _struct_d.unpack(str[start:end])
00455 return self
00456 except struct.error as e:
00457 raise genpy.DeserializationError(e)
00458
00459 _struct_I = genpy.struct_I
00460 _struct_3I = struct.Struct("<3I")
00461 _struct_b = struct.Struct("<b")
00462 _struct_14d3I = struct.Struct("<14d3I")
00463 _struct_36d = struct.Struct("<36d")
00464 _struct_d = struct.Struct("<d")
00465 """autogenerated by genpy from kdl_arm_kinematics/GetWeightedIKResponse.msg. Do not edit."""
00466 import sys
00467 python3 = True if sys.hexversion > 0x03000000 else False
00468 import genpy
00469 import struct
00470
00471 import arm_navigation_msgs.msg
00472 import std_msgs.msg
00473 import sensor_msgs.msg
00474
00475 class GetWeightedIKResponse(genpy.Message):
00476 _md5sum = "26703d3aa2f94a5367558f4749423a09"
00477 _type = "kdl_arm_kinematics/GetWeightedIKResponse"
00478 _has_header = False
00479 _full_text = """sensor_msgs/JointState solution
00480
00481 arm_navigation_msgs/ArmNavigationErrorCodes error_code
00482
00483
00484 ================================================================================
00485 MSG: sensor_msgs/JointState
00486 # This is a message that holds data to describe the state of a set of torque controlled joints.
00487 #
00488 # The state of each joint (revolute or prismatic) is defined by:
00489 # * the position of the joint (rad or m),
00490 # * the velocity of the joint (rad/s or m/s) and
00491 # * the effort that is applied in the joint (Nm or N).
00492 #
00493 # Each joint is uniquely identified by its name
00494 # The header specifies the time at which the joint states were recorded. All the joint states
00495 # in one message have to be recorded at the same time.
00496 #
00497 # This message consists of a multiple arrays, one for each part of the joint state.
00498 # The goal is to make each of the fields optional. When e.g. your joints have no
00499 # effort associated with them, you can leave the effort array empty.
00500 #
00501 # All arrays in this message should have the same size, or be empty.
00502 # This is the only way to uniquely associate the joint name with the correct
00503 # states.
00504
00505
00506 Header header
00507
00508 string[] name
00509 float64[] position
00510 float64[] velocity
00511 float64[] effort
00512
00513 ================================================================================
00514 MSG: std_msgs/Header
00515 # Standard metadata for higher-level stamped data types.
00516 # This is generally used to communicate timestamped data
00517 # in a particular coordinate frame.
00518 #
00519 # sequence ID: consecutively increasing ID
00520 uint32 seq
00521 #Two-integer timestamp that is expressed as:
00522 # * stamp.secs: seconds (stamp_secs) since epoch
00523 # * stamp.nsecs: nanoseconds since stamp_secs
00524 # time-handling sugar is provided by the client library
00525 time stamp
00526 #Frame this data is associated with
00527 # 0: no frame
00528 # 1: global frame
00529 string frame_id
00530
00531 ================================================================================
00532 MSG: arm_navigation_msgs/ArmNavigationErrorCodes
00533 int32 val
00534
00535 # overall behavior
00536 int32 PLANNING_FAILED=-1
00537 int32 SUCCESS=1
00538 int32 TIMED_OUT=-2
00539
00540 # start state errors
00541 int32 START_STATE_IN_COLLISION=-3
00542 int32 START_STATE_VIOLATES_PATH_CONSTRAINTS=-4
00543
00544 # goal errors
00545 int32 GOAL_IN_COLLISION=-5
00546 int32 GOAL_VIOLATES_PATH_CONSTRAINTS=-6
00547
00548 # robot state
00549 int32 INVALID_ROBOT_STATE=-7
00550 int32 INCOMPLETE_ROBOT_STATE=-8
00551
00552 # planning request errors
00553 int32 INVALID_PLANNER_ID=-9
00554 int32 INVALID_NUM_PLANNING_ATTEMPTS=-10
00555 int32 INVALID_ALLOWED_PLANNING_TIME=-11
00556 int32 INVALID_GROUP_NAME=-12
00557 int32 INVALID_GOAL_JOINT_CONSTRAINTS=-13
00558 int32 INVALID_GOAL_POSITION_CONSTRAINTS=-14
00559 int32 INVALID_GOAL_ORIENTATION_CONSTRAINTS=-15
00560 int32 INVALID_PATH_JOINT_CONSTRAINTS=-16
00561 int32 INVALID_PATH_POSITION_CONSTRAINTS=-17
00562 int32 INVALID_PATH_ORIENTATION_CONSTRAINTS=-18
00563
00564 # state/trajectory monitor errors
00565 int32 INVALID_TRAJECTORY=-19
00566 int32 INVALID_INDEX=-20
00567 int32 JOINT_LIMITS_VIOLATED=-21
00568 int32 PATH_CONSTRAINTS_VIOLATED=-22
00569 int32 COLLISION_CONSTRAINTS_VIOLATED=-23
00570 int32 GOAL_CONSTRAINTS_VIOLATED=-24
00571 int32 JOINTS_NOT_MOVING=-25
00572 int32 TRAJECTORY_CONTROLLER_FAILED=-26
00573
00574 # system errors
00575 int32 FRAME_TRANSFORM_FAILURE=-27
00576 int32 COLLISION_CHECKING_UNAVAILABLE=-28
00577 int32 ROBOT_STATE_STALE=-29
00578 int32 SENSOR_INFO_STALE=-30
00579
00580 # kinematics errors
00581 int32 NO_IK_SOLUTION=-31
00582 int32 INVALID_LINK_NAME=-32
00583 int32 IK_LINK_IN_COLLISION=-33
00584 int32 NO_FK_SOLUTION=-34
00585 int32 KINEMATICS_STATE_IN_COLLISION=-35
00586
00587 # general errors
00588 int32 INVALID_TIMEOUT=-36
00589
00590
00591 """
00592 __slots__ = ['solution','error_code']
00593 _slot_types = ['sensor_msgs/JointState','arm_navigation_msgs/ArmNavigationErrorCodes']
00594
00595 def __init__(self, *args, **kwds):
00596 """
00597 Constructor. Any message fields that are implicitly/explicitly
00598 set to None will be assigned a default value. The recommend
00599 use is keyword arguments as this is more robust to future message
00600 changes. You cannot mix in-order arguments and keyword arguments.
00601
00602 The available fields are:
00603 solution,error_code
00604
00605 :param args: complete set of field values, in .msg order
00606 :param kwds: use keyword arguments corresponding to message field names
00607 to set specific fields.
00608 """
00609 if args or kwds:
00610 super(GetWeightedIKResponse, self).__init__(*args, **kwds)
00611
00612 if self.solution is None:
00613 self.solution = sensor_msgs.msg.JointState()
00614 if self.error_code is None:
00615 self.error_code = arm_navigation_msgs.msg.ArmNavigationErrorCodes()
00616 else:
00617 self.solution = sensor_msgs.msg.JointState()
00618 self.error_code = arm_navigation_msgs.msg.ArmNavigationErrorCodes()
00619
00620 def _get_types(self):
00621 """
00622 internal API method
00623 """
00624 return self._slot_types
00625
00626 def serialize(self, buff):
00627 """
00628 serialize message into buffer
00629 :param buff: buffer, ``StringIO``
00630 """
00631 try:
00632 _x = self
00633 buff.write(_struct_3I.pack(_x.solution.header.seq, _x.solution.header.stamp.secs, _x.solution.header.stamp.nsecs))
00634 _x = self.solution.header.frame_id
00635 length = len(_x)
00636 if python3 or type(_x) == unicode:
00637 _x = _x.encode('utf-8')
00638 length = len(_x)
00639 buff.write(struct.pack('<I%ss'%length, length, _x))
00640 length = len(self.solution.name)
00641 buff.write(_struct_I.pack(length))
00642 for val1 in self.solution.name:
00643 length = len(val1)
00644 if python3 or type(val1) == unicode:
00645 val1 = val1.encode('utf-8')
00646 length = len(val1)
00647 buff.write(struct.pack('<I%ss'%length, length, val1))
00648 length = len(self.solution.position)
00649 buff.write(_struct_I.pack(length))
00650 pattern = '<%sd'%length
00651 buff.write(struct.pack(pattern, *self.solution.position))
00652 length = len(self.solution.velocity)
00653 buff.write(_struct_I.pack(length))
00654 pattern = '<%sd'%length
00655 buff.write(struct.pack(pattern, *self.solution.velocity))
00656 length = len(self.solution.effort)
00657 buff.write(_struct_I.pack(length))
00658 pattern = '<%sd'%length
00659 buff.write(struct.pack(pattern, *self.solution.effort))
00660 buff.write(_struct_i.pack(self.error_code.val))
00661 except struct.error as se: self._check_types(se)
00662 except TypeError as te: self._check_types(te)
00663
00664 def deserialize(self, str):
00665 """
00666 unpack serialized message in str into this message instance
00667 :param str: byte array of serialized message, ``str``
00668 """
00669 try:
00670 if self.solution is None:
00671 self.solution = sensor_msgs.msg.JointState()
00672 if self.error_code is None:
00673 self.error_code = arm_navigation_msgs.msg.ArmNavigationErrorCodes()
00674 end = 0
00675 _x = self
00676 start = end
00677 end += 12
00678 (_x.solution.header.seq, _x.solution.header.stamp.secs, _x.solution.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00679 start = end
00680 end += 4
00681 (length,) = _struct_I.unpack(str[start:end])
00682 start = end
00683 end += length
00684 if python3:
00685 self.solution.header.frame_id = str[start:end].decode('utf-8')
00686 else:
00687 self.solution.header.frame_id = str[start:end]
00688 start = end
00689 end += 4
00690 (length,) = _struct_I.unpack(str[start:end])
00691 self.solution.name = []
00692 for i in range(0, length):
00693 start = end
00694 end += 4
00695 (length,) = _struct_I.unpack(str[start:end])
00696 start = end
00697 end += length
00698 if python3:
00699 val1 = str[start:end].decode('utf-8')
00700 else:
00701 val1 = str[start:end]
00702 self.solution.name.append(val1)
00703 start = end
00704 end += 4
00705 (length,) = _struct_I.unpack(str[start:end])
00706 pattern = '<%sd'%length
00707 start = end
00708 end += struct.calcsize(pattern)
00709 self.solution.position = struct.unpack(pattern, str[start:end])
00710 start = end
00711 end += 4
00712 (length,) = _struct_I.unpack(str[start:end])
00713 pattern = '<%sd'%length
00714 start = end
00715 end += struct.calcsize(pattern)
00716 self.solution.velocity = struct.unpack(pattern, str[start:end])
00717 start = end
00718 end += 4
00719 (length,) = _struct_I.unpack(str[start:end])
00720 pattern = '<%sd'%length
00721 start = end
00722 end += struct.calcsize(pattern)
00723 self.solution.effort = struct.unpack(pattern, str[start:end])
00724 start = end
00725 end += 4
00726 (self.error_code.val,) = _struct_i.unpack(str[start:end])
00727 return self
00728 except struct.error as e:
00729 raise genpy.DeserializationError(e)
00730
00731
00732 def serialize_numpy(self, buff, numpy):
00733 """
00734 serialize message with numpy array types into buffer
00735 :param buff: buffer, ``StringIO``
00736 :param numpy: numpy python module
00737 """
00738 try:
00739 _x = self
00740 buff.write(_struct_3I.pack(_x.solution.header.seq, _x.solution.header.stamp.secs, _x.solution.header.stamp.nsecs))
00741 _x = self.solution.header.frame_id
00742 length = len(_x)
00743 if python3 or type(_x) == unicode:
00744 _x = _x.encode('utf-8')
00745 length = len(_x)
00746 buff.write(struct.pack('<I%ss'%length, length, _x))
00747 length = len(self.solution.name)
00748 buff.write(_struct_I.pack(length))
00749 for val1 in self.solution.name:
00750 length = len(val1)
00751 if python3 or type(val1) == unicode:
00752 val1 = val1.encode('utf-8')
00753 length = len(val1)
00754 buff.write(struct.pack('<I%ss'%length, length, val1))
00755 length = len(self.solution.position)
00756 buff.write(_struct_I.pack(length))
00757 pattern = '<%sd'%length
00758 buff.write(self.solution.position.tostring())
00759 length = len(self.solution.velocity)
00760 buff.write(_struct_I.pack(length))
00761 pattern = '<%sd'%length
00762 buff.write(self.solution.velocity.tostring())
00763 length = len(self.solution.effort)
00764 buff.write(_struct_I.pack(length))
00765 pattern = '<%sd'%length
00766 buff.write(self.solution.effort.tostring())
00767 buff.write(_struct_i.pack(self.error_code.val))
00768 except struct.error as se: self._check_types(se)
00769 except TypeError as te: self._check_types(te)
00770
00771 def deserialize_numpy(self, str, numpy):
00772 """
00773 unpack serialized message in str into this message instance using numpy for array types
00774 :param str: byte array of serialized message, ``str``
00775 :param numpy: numpy python module
00776 """
00777 try:
00778 if self.solution is None:
00779 self.solution = sensor_msgs.msg.JointState()
00780 if self.error_code is None:
00781 self.error_code = arm_navigation_msgs.msg.ArmNavigationErrorCodes()
00782 end = 0
00783 _x = self
00784 start = end
00785 end += 12
00786 (_x.solution.header.seq, _x.solution.header.stamp.secs, _x.solution.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00787 start = end
00788 end += 4
00789 (length,) = _struct_I.unpack(str[start:end])
00790 start = end
00791 end += length
00792 if python3:
00793 self.solution.header.frame_id = str[start:end].decode('utf-8')
00794 else:
00795 self.solution.header.frame_id = str[start:end]
00796 start = end
00797 end += 4
00798 (length,) = _struct_I.unpack(str[start:end])
00799 self.solution.name = []
00800 for i in range(0, length):
00801 start = end
00802 end += 4
00803 (length,) = _struct_I.unpack(str[start:end])
00804 start = end
00805 end += length
00806 if python3:
00807 val1 = str[start:end].decode('utf-8')
00808 else:
00809 val1 = str[start:end]
00810 self.solution.name.append(val1)
00811 start = end
00812 end += 4
00813 (length,) = _struct_I.unpack(str[start:end])
00814 pattern = '<%sd'%length
00815 start = end
00816 end += struct.calcsize(pattern)
00817 self.solution.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00818 start = end
00819 end += 4
00820 (length,) = _struct_I.unpack(str[start:end])
00821 pattern = '<%sd'%length
00822 start = end
00823 end += struct.calcsize(pattern)
00824 self.solution.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00825 start = end
00826 end += 4
00827 (length,) = _struct_I.unpack(str[start:end])
00828 pattern = '<%sd'%length
00829 start = end
00830 end += struct.calcsize(pattern)
00831 self.solution.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00832 start = end
00833 end += 4
00834 (self.error_code.val,) = _struct_i.unpack(str[start:end])
00835 return self
00836 except struct.error as e:
00837 raise genpy.DeserializationError(e)
00838
00839 _struct_I = genpy.struct_I
00840 _struct_i = struct.Struct("<i")
00841 _struct_3I = struct.Struct("<3I")
00842 class GetWeightedIK(object):
00843 _type = 'kdl_arm_kinematics/GetWeightedIK'
00844 _md5sum = 'ae963d0cab638b025249ba90e48a170c'
00845 _request_class = GetWeightedIKRequest
00846 _response_class = GetWeightedIKResponse