00001 """autogenerated by genmsg_py from GetStateCostRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006 import roslib.rostime
00007 import std_msgs.msg
00008 import motion_planning_msgs.msg
00009 import sensor_msgs.msg
00010
00011 class GetStateCostRequest(roslib.message.Message):
00012 _md5sum = "8eb8c1ec9dda8058aa5e5d82c1d8cda6"
00013 _type = "chomp_motion_planner/GetStateCostRequest"
00014 _has_header = False
00015 _full_text = """
00016
00017
00018 string[] link_names
00019
00020 motion_planning_msgs/RobotState robot_state
00021
00022 ================================================================================
00023 MSG: motion_planning_msgs/RobotState
00024 # This message contains information about the robot state, i.e. the positions of its joints and links
00025 sensor_msgs/JointState joint_state
00026 motion_planning_msgs/MultiDOFJointState multi_dof_joint_state
00027 ================================================================================
00028 MSG: sensor_msgs/JointState
00029 # This is a message that holds data to describe the state of a set of torque controlled joints.
00030 #
00031 # The state of each joint (revolute or prismatic) is defined by:
00032 # * the position of the joint (rad or m),
00033 # * the velocity of the joint (rad/s or m/s) and
00034 # * the effort that is applied in the joint (Nm or N).
00035 #
00036 # Each joint is uniquely identified by its name
00037 # The header specifies the time at which the joint states were recorded. All the joint states
00038 # in one message have to be recorded at the same time.
00039 #
00040 # This message consists of a multiple arrays, one for each part of the joint state.
00041 # The goal is to make each of the fields optional. When e.g. your joints have no
00042 # effort associated with them, you can leave the effort array empty.
00043 #
00044 # All arrays in this message should have the same size, or be empty.
00045 # This is the only way to uniquely associate the joint name with the correct
00046 # states.
00047
00048
00049 Header header
00050
00051 string[] name
00052 float64[] position
00053 float64[] velocity
00054 float64[] effort
00055
00056 ================================================================================
00057 MSG: std_msgs/Header
00058 # Standard metadata for higher-level stamped data types.
00059 # This is generally used to communicate timestamped data
00060 # in a particular coordinate frame.
00061 #
00062 # sequence ID: consecutively increasing ID
00063 uint32 seq
00064 #Two-integer timestamp that is expressed as:
00065 # * stamp.secs: seconds (stamp_secs) since epoch
00066 # * stamp.nsecs: nanoseconds since stamp_secs
00067 # time-handling sugar is provided by the client library
00068 time stamp
00069 #Frame this data is associated with
00070 # 0: no frame
00071 # 1: global frame
00072 string frame_id
00073
00074 ================================================================================
00075 MSG: motion_planning_msgs/MultiDOFJointState
00076 #A representation of a multi-dof joint state
00077 time stamp
00078 string[] joint_names
00079 string[] frame_ids
00080 string[] child_frame_ids
00081 geometry_msgs/Pose[] poses
00082
00083 ================================================================================
00084 MSG: geometry_msgs/Pose
00085 # A representation of pose in free space, composed of postion and orientation.
00086 Point position
00087 Quaternion orientation
00088
00089 ================================================================================
00090 MSG: geometry_msgs/Point
00091 # This contains the position of a point in free space
00092 float64 x
00093 float64 y
00094 float64 z
00095
00096 ================================================================================
00097 MSG: geometry_msgs/Quaternion
00098 # This represents an orientation in free space in quaternion form.
00099
00100 float64 x
00101 float64 y
00102 float64 z
00103 float64 w
00104
00105 """
00106 __slots__ = ['link_names','robot_state']
00107 _slot_types = ['string[]','motion_planning_msgs/RobotState']
00108
00109 def __init__(self, *args, **kwds):
00110 """
00111 Constructor. Any message fields that are implicitly/explicitly
00112 set to None will be assigned a default value. The recommend
00113 use is keyword arguments as this is more robust to future message
00114 changes. You cannot mix in-order arguments and keyword arguments.
00115
00116 The available fields are:
00117 link_names,robot_state
00118
00119 @param args: complete set of field values, in .msg order
00120 @param kwds: use keyword arguments corresponding to message field names
00121 to set specific fields.
00122 """
00123 if args or kwds:
00124 super(GetStateCostRequest, self).__init__(*args, **kwds)
00125
00126 if self.link_names is None:
00127 self.link_names = []
00128 if self.robot_state is None:
00129 self.robot_state = motion_planning_msgs.msg.RobotState()
00130 else:
00131 self.link_names = []
00132 self.robot_state = motion_planning_msgs.msg.RobotState()
00133
00134 def _get_types(self):
00135 """
00136 internal API method
00137 """
00138 return self._slot_types
00139
00140 def serialize(self, buff):
00141 """
00142 serialize message into buffer
00143 @param buff: buffer
00144 @type buff: StringIO
00145 """
00146 try:
00147 length = len(self.link_names)
00148 buff.write(_struct_I.pack(length))
00149 for val1 in self.link_names:
00150 length = len(val1)
00151 buff.write(struct.pack('<I%ss'%length, length, val1))
00152 _x = self
00153 buff.write(_struct_3I.pack(_x.robot_state.joint_state.header.seq, _x.robot_state.joint_state.header.stamp.secs, _x.robot_state.joint_state.header.stamp.nsecs))
00154 _x = self.robot_state.joint_state.header.frame_id
00155 length = len(_x)
00156 buff.write(struct.pack('<I%ss'%length, length, _x))
00157 length = len(self.robot_state.joint_state.name)
00158 buff.write(_struct_I.pack(length))
00159 for val1 in self.robot_state.joint_state.name:
00160 length = len(val1)
00161 buff.write(struct.pack('<I%ss'%length, length, val1))
00162 length = len(self.robot_state.joint_state.position)
00163 buff.write(_struct_I.pack(length))
00164 pattern = '<%sd'%length
00165 buff.write(struct.pack(pattern, *self.robot_state.joint_state.position))
00166 length = len(self.robot_state.joint_state.velocity)
00167 buff.write(_struct_I.pack(length))
00168 pattern = '<%sd'%length
00169 buff.write(struct.pack(pattern, *self.robot_state.joint_state.velocity))
00170 length = len(self.robot_state.joint_state.effort)
00171 buff.write(_struct_I.pack(length))
00172 pattern = '<%sd'%length
00173 buff.write(struct.pack(pattern, *self.robot_state.joint_state.effort))
00174 _x = self
00175 buff.write(_struct_2I.pack(_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs))
00176 length = len(self.robot_state.multi_dof_joint_state.joint_names)
00177 buff.write(_struct_I.pack(length))
00178 for val1 in self.robot_state.multi_dof_joint_state.joint_names:
00179 length = len(val1)
00180 buff.write(struct.pack('<I%ss'%length, length, val1))
00181 length = len(self.robot_state.multi_dof_joint_state.frame_ids)
00182 buff.write(_struct_I.pack(length))
00183 for val1 in self.robot_state.multi_dof_joint_state.frame_ids:
00184 length = len(val1)
00185 buff.write(struct.pack('<I%ss'%length, length, val1))
00186 length = len(self.robot_state.multi_dof_joint_state.child_frame_ids)
00187 buff.write(_struct_I.pack(length))
00188 for val1 in self.robot_state.multi_dof_joint_state.child_frame_ids:
00189 length = len(val1)
00190 buff.write(struct.pack('<I%ss'%length, length, val1))
00191 length = len(self.robot_state.multi_dof_joint_state.poses)
00192 buff.write(_struct_I.pack(length))
00193 for val1 in self.robot_state.multi_dof_joint_state.poses:
00194 _v1 = val1.position
00195 _x = _v1
00196 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00197 _v2 = val1.orientation
00198 _x = _v2
00199 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00200 except struct.error, se: self._check_types(se)
00201 except TypeError, te: self._check_types(te)
00202
00203 def deserialize(self, str):
00204 """
00205 unpack serialized message in str into this message instance
00206 @param str: byte array of serialized message
00207 @type str: str
00208 """
00209 try:
00210 if self.robot_state is None:
00211 self.robot_state = motion_planning_msgs.msg.RobotState()
00212 end = 0
00213 start = end
00214 end += 4
00215 (length,) = _struct_I.unpack(str[start:end])
00216 self.link_names = []
00217 for i in xrange(0, length):
00218 start = end
00219 end += 4
00220 (length,) = _struct_I.unpack(str[start:end])
00221 start = end
00222 end += length
00223 val1 = str[start:end]
00224 self.link_names.append(val1)
00225 _x = self
00226 start = end
00227 end += 12
00228 (_x.robot_state.joint_state.header.seq, _x.robot_state.joint_state.header.stamp.secs, _x.robot_state.joint_state.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 self.robot_state.joint_state.header.frame_id = str[start:end]
00235 start = end
00236 end += 4
00237 (length,) = _struct_I.unpack(str[start:end])
00238 self.robot_state.joint_state.name = []
00239 for i in xrange(0, length):
00240 start = end
00241 end += 4
00242 (length,) = _struct_I.unpack(str[start:end])
00243 start = end
00244 end += length
00245 val1 = str[start:end]
00246 self.robot_state.joint_state.name.append(val1)
00247 start = end
00248 end += 4
00249 (length,) = _struct_I.unpack(str[start:end])
00250 pattern = '<%sd'%length
00251 start = end
00252 end += struct.calcsize(pattern)
00253 self.robot_state.joint_state.position = struct.unpack(pattern, str[start:end])
00254 start = end
00255 end += 4
00256 (length,) = _struct_I.unpack(str[start:end])
00257 pattern = '<%sd'%length
00258 start = end
00259 end += struct.calcsize(pattern)
00260 self.robot_state.joint_state.velocity = struct.unpack(pattern, str[start:end])
00261 start = end
00262 end += 4
00263 (length,) = _struct_I.unpack(str[start:end])
00264 pattern = '<%sd'%length
00265 start = end
00266 end += struct.calcsize(pattern)
00267 self.robot_state.joint_state.effort = struct.unpack(pattern, str[start:end])
00268 _x = self
00269 start = end
00270 end += 8
00271 (_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00272 start = end
00273 end += 4
00274 (length,) = _struct_I.unpack(str[start:end])
00275 self.robot_state.multi_dof_joint_state.joint_names = []
00276 for i in xrange(0, length):
00277 start = end
00278 end += 4
00279 (length,) = _struct_I.unpack(str[start:end])
00280 start = end
00281 end += length
00282 val1 = str[start:end]
00283 self.robot_state.multi_dof_joint_state.joint_names.append(val1)
00284 start = end
00285 end += 4
00286 (length,) = _struct_I.unpack(str[start:end])
00287 self.robot_state.multi_dof_joint_state.frame_ids = []
00288 for i in xrange(0, length):
00289 start = end
00290 end += 4
00291 (length,) = _struct_I.unpack(str[start:end])
00292 start = end
00293 end += length
00294 val1 = str[start:end]
00295 self.robot_state.multi_dof_joint_state.frame_ids.append(val1)
00296 start = end
00297 end += 4
00298 (length,) = _struct_I.unpack(str[start:end])
00299 self.robot_state.multi_dof_joint_state.child_frame_ids = []
00300 for i in xrange(0, length):
00301 start = end
00302 end += 4
00303 (length,) = _struct_I.unpack(str[start:end])
00304 start = end
00305 end += length
00306 val1 = str[start:end]
00307 self.robot_state.multi_dof_joint_state.child_frame_ids.append(val1)
00308 start = end
00309 end += 4
00310 (length,) = _struct_I.unpack(str[start:end])
00311 self.robot_state.multi_dof_joint_state.poses = []
00312 for i in xrange(0, length):
00313 val1 = geometry_msgs.msg.Pose()
00314 _v3 = val1.position
00315 _x = _v3
00316 start = end
00317 end += 24
00318 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00319 _v4 = val1.orientation
00320 _x = _v4
00321 start = end
00322 end += 32
00323 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00324 self.robot_state.multi_dof_joint_state.poses.append(val1)
00325 return self
00326 except struct.error, e:
00327 raise roslib.message.DeserializationError(e)
00328
00329
00330 def serialize_numpy(self, buff, numpy):
00331 """
00332 serialize message with numpy array types into buffer
00333 @param buff: buffer
00334 @type buff: StringIO
00335 @param numpy: numpy python module
00336 @type numpy module
00337 """
00338 try:
00339 length = len(self.link_names)
00340 buff.write(_struct_I.pack(length))
00341 for val1 in self.link_names:
00342 length = len(val1)
00343 buff.write(struct.pack('<I%ss'%length, length, val1))
00344 _x = self
00345 buff.write(_struct_3I.pack(_x.robot_state.joint_state.header.seq, _x.robot_state.joint_state.header.stamp.secs, _x.robot_state.joint_state.header.stamp.nsecs))
00346 _x = self.robot_state.joint_state.header.frame_id
00347 length = len(_x)
00348 buff.write(struct.pack('<I%ss'%length, length, _x))
00349 length = len(self.robot_state.joint_state.name)
00350 buff.write(_struct_I.pack(length))
00351 for val1 in self.robot_state.joint_state.name:
00352 length = len(val1)
00353 buff.write(struct.pack('<I%ss'%length, length, val1))
00354 length = len(self.robot_state.joint_state.position)
00355 buff.write(_struct_I.pack(length))
00356 pattern = '<%sd'%length
00357 buff.write(self.robot_state.joint_state.position.tostring())
00358 length = len(self.robot_state.joint_state.velocity)
00359 buff.write(_struct_I.pack(length))
00360 pattern = '<%sd'%length
00361 buff.write(self.robot_state.joint_state.velocity.tostring())
00362 length = len(self.robot_state.joint_state.effort)
00363 buff.write(_struct_I.pack(length))
00364 pattern = '<%sd'%length
00365 buff.write(self.robot_state.joint_state.effort.tostring())
00366 _x = self
00367 buff.write(_struct_2I.pack(_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs))
00368 length = len(self.robot_state.multi_dof_joint_state.joint_names)
00369 buff.write(_struct_I.pack(length))
00370 for val1 in self.robot_state.multi_dof_joint_state.joint_names:
00371 length = len(val1)
00372 buff.write(struct.pack('<I%ss'%length, length, val1))
00373 length = len(self.robot_state.multi_dof_joint_state.frame_ids)
00374 buff.write(_struct_I.pack(length))
00375 for val1 in self.robot_state.multi_dof_joint_state.frame_ids:
00376 length = len(val1)
00377 buff.write(struct.pack('<I%ss'%length, length, val1))
00378 length = len(self.robot_state.multi_dof_joint_state.child_frame_ids)
00379 buff.write(_struct_I.pack(length))
00380 for val1 in self.robot_state.multi_dof_joint_state.child_frame_ids:
00381 length = len(val1)
00382 buff.write(struct.pack('<I%ss'%length, length, val1))
00383 length = len(self.robot_state.multi_dof_joint_state.poses)
00384 buff.write(_struct_I.pack(length))
00385 for val1 in self.robot_state.multi_dof_joint_state.poses:
00386 _v5 = val1.position
00387 _x = _v5
00388 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00389 _v6 = val1.orientation
00390 _x = _v6
00391 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00392 except struct.error, se: self._check_types(se)
00393 except TypeError, te: self._check_types(te)
00394
00395 def deserialize_numpy(self, str, numpy):
00396 """
00397 unpack serialized message in str into this message instance using numpy for array types
00398 @param str: byte array of serialized message
00399 @type str: str
00400 @param numpy: numpy python module
00401 @type numpy: module
00402 """
00403 try:
00404 if self.robot_state is None:
00405 self.robot_state = motion_planning_msgs.msg.RobotState()
00406 end = 0
00407 start = end
00408 end += 4
00409 (length,) = _struct_I.unpack(str[start:end])
00410 self.link_names = []
00411 for i in xrange(0, length):
00412 start = end
00413 end += 4
00414 (length,) = _struct_I.unpack(str[start:end])
00415 start = end
00416 end += length
00417 val1 = str[start:end]
00418 self.link_names.append(val1)
00419 _x = self
00420 start = end
00421 end += 12
00422 (_x.robot_state.joint_state.header.seq, _x.robot_state.joint_state.header.stamp.secs, _x.robot_state.joint_state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00423 start = end
00424 end += 4
00425 (length,) = _struct_I.unpack(str[start:end])
00426 start = end
00427 end += length
00428 self.robot_state.joint_state.header.frame_id = str[start:end]
00429 start = end
00430 end += 4
00431 (length,) = _struct_I.unpack(str[start:end])
00432 self.robot_state.joint_state.name = []
00433 for i in xrange(0, length):
00434 start = end
00435 end += 4
00436 (length,) = _struct_I.unpack(str[start:end])
00437 start = end
00438 end += length
00439 val1 = str[start:end]
00440 self.robot_state.joint_state.name.append(val1)
00441 start = end
00442 end += 4
00443 (length,) = _struct_I.unpack(str[start:end])
00444 pattern = '<%sd'%length
00445 start = end
00446 end += struct.calcsize(pattern)
00447 self.robot_state.joint_state.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00448 start = end
00449 end += 4
00450 (length,) = _struct_I.unpack(str[start:end])
00451 pattern = '<%sd'%length
00452 start = end
00453 end += struct.calcsize(pattern)
00454 self.robot_state.joint_state.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00455 start = end
00456 end += 4
00457 (length,) = _struct_I.unpack(str[start:end])
00458 pattern = '<%sd'%length
00459 start = end
00460 end += struct.calcsize(pattern)
00461 self.robot_state.joint_state.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00462 _x = self
00463 start = end
00464 end += 8
00465 (_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00466 start = end
00467 end += 4
00468 (length,) = _struct_I.unpack(str[start:end])
00469 self.robot_state.multi_dof_joint_state.joint_names = []
00470 for i in xrange(0, length):
00471 start = end
00472 end += 4
00473 (length,) = _struct_I.unpack(str[start:end])
00474 start = end
00475 end += length
00476 val1 = str[start:end]
00477 self.robot_state.multi_dof_joint_state.joint_names.append(val1)
00478 start = end
00479 end += 4
00480 (length,) = _struct_I.unpack(str[start:end])
00481 self.robot_state.multi_dof_joint_state.frame_ids = []
00482 for i in xrange(0, length):
00483 start = end
00484 end += 4
00485 (length,) = _struct_I.unpack(str[start:end])
00486 start = end
00487 end += length
00488 val1 = str[start:end]
00489 self.robot_state.multi_dof_joint_state.frame_ids.append(val1)
00490 start = end
00491 end += 4
00492 (length,) = _struct_I.unpack(str[start:end])
00493 self.robot_state.multi_dof_joint_state.child_frame_ids = []
00494 for i in xrange(0, length):
00495 start = end
00496 end += 4
00497 (length,) = _struct_I.unpack(str[start:end])
00498 start = end
00499 end += length
00500 val1 = str[start:end]
00501 self.robot_state.multi_dof_joint_state.child_frame_ids.append(val1)
00502 start = end
00503 end += 4
00504 (length,) = _struct_I.unpack(str[start:end])
00505 self.robot_state.multi_dof_joint_state.poses = []
00506 for i in xrange(0, length):
00507 val1 = geometry_msgs.msg.Pose()
00508 _v7 = val1.position
00509 _x = _v7
00510 start = end
00511 end += 24
00512 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00513 _v8 = val1.orientation
00514 _x = _v8
00515 start = end
00516 end += 32
00517 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00518 self.robot_state.multi_dof_joint_state.poses.append(val1)
00519 return self
00520 except struct.error, e:
00521 raise roslib.message.DeserializationError(e)
00522
00523 _struct_I = roslib.message.struct_I
00524 _struct_4d = struct.Struct("<4d")
00525 _struct_3I = struct.Struct("<3I")
00526 _struct_2I = struct.Struct("<2I")
00527 _struct_3d = struct.Struct("<3d")
00528 """autogenerated by genmsg_py from GetStateCostResponse.msg. Do not edit."""
00529 import roslib.message
00530 import struct
00531
00532
00533 class GetStateCostResponse(roslib.message.Message):
00534 _md5sum = "125a150f1be009a543837c8732501336"
00535 _type = "chomp_motion_planner/GetStateCostResponse"
00536 _has_header = False
00537 _full_text = """
00538 bool valid
00539
00540 float64[] costs
00541
00542
00543 """
00544 __slots__ = ['valid','costs']
00545 _slot_types = ['bool','float64[]']
00546
00547 def __init__(self, *args, **kwds):
00548 """
00549 Constructor. Any message fields that are implicitly/explicitly
00550 set to None will be assigned a default value. The recommend
00551 use is keyword arguments as this is more robust to future message
00552 changes. You cannot mix in-order arguments and keyword arguments.
00553
00554 The available fields are:
00555 valid,costs
00556
00557 @param args: complete set of field values, in .msg order
00558 @param kwds: use keyword arguments corresponding to message field names
00559 to set specific fields.
00560 """
00561 if args or kwds:
00562 super(GetStateCostResponse, self).__init__(*args, **kwds)
00563
00564 if self.valid is None:
00565 self.valid = False
00566 if self.costs is None:
00567 self.costs = []
00568 else:
00569 self.valid = False
00570 self.costs = []
00571
00572 def _get_types(self):
00573 """
00574 internal API method
00575 """
00576 return self._slot_types
00577
00578 def serialize(self, buff):
00579 """
00580 serialize message into buffer
00581 @param buff: buffer
00582 @type buff: StringIO
00583 """
00584 try:
00585 buff.write(_struct_B.pack(self.valid))
00586 length = len(self.costs)
00587 buff.write(_struct_I.pack(length))
00588 pattern = '<%sd'%length
00589 buff.write(struct.pack(pattern, *self.costs))
00590 except struct.error, se: self._check_types(se)
00591 except TypeError, te: self._check_types(te)
00592
00593 def deserialize(self, str):
00594 """
00595 unpack serialized message in str into this message instance
00596 @param str: byte array of serialized message
00597 @type str: str
00598 """
00599 try:
00600 end = 0
00601 start = end
00602 end += 1
00603 (self.valid,) = _struct_B.unpack(str[start:end])
00604 self.valid = bool(self.valid)
00605 start = end
00606 end += 4
00607 (length,) = _struct_I.unpack(str[start:end])
00608 pattern = '<%sd'%length
00609 start = end
00610 end += struct.calcsize(pattern)
00611 self.costs = struct.unpack(pattern, str[start:end])
00612 return self
00613 except struct.error, e:
00614 raise roslib.message.DeserializationError(e)
00615
00616
00617 def serialize_numpy(self, buff, numpy):
00618 """
00619 serialize message with numpy array types into buffer
00620 @param buff: buffer
00621 @type buff: StringIO
00622 @param numpy: numpy python module
00623 @type numpy module
00624 """
00625 try:
00626 buff.write(_struct_B.pack(self.valid))
00627 length = len(self.costs)
00628 buff.write(_struct_I.pack(length))
00629 pattern = '<%sd'%length
00630 buff.write(self.costs.tostring())
00631 except struct.error, se: self._check_types(se)
00632 except TypeError, te: self._check_types(te)
00633
00634 def deserialize_numpy(self, str, numpy):
00635 """
00636 unpack serialized message in str into this message instance using numpy for array types
00637 @param str: byte array of serialized message
00638 @type str: str
00639 @param numpy: numpy python module
00640 @type numpy: module
00641 """
00642 try:
00643 end = 0
00644 start = end
00645 end += 1
00646 (self.valid,) = _struct_B.unpack(str[start:end])
00647 self.valid = bool(self.valid)
00648 start = end
00649 end += 4
00650 (length,) = _struct_I.unpack(str[start:end])
00651 pattern = '<%sd'%length
00652 start = end
00653 end += struct.calcsize(pattern)
00654 self.costs = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00655 return self
00656 except struct.error, e:
00657 raise roslib.message.DeserializationError(e)
00658
00659 _struct_I = roslib.message.struct_I
00660 _struct_B = struct.Struct("<B")
00661 class GetStateCost(roslib.message.ServiceDefinition):
00662 _type = 'chomp_motion_planner/GetStateCost'
00663 _md5sum = 'e5ac7b8628485266624f522d76c812fd'
00664 _request_class = GetStateCostRequest
00665 _response_class = GetStateCostResponse