00001 """autogenerated by genpy from arm_navigation_msgs/FilterJointTrajectoryRequest.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 trajectory_msgs.msg
00008 import arm_navigation_msgs.msg
00009 import geometry_msgs.msg
00010 import sensor_msgs.msg
00011 import genpy
00012 import std_msgs.msg
00013
00014 class FilterJointTrajectoryRequest(genpy.Message):
00015 _md5sum = "ab323cbf1c60ab841b012481156f47ba"
00016 _type = "arm_navigation_msgs/FilterJointTrajectoryRequest"
00017 _has_header = False
00018 _full_text = """
00019 trajectory_msgs/JointTrajectory trajectory
00020
00021
00022
00023
00024 arm_navigation_msgs/RobotState start_state
00025
00026
00027
00028
00029 arm_navigation_msgs/JointLimits[] limits
00030
00031
00032 duration allowed_time
00033
00034 ================================================================================
00035 MSG: trajectory_msgs/JointTrajectory
00036 Header header
00037 string[] joint_names
00038 JointTrajectoryPoint[] points
00039 ================================================================================
00040 MSG: std_msgs/Header
00041 # Standard metadata for higher-level stamped data types.
00042 # This is generally used to communicate timestamped data
00043 # in a particular coordinate frame.
00044 #
00045 # sequence ID: consecutively increasing ID
00046 uint32 seq
00047 #Two-integer timestamp that is expressed as:
00048 # * stamp.secs: seconds (stamp_secs) since epoch
00049 # * stamp.nsecs: nanoseconds since stamp_secs
00050 # time-handling sugar is provided by the client library
00051 time stamp
00052 #Frame this data is associated with
00053 # 0: no frame
00054 # 1: global frame
00055 string frame_id
00056
00057 ================================================================================
00058 MSG: trajectory_msgs/JointTrajectoryPoint
00059 float64[] positions
00060 float64[] velocities
00061 float64[] accelerations
00062 duration time_from_start
00063 ================================================================================
00064 MSG: arm_navigation_msgs/RobotState
00065 # This message contains information about the robot state, i.e. the positions of its joints and links
00066 sensor_msgs/JointState joint_state
00067 arm_navigation_msgs/MultiDOFJointState multi_dof_joint_state
00068
00069 ================================================================================
00070 MSG: sensor_msgs/JointState
00071 # This is a message that holds data to describe the state of a set of torque controlled joints.
00072 #
00073 # The state of each joint (revolute or prismatic) is defined by:
00074 # * the position of the joint (rad or m),
00075 # * the velocity of the joint (rad/s or m/s) and
00076 # * the effort that is applied in the joint (Nm or N).
00077 #
00078 # Each joint is uniquely identified by its name
00079 # The header specifies the time at which the joint states were recorded. All the joint states
00080 # in one message have to be recorded at the same time.
00081 #
00082 # This message consists of a multiple arrays, one for each part of the joint state.
00083 # The goal is to make each of the fields optional. When e.g. your joints have no
00084 # effort associated with them, you can leave the effort array empty.
00085 #
00086 # All arrays in this message should have the same size, or be empty.
00087 # This is the only way to uniquely associate the joint name with the correct
00088 # states.
00089
00090
00091 Header header
00092
00093 string[] name
00094 float64[] position
00095 float64[] velocity
00096 float64[] effort
00097
00098 ================================================================================
00099 MSG: arm_navigation_msgs/MultiDOFJointState
00100 #A representation of a multi-dof joint state
00101 time stamp
00102 string[] joint_names
00103 string[] frame_ids
00104 string[] child_frame_ids
00105 geometry_msgs/Pose[] poses
00106
00107 ================================================================================
00108 MSG: geometry_msgs/Pose
00109 # A representation of pose in free space, composed of postion and orientation.
00110 Point position
00111 Quaternion orientation
00112
00113 ================================================================================
00114 MSG: geometry_msgs/Point
00115 # This contains the position of a point in free space
00116 float64 x
00117 float64 y
00118 float64 z
00119
00120 ================================================================================
00121 MSG: geometry_msgs/Quaternion
00122 # This represents an orientation in free space in quaternion form.
00123
00124 float64 x
00125 float64 y
00126 float64 z
00127 float64 w
00128
00129 ================================================================================
00130 MSG: arm_navigation_msgs/JointLimits
00131 # This message contains information about limits of a particular joint (or control dimension)
00132 string joint_name
00133
00134 # true if the joint has position limits
00135 bool has_position_limits
00136
00137 # min and max position limits
00138 float64 min_position
00139 float64 max_position
00140
00141 # true if joint has velocity limits
00142 bool has_velocity_limits
00143
00144 # max velocity limit
00145 float64 max_velocity
00146 # min_velocity is assumed to be -max_velocity
00147
00148 # true if joint has acceleration limits
00149 bool has_acceleration_limits
00150 # max acceleration limit
00151 float64 max_acceleration
00152 # min_acceleration is assumed to be -max_acceleration
00153
00154 """
00155 __slots__ = ['trajectory','start_state','limits','allowed_time']
00156 _slot_types = ['trajectory_msgs/JointTrajectory','arm_navigation_msgs/RobotState','arm_navigation_msgs/JointLimits[]','duration']
00157
00158 def __init__(self, *args, **kwds):
00159 """
00160 Constructor. Any message fields that are implicitly/explicitly
00161 set to None will be assigned a default value. The recommend
00162 use is keyword arguments as this is more robust to future message
00163 changes. You cannot mix in-order arguments and keyword arguments.
00164
00165 The available fields are:
00166 trajectory,start_state,limits,allowed_time
00167
00168 :param args: complete set of field values, in .msg order
00169 :param kwds: use keyword arguments corresponding to message field names
00170 to set specific fields.
00171 """
00172 if args or kwds:
00173 super(FilterJointTrajectoryRequest, self).__init__(*args, **kwds)
00174
00175 if self.trajectory is None:
00176 self.trajectory = trajectory_msgs.msg.JointTrajectory()
00177 if self.start_state is None:
00178 self.start_state = arm_navigation_msgs.msg.RobotState()
00179 if self.limits is None:
00180 self.limits = []
00181 if self.allowed_time is None:
00182 self.allowed_time = genpy.Duration()
00183 else:
00184 self.trajectory = trajectory_msgs.msg.JointTrajectory()
00185 self.start_state = arm_navigation_msgs.msg.RobotState()
00186 self.limits = []
00187 self.allowed_time = genpy.Duration()
00188
00189 def _get_types(self):
00190 """
00191 internal API method
00192 """
00193 return self._slot_types
00194
00195 def serialize(self, buff):
00196 """
00197 serialize message into buffer
00198 :param buff: buffer, ``StringIO``
00199 """
00200 try:
00201 _x = self
00202 buff.write(_struct_3I.pack(_x.trajectory.header.seq, _x.trajectory.header.stamp.secs, _x.trajectory.header.stamp.nsecs))
00203 _x = self.trajectory.header.frame_id
00204 length = len(_x)
00205 if python3 or type(_x) == unicode:
00206 _x = _x.encode('utf-8')
00207 length = len(_x)
00208 buff.write(struct.pack('<I%ss'%length, length, _x))
00209 length = len(self.trajectory.joint_names)
00210 buff.write(_struct_I.pack(length))
00211 for val1 in self.trajectory.joint_names:
00212 length = len(val1)
00213 if python3 or type(val1) == unicode:
00214 val1 = val1.encode('utf-8')
00215 length = len(val1)
00216 buff.write(struct.pack('<I%ss'%length, length, val1))
00217 length = len(self.trajectory.points)
00218 buff.write(_struct_I.pack(length))
00219 for val1 in self.trajectory.points:
00220 length = len(val1.positions)
00221 buff.write(_struct_I.pack(length))
00222 pattern = '<%sd'%length
00223 buff.write(struct.pack(pattern, *val1.positions))
00224 length = len(val1.velocities)
00225 buff.write(_struct_I.pack(length))
00226 pattern = '<%sd'%length
00227 buff.write(struct.pack(pattern, *val1.velocities))
00228 length = len(val1.accelerations)
00229 buff.write(_struct_I.pack(length))
00230 pattern = '<%sd'%length
00231 buff.write(struct.pack(pattern, *val1.accelerations))
00232 _v1 = val1.time_from_start
00233 _x = _v1
00234 buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00235 _x = self
00236 buff.write(_struct_3I.pack(_x.start_state.joint_state.header.seq, _x.start_state.joint_state.header.stamp.secs, _x.start_state.joint_state.header.stamp.nsecs))
00237 _x = self.start_state.joint_state.header.frame_id
00238 length = len(_x)
00239 if python3 or type(_x) == unicode:
00240 _x = _x.encode('utf-8')
00241 length = len(_x)
00242 buff.write(struct.pack('<I%ss'%length, length, _x))
00243 length = len(self.start_state.joint_state.name)
00244 buff.write(_struct_I.pack(length))
00245 for val1 in self.start_state.joint_state.name:
00246 length = len(val1)
00247 if python3 or type(val1) == unicode:
00248 val1 = val1.encode('utf-8')
00249 length = len(val1)
00250 buff.write(struct.pack('<I%ss'%length, length, val1))
00251 length = len(self.start_state.joint_state.position)
00252 buff.write(_struct_I.pack(length))
00253 pattern = '<%sd'%length
00254 buff.write(struct.pack(pattern, *self.start_state.joint_state.position))
00255 length = len(self.start_state.joint_state.velocity)
00256 buff.write(_struct_I.pack(length))
00257 pattern = '<%sd'%length
00258 buff.write(struct.pack(pattern, *self.start_state.joint_state.velocity))
00259 length = len(self.start_state.joint_state.effort)
00260 buff.write(_struct_I.pack(length))
00261 pattern = '<%sd'%length
00262 buff.write(struct.pack(pattern, *self.start_state.joint_state.effort))
00263 _x = self
00264 buff.write(_struct_2I.pack(_x.start_state.multi_dof_joint_state.stamp.secs, _x.start_state.multi_dof_joint_state.stamp.nsecs))
00265 length = len(self.start_state.multi_dof_joint_state.joint_names)
00266 buff.write(_struct_I.pack(length))
00267 for val1 in self.start_state.multi_dof_joint_state.joint_names:
00268 length = len(val1)
00269 if python3 or type(val1) == unicode:
00270 val1 = val1.encode('utf-8')
00271 length = len(val1)
00272 buff.write(struct.pack('<I%ss'%length, length, val1))
00273 length = len(self.start_state.multi_dof_joint_state.frame_ids)
00274 buff.write(_struct_I.pack(length))
00275 for val1 in self.start_state.multi_dof_joint_state.frame_ids:
00276 length = len(val1)
00277 if python3 or type(val1) == unicode:
00278 val1 = val1.encode('utf-8')
00279 length = len(val1)
00280 buff.write(struct.pack('<I%ss'%length, length, val1))
00281 length = len(self.start_state.multi_dof_joint_state.child_frame_ids)
00282 buff.write(_struct_I.pack(length))
00283 for val1 in self.start_state.multi_dof_joint_state.child_frame_ids:
00284 length = len(val1)
00285 if python3 or type(val1) == unicode:
00286 val1 = val1.encode('utf-8')
00287 length = len(val1)
00288 buff.write(struct.pack('<I%ss'%length, length, val1))
00289 length = len(self.start_state.multi_dof_joint_state.poses)
00290 buff.write(_struct_I.pack(length))
00291 for val1 in self.start_state.multi_dof_joint_state.poses:
00292 _v2 = val1.position
00293 _x = _v2
00294 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00295 _v3 = val1.orientation
00296 _x = _v3
00297 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00298 length = len(self.limits)
00299 buff.write(_struct_I.pack(length))
00300 for val1 in self.limits:
00301 _x = val1.joint_name
00302 length = len(_x)
00303 if python3 or type(_x) == unicode:
00304 _x = _x.encode('utf-8')
00305 length = len(_x)
00306 buff.write(struct.pack('<I%ss'%length, length, _x))
00307 _x = val1
00308 buff.write(_struct_B2dBdBd.pack(_x.has_position_limits, _x.min_position, _x.max_position, _x.has_velocity_limits, _x.max_velocity, _x.has_acceleration_limits, _x.max_acceleration))
00309 _x = self
00310 buff.write(_struct_2i.pack(_x.allowed_time.secs, _x.allowed_time.nsecs))
00311 except struct.error as se: self._check_types(se)
00312 except TypeError as te: self._check_types(te)
00313
00314 def deserialize(self, str):
00315 """
00316 unpack serialized message in str into this message instance
00317 :param str: byte array of serialized message, ``str``
00318 """
00319 try:
00320 if self.trajectory is None:
00321 self.trajectory = trajectory_msgs.msg.JointTrajectory()
00322 if self.start_state is None:
00323 self.start_state = arm_navigation_msgs.msg.RobotState()
00324 if self.limits is None:
00325 self.limits = None
00326 if self.allowed_time is None:
00327 self.allowed_time = genpy.Duration()
00328 end = 0
00329 _x = self
00330 start = end
00331 end += 12
00332 (_x.trajectory.header.seq, _x.trajectory.header.stamp.secs, _x.trajectory.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00333 start = end
00334 end += 4
00335 (length,) = _struct_I.unpack(str[start:end])
00336 start = end
00337 end += length
00338 if python3:
00339 self.trajectory.header.frame_id = str[start:end].decode('utf-8')
00340 else:
00341 self.trajectory.header.frame_id = str[start:end]
00342 start = end
00343 end += 4
00344 (length,) = _struct_I.unpack(str[start:end])
00345 self.trajectory.joint_names = []
00346 for i in range(0, length):
00347 start = end
00348 end += 4
00349 (length,) = _struct_I.unpack(str[start:end])
00350 start = end
00351 end += length
00352 if python3:
00353 val1 = str[start:end].decode('utf-8')
00354 else:
00355 val1 = str[start:end]
00356 self.trajectory.joint_names.append(val1)
00357 start = end
00358 end += 4
00359 (length,) = _struct_I.unpack(str[start:end])
00360 self.trajectory.points = []
00361 for i in range(0, length):
00362 val1 = trajectory_msgs.msg.JointTrajectoryPoint()
00363 start = end
00364 end += 4
00365 (length,) = _struct_I.unpack(str[start:end])
00366 pattern = '<%sd'%length
00367 start = end
00368 end += struct.calcsize(pattern)
00369 val1.positions = struct.unpack(pattern, str[start:end])
00370 start = end
00371 end += 4
00372 (length,) = _struct_I.unpack(str[start:end])
00373 pattern = '<%sd'%length
00374 start = end
00375 end += struct.calcsize(pattern)
00376 val1.velocities = struct.unpack(pattern, str[start:end])
00377 start = end
00378 end += 4
00379 (length,) = _struct_I.unpack(str[start:end])
00380 pattern = '<%sd'%length
00381 start = end
00382 end += struct.calcsize(pattern)
00383 val1.accelerations = struct.unpack(pattern, str[start:end])
00384 _v4 = val1.time_from_start
00385 _x = _v4
00386 start = end
00387 end += 8
00388 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00389 self.trajectory.points.append(val1)
00390 _x = self
00391 start = end
00392 end += 12
00393 (_x.start_state.joint_state.header.seq, _x.start_state.joint_state.header.stamp.secs, _x.start_state.joint_state.header.stamp.nsecs,) = _struct_3I.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.start_state.joint_state.header.frame_id = str[start:end].decode('utf-8')
00401 else:
00402 self.start_state.joint_state.header.frame_id = str[start:end]
00403 start = end
00404 end += 4
00405 (length,) = _struct_I.unpack(str[start:end])
00406 self.start_state.joint_state.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.start_state.joint_state.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.start_state.joint_state.position = struct.unpack(pattern, str[start:end])
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.start_state.joint_state.velocity = struct.unpack(pattern, str[start:end])
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.start_state.joint_state.effort = struct.unpack(pattern, str[start:end])
00439 _x = self
00440 start = end
00441 end += 8
00442 (_x.start_state.multi_dof_joint_state.stamp.secs, _x.start_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00443 start = end
00444 end += 4
00445 (length,) = _struct_I.unpack(str[start:end])
00446 self.start_state.multi_dof_joint_state.joint_names = []
00447 for i in range(0, length):
00448 start = end
00449 end += 4
00450 (length,) = _struct_I.unpack(str[start:end])
00451 start = end
00452 end += length
00453 if python3:
00454 val1 = str[start:end].decode('utf-8')
00455 else:
00456 val1 = str[start:end]
00457 self.start_state.multi_dof_joint_state.joint_names.append(val1)
00458 start = end
00459 end += 4
00460 (length,) = _struct_I.unpack(str[start:end])
00461 self.start_state.multi_dof_joint_state.frame_ids = []
00462 for i in range(0, length):
00463 start = end
00464 end += 4
00465 (length,) = _struct_I.unpack(str[start:end])
00466 start = end
00467 end += length
00468 if python3:
00469 val1 = str[start:end].decode('utf-8')
00470 else:
00471 val1 = str[start:end]
00472 self.start_state.multi_dof_joint_state.frame_ids.append(val1)
00473 start = end
00474 end += 4
00475 (length,) = _struct_I.unpack(str[start:end])
00476 self.start_state.multi_dof_joint_state.child_frame_ids = []
00477 for i in range(0, length):
00478 start = end
00479 end += 4
00480 (length,) = _struct_I.unpack(str[start:end])
00481 start = end
00482 end += length
00483 if python3:
00484 val1 = str[start:end].decode('utf-8')
00485 else:
00486 val1 = str[start:end]
00487 self.start_state.multi_dof_joint_state.child_frame_ids.append(val1)
00488 start = end
00489 end += 4
00490 (length,) = _struct_I.unpack(str[start:end])
00491 self.start_state.multi_dof_joint_state.poses = []
00492 for i in range(0, length):
00493 val1 = geometry_msgs.msg.Pose()
00494 _v5 = val1.position
00495 _x = _v5
00496 start = end
00497 end += 24
00498 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00499 _v6 = val1.orientation
00500 _x = _v6
00501 start = end
00502 end += 32
00503 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00504 self.start_state.multi_dof_joint_state.poses.append(val1)
00505 start = end
00506 end += 4
00507 (length,) = _struct_I.unpack(str[start:end])
00508 self.limits = []
00509 for i in range(0, length):
00510 val1 = arm_navigation_msgs.msg.JointLimits()
00511 start = end
00512 end += 4
00513 (length,) = _struct_I.unpack(str[start:end])
00514 start = end
00515 end += length
00516 if python3:
00517 val1.joint_name = str[start:end].decode('utf-8')
00518 else:
00519 val1.joint_name = str[start:end]
00520 _x = val1
00521 start = end
00522 end += 35
00523 (_x.has_position_limits, _x.min_position, _x.max_position, _x.has_velocity_limits, _x.max_velocity, _x.has_acceleration_limits, _x.max_acceleration,) = _struct_B2dBdBd.unpack(str[start:end])
00524 val1.has_position_limits = bool(val1.has_position_limits)
00525 val1.has_velocity_limits = bool(val1.has_velocity_limits)
00526 val1.has_acceleration_limits = bool(val1.has_acceleration_limits)
00527 self.limits.append(val1)
00528 _x = self
00529 start = end
00530 end += 8
00531 (_x.allowed_time.secs, _x.allowed_time.nsecs,) = _struct_2i.unpack(str[start:end])
00532 self.allowed_time.canon()
00533 return self
00534 except struct.error as e:
00535 raise genpy.DeserializationError(e)
00536
00537
00538 def serialize_numpy(self, buff, numpy):
00539 """
00540 serialize message with numpy array types into buffer
00541 :param buff: buffer, ``StringIO``
00542 :param numpy: numpy python module
00543 """
00544 try:
00545 _x = self
00546 buff.write(_struct_3I.pack(_x.trajectory.header.seq, _x.trajectory.header.stamp.secs, _x.trajectory.header.stamp.nsecs))
00547 _x = self.trajectory.header.frame_id
00548 length = len(_x)
00549 if python3 or type(_x) == unicode:
00550 _x = _x.encode('utf-8')
00551 length = len(_x)
00552 buff.write(struct.pack('<I%ss'%length, length, _x))
00553 length = len(self.trajectory.joint_names)
00554 buff.write(_struct_I.pack(length))
00555 for val1 in self.trajectory.joint_names:
00556 length = len(val1)
00557 if python3 or type(val1) == unicode:
00558 val1 = val1.encode('utf-8')
00559 length = len(val1)
00560 buff.write(struct.pack('<I%ss'%length, length, val1))
00561 length = len(self.trajectory.points)
00562 buff.write(_struct_I.pack(length))
00563 for val1 in self.trajectory.points:
00564 length = len(val1.positions)
00565 buff.write(_struct_I.pack(length))
00566 pattern = '<%sd'%length
00567 buff.write(val1.positions.tostring())
00568 length = len(val1.velocities)
00569 buff.write(_struct_I.pack(length))
00570 pattern = '<%sd'%length
00571 buff.write(val1.velocities.tostring())
00572 length = len(val1.accelerations)
00573 buff.write(_struct_I.pack(length))
00574 pattern = '<%sd'%length
00575 buff.write(val1.accelerations.tostring())
00576 _v7 = val1.time_from_start
00577 _x = _v7
00578 buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00579 _x = self
00580 buff.write(_struct_3I.pack(_x.start_state.joint_state.header.seq, _x.start_state.joint_state.header.stamp.secs, _x.start_state.joint_state.header.stamp.nsecs))
00581 _x = self.start_state.joint_state.header.frame_id
00582 length = len(_x)
00583 if python3 or type(_x) == unicode:
00584 _x = _x.encode('utf-8')
00585 length = len(_x)
00586 buff.write(struct.pack('<I%ss'%length, length, _x))
00587 length = len(self.start_state.joint_state.name)
00588 buff.write(_struct_I.pack(length))
00589 for val1 in self.start_state.joint_state.name:
00590 length = len(val1)
00591 if python3 or type(val1) == unicode:
00592 val1 = val1.encode('utf-8')
00593 length = len(val1)
00594 buff.write(struct.pack('<I%ss'%length, length, val1))
00595 length = len(self.start_state.joint_state.position)
00596 buff.write(_struct_I.pack(length))
00597 pattern = '<%sd'%length
00598 buff.write(self.start_state.joint_state.position.tostring())
00599 length = len(self.start_state.joint_state.velocity)
00600 buff.write(_struct_I.pack(length))
00601 pattern = '<%sd'%length
00602 buff.write(self.start_state.joint_state.velocity.tostring())
00603 length = len(self.start_state.joint_state.effort)
00604 buff.write(_struct_I.pack(length))
00605 pattern = '<%sd'%length
00606 buff.write(self.start_state.joint_state.effort.tostring())
00607 _x = self
00608 buff.write(_struct_2I.pack(_x.start_state.multi_dof_joint_state.stamp.secs, _x.start_state.multi_dof_joint_state.stamp.nsecs))
00609 length = len(self.start_state.multi_dof_joint_state.joint_names)
00610 buff.write(_struct_I.pack(length))
00611 for val1 in self.start_state.multi_dof_joint_state.joint_names:
00612 length = len(val1)
00613 if python3 or type(val1) == unicode:
00614 val1 = val1.encode('utf-8')
00615 length = len(val1)
00616 buff.write(struct.pack('<I%ss'%length, length, val1))
00617 length = len(self.start_state.multi_dof_joint_state.frame_ids)
00618 buff.write(_struct_I.pack(length))
00619 for val1 in self.start_state.multi_dof_joint_state.frame_ids:
00620 length = len(val1)
00621 if python3 or type(val1) == unicode:
00622 val1 = val1.encode('utf-8')
00623 length = len(val1)
00624 buff.write(struct.pack('<I%ss'%length, length, val1))
00625 length = len(self.start_state.multi_dof_joint_state.child_frame_ids)
00626 buff.write(_struct_I.pack(length))
00627 for val1 in self.start_state.multi_dof_joint_state.child_frame_ids:
00628 length = len(val1)
00629 if python3 or type(val1) == unicode:
00630 val1 = val1.encode('utf-8')
00631 length = len(val1)
00632 buff.write(struct.pack('<I%ss'%length, length, val1))
00633 length = len(self.start_state.multi_dof_joint_state.poses)
00634 buff.write(_struct_I.pack(length))
00635 for val1 in self.start_state.multi_dof_joint_state.poses:
00636 _v8 = val1.position
00637 _x = _v8
00638 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00639 _v9 = val1.orientation
00640 _x = _v9
00641 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00642 length = len(self.limits)
00643 buff.write(_struct_I.pack(length))
00644 for val1 in self.limits:
00645 _x = val1.joint_name
00646 length = len(_x)
00647 if python3 or type(_x) == unicode:
00648 _x = _x.encode('utf-8')
00649 length = len(_x)
00650 buff.write(struct.pack('<I%ss'%length, length, _x))
00651 _x = val1
00652 buff.write(_struct_B2dBdBd.pack(_x.has_position_limits, _x.min_position, _x.max_position, _x.has_velocity_limits, _x.max_velocity, _x.has_acceleration_limits, _x.max_acceleration))
00653 _x = self
00654 buff.write(_struct_2i.pack(_x.allowed_time.secs, _x.allowed_time.nsecs))
00655 except struct.error as se: self._check_types(se)
00656 except TypeError as te: self._check_types(te)
00657
00658 def deserialize_numpy(self, str, numpy):
00659 """
00660 unpack serialized message in str into this message instance using numpy for array types
00661 :param str: byte array of serialized message, ``str``
00662 :param numpy: numpy python module
00663 """
00664 try:
00665 if self.trajectory is None:
00666 self.trajectory = trajectory_msgs.msg.JointTrajectory()
00667 if self.start_state is None:
00668 self.start_state = arm_navigation_msgs.msg.RobotState()
00669 if self.limits is None:
00670 self.limits = None
00671 if self.allowed_time is None:
00672 self.allowed_time = genpy.Duration()
00673 end = 0
00674 _x = self
00675 start = end
00676 end += 12
00677 (_x.trajectory.header.seq, _x.trajectory.header.stamp.secs, _x.trajectory.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00678 start = end
00679 end += 4
00680 (length,) = _struct_I.unpack(str[start:end])
00681 start = end
00682 end += length
00683 if python3:
00684 self.trajectory.header.frame_id = str[start:end].decode('utf-8')
00685 else:
00686 self.trajectory.header.frame_id = str[start:end]
00687 start = end
00688 end += 4
00689 (length,) = _struct_I.unpack(str[start:end])
00690 self.trajectory.joint_names = []
00691 for i in range(0, length):
00692 start = end
00693 end += 4
00694 (length,) = _struct_I.unpack(str[start:end])
00695 start = end
00696 end += length
00697 if python3:
00698 val1 = str[start:end].decode('utf-8')
00699 else:
00700 val1 = str[start:end]
00701 self.trajectory.joint_names.append(val1)
00702 start = end
00703 end += 4
00704 (length,) = _struct_I.unpack(str[start:end])
00705 self.trajectory.points = []
00706 for i in range(0, length):
00707 val1 = trajectory_msgs.msg.JointTrajectoryPoint()
00708 start = end
00709 end += 4
00710 (length,) = _struct_I.unpack(str[start:end])
00711 pattern = '<%sd'%length
00712 start = end
00713 end += struct.calcsize(pattern)
00714 val1.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00715 start = end
00716 end += 4
00717 (length,) = _struct_I.unpack(str[start:end])
00718 pattern = '<%sd'%length
00719 start = end
00720 end += struct.calcsize(pattern)
00721 val1.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00722 start = end
00723 end += 4
00724 (length,) = _struct_I.unpack(str[start:end])
00725 pattern = '<%sd'%length
00726 start = end
00727 end += struct.calcsize(pattern)
00728 val1.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00729 _v10 = val1.time_from_start
00730 _x = _v10
00731 start = end
00732 end += 8
00733 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00734 self.trajectory.points.append(val1)
00735 _x = self
00736 start = end
00737 end += 12
00738 (_x.start_state.joint_state.header.seq, _x.start_state.joint_state.header.stamp.secs, _x.start_state.joint_state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00739 start = end
00740 end += 4
00741 (length,) = _struct_I.unpack(str[start:end])
00742 start = end
00743 end += length
00744 if python3:
00745 self.start_state.joint_state.header.frame_id = str[start:end].decode('utf-8')
00746 else:
00747 self.start_state.joint_state.header.frame_id = str[start:end]
00748 start = end
00749 end += 4
00750 (length,) = _struct_I.unpack(str[start:end])
00751 self.start_state.joint_state.name = []
00752 for i in range(0, length):
00753 start = end
00754 end += 4
00755 (length,) = _struct_I.unpack(str[start:end])
00756 start = end
00757 end += length
00758 if python3:
00759 val1 = str[start:end].decode('utf-8')
00760 else:
00761 val1 = str[start:end]
00762 self.start_state.joint_state.name.append(val1)
00763 start = end
00764 end += 4
00765 (length,) = _struct_I.unpack(str[start:end])
00766 pattern = '<%sd'%length
00767 start = end
00768 end += struct.calcsize(pattern)
00769 self.start_state.joint_state.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00770 start = end
00771 end += 4
00772 (length,) = _struct_I.unpack(str[start:end])
00773 pattern = '<%sd'%length
00774 start = end
00775 end += struct.calcsize(pattern)
00776 self.start_state.joint_state.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00777 start = end
00778 end += 4
00779 (length,) = _struct_I.unpack(str[start:end])
00780 pattern = '<%sd'%length
00781 start = end
00782 end += struct.calcsize(pattern)
00783 self.start_state.joint_state.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00784 _x = self
00785 start = end
00786 end += 8
00787 (_x.start_state.multi_dof_joint_state.stamp.secs, _x.start_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00788 start = end
00789 end += 4
00790 (length,) = _struct_I.unpack(str[start:end])
00791 self.start_state.multi_dof_joint_state.joint_names = []
00792 for i in range(0, length):
00793 start = end
00794 end += 4
00795 (length,) = _struct_I.unpack(str[start:end])
00796 start = end
00797 end += length
00798 if python3:
00799 val1 = str[start:end].decode('utf-8')
00800 else:
00801 val1 = str[start:end]
00802 self.start_state.multi_dof_joint_state.joint_names.append(val1)
00803 start = end
00804 end += 4
00805 (length,) = _struct_I.unpack(str[start:end])
00806 self.start_state.multi_dof_joint_state.frame_ids = []
00807 for i in range(0, length):
00808 start = end
00809 end += 4
00810 (length,) = _struct_I.unpack(str[start:end])
00811 start = end
00812 end += length
00813 if python3:
00814 val1 = str[start:end].decode('utf-8')
00815 else:
00816 val1 = str[start:end]
00817 self.start_state.multi_dof_joint_state.frame_ids.append(val1)
00818 start = end
00819 end += 4
00820 (length,) = _struct_I.unpack(str[start:end])
00821 self.start_state.multi_dof_joint_state.child_frame_ids = []
00822 for i in range(0, length):
00823 start = end
00824 end += 4
00825 (length,) = _struct_I.unpack(str[start:end])
00826 start = end
00827 end += length
00828 if python3:
00829 val1 = str[start:end].decode('utf-8')
00830 else:
00831 val1 = str[start:end]
00832 self.start_state.multi_dof_joint_state.child_frame_ids.append(val1)
00833 start = end
00834 end += 4
00835 (length,) = _struct_I.unpack(str[start:end])
00836 self.start_state.multi_dof_joint_state.poses = []
00837 for i in range(0, length):
00838 val1 = geometry_msgs.msg.Pose()
00839 _v11 = val1.position
00840 _x = _v11
00841 start = end
00842 end += 24
00843 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00844 _v12 = val1.orientation
00845 _x = _v12
00846 start = end
00847 end += 32
00848 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00849 self.start_state.multi_dof_joint_state.poses.append(val1)
00850 start = end
00851 end += 4
00852 (length,) = _struct_I.unpack(str[start:end])
00853 self.limits = []
00854 for i in range(0, length):
00855 val1 = arm_navigation_msgs.msg.JointLimits()
00856 start = end
00857 end += 4
00858 (length,) = _struct_I.unpack(str[start:end])
00859 start = end
00860 end += length
00861 if python3:
00862 val1.joint_name = str[start:end].decode('utf-8')
00863 else:
00864 val1.joint_name = str[start:end]
00865 _x = val1
00866 start = end
00867 end += 35
00868 (_x.has_position_limits, _x.min_position, _x.max_position, _x.has_velocity_limits, _x.max_velocity, _x.has_acceleration_limits, _x.max_acceleration,) = _struct_B2dBdBd.unpack(str[start:end])
00869 val1.has_position_limits = bool(val1.has_position_limits)
00870 val1.has_velocity_limits = bool(val1.has_velocity_limits)
00871 val1.has_acceleration_limits = bool(val1.has_acceleration_limits)
00872 self.limits.append(val1)
00873 _x = self
00874 start = end
00875 end += 8
00876 (_x.allowed_time.secs, _x.allowed_time.nsecs,) = _struct_2i.unpack(str[start:end])
00877 self.allowed_time.canon()
00878 return self
00879 except struct.error as e:
00880 raise genpy.DeserializationError(e)
00881
00882 _struct_I = genpy.struct_I
00883 _struct_B2dBdBd = struct.Struct("<B2dBdBd")
00884 _struct_2I = struct.Struct("<2I")
00885 _struct_3I = struct.Struct("<3I")
00886 _struct_4d = struct.Struct("<4d")
00887 _struct_2i = struct.Struct("<2i")
00888 _struct_3d = struct.Struct("<3d")
00889 """autogenerated by genpy from arm_navigation_msgs/FilterJointTrajectoryResponse.msg. Do not edit."""
00890 import sys
00891 python3 = True if sys.hexversion > 0x03000000 else False
00892 import genpy
00893 import struct
00894
00895 import trajectory_msgs.msg
00896 import arm_navigation_msgs.msg
00897 import genpy
00898 import std_msgs.msg
00899
00900 class FilterJointTrajectoryResponse(genpy.Message):
00901 _md5sum = "5b4da90f4032f9ac3da9abfb05f766cc"
00902 _type = "arm_navigation_msgs/FilterJointTrajectoryResponse"
00903 _has_header = False
00904 _full_text = """trajectory_msgs/JointTrajectory trajectory
00905 ArmNavigationErrorCodes error_code
00906
00907
00908 ================================================================================
00909 MSG: trajectory_msgs/JointTrajectory
00910 Header header
00911 string[] joint_names
00912 JointTrajectoryPoint[] points
00913 ================================================================================
00914 MSG: std_msgs/Header
00915 # Standard metadata for higher-level stamped data types.
00916 # This is generally used to communicate timestamped data
00917 # in a particular coordinate frame.
00918 #
00919 # sequence ID: consecutively increasing ID
00920 uint32 seq
00921 #Two-integer timestamp that is expressed as:
00922 # * stamp.secs: seconds (stamp_secs) since epoch
00923 # * stamp.nsecs: nanoseconds since stamp_secs
00924 # time-handling sugar is provided by the client library
00925 time stamp
00926 #Frame this data is associated with
00927 # 0: no frame
00928 # 1: global frame
00929 string frame_id
00930
00931 ================================================================================
00932 MSG: trajectory_msgs/JointTrajectoryPoint
00933 float64[] positions
00934 float64[] velocities
00935 float64[] accelerations
00936 duration time_from_start
00937 ================================================================================
00938 MSG: arm_navigation_msgs/ArmNavigationErrorCodes
00939 int32 val
00940
00941 # overall behavior
00942 int32 PLANNING_FAILED=-1
00943 int32 SUCCESS=1
00944 int32 TIMED_OUT=-2
00945
00946 # start state errors
00947 int32 START_STATE_IN_COLLISION=-3
00948 int32 START_STATE_VIOLATES_PATH_CONSTRAINTS=-4
00949
00950 # goal errors
00951 int32 GOAL_IN_COLLISION=-5
00952 int32 GOAL_VIOLATES_PATH_CONSTRAINTS=-6
00953
00954 # robot state
00955 int32 INVALID_ROBOT_STATE=-7
00956 int32 INCOMPLETE_ROBOT_STATE=-8
00957
00958 # planning request errors
00959 int32 INVALID_PLANNER_ID=-9
00960 int32 INVALID_NUM_PLANNING_ATTEMPTS=-10
00961 int32 INVALID_ALLOWED_PLANNING_TIME=-11
00962 int32 INVALID_GROUP_NAME=-12
00963 int32 INVALID_GOAL_JOINT_CONSTRAINTS=-13
00964 int32 INVALID_GOAL_POSITION_CONSTRAINTS=-14
00965 int32 INVALID_GOAL_ORIENTATION_CONSTRAINTS=-15
00966 int32 INVALID_PATH_JOINT_CONSTRAINTS=-16
00967 int32 INVALID_PATH_POSITION_CONSTRAINTS=-17
00968 int32 INVALID_PATH_ORIENTATION_CONSTRAINTS=-18
00969
00970 # state/trajectory monitor errors
00971 int32 INVALID_TRAJECTORY=-19
00972 int32 INVALID_INDEX=-20
00973 int32 JOINT_LIMITS_VIOLATED=-21
00974 int32 PATH_CONSTRAINTS_VIOLATED=-22
00975 int32 COLLISION_CONSTRAINTS_VIOLATED=-23
00976 int32 GOAL_CONSTRAINTS_VIOLATED=-24
00977 int32 JOINTS_NOT_MOVING=-25
00978 int32 TRAJECTORY_CONTROLLER_FAILED=-26
00979
00980 # system errors
00981 int32 FRAME_TRANSFORM_FAILURE=-27
00982 int32 COLLISION_CHECKING_UNAVAILABLE=-28
00983 int32 ROBOT_STATE_STALE=-29
00984 int32 SENSOR_INFO_STALE=-30
00985
00986 # kinematics errors
00987 int32 NO_IK_SOLUTION=-31
00988 int32 INVALID_LINK_NAME=-32
00989 int32 IK_LINK_IN_COLLISION=-33
00990 int32 NO_FK_SOLUTION=-34
00991 int32 KINEMATICS_STATE_IN_COLLISION=-35
00992
00993 # general errors
00994 int32 INVALID_TIMEOUT=-36
00995
00996
00997 """
00998 __slots__ = ['trajectory','error_code']
00999 _slot_types = ['trajectory_msgs/JointTrajectory','arm_navigation_msgs/ArmNavigationErrorCodes']
01000
01001 def __init__(self, *args, **kwds):
01002 """
01003 Constructor. Any message fields that are implicitly/explicitly
01004 set to None will be assigned a default value. The recommend
01005 use is keyword arguments as this is more robust to future message
01006 changes. You cannot mix in-order arguments and keyword arguments.
01007
01008 The available fields are:
01009 trajectory,error_code
01010
01011 :param args: complete set of field values, in .msg order
01012 :param kwds: use keyword arguments corresponding to message field names
01013 to set specific fields.
01014 """
01015 if args or kwds:
01016 super(FilterJointTrajectoryResponse, self).__init__(*args, **kwds)
01017
01018 if self.trajectory is None:
01019 self.trajectory = trajectory_msgs.msg.JointTrajectory()
01020 if self.error_code is None:
01021 self.error_code = arm_navigation_msgs.msg.ArmNavigationErrorCodes()
01022 else:
01023 self.trajectory = trajectory_msgs.msg.JointTrajectory()
01024 self.error_code = arm_navigation_msgs.msg.ArmNavigationErrorCodes()
01025
01026 def _get_types(self):
01027 """
01028 internal API method
01029 """
01030 return self._slot_types
01031
01032 def serialize(self, buff):
01033 """
01034 serialize message into buffer
01035 :param buff: buffer, ``StringIO``
01036 """
01037 try:
01038 _x = self
01039 buff.write(_struct_3I.pack(_x.trajectory.header.seq, _x.trajectory.header.stamp.secs, _x.trajectory.header.stamp.nsecs))
01040 _x = self.trajectory.header.frame_id
01041 length = len(_x)
01042 if python3 or type(_x) == unicode:
01043 _x = _x.encode('utf-8')
01044 length = len(_x)
01045 buff.write(struct.pack('<I%ss'%length, length, _x))
01046 length = len(self.trajectory.joint_names)
01047 buff.write(_struct_I.pack(length))
01048 for val1 in self.trajectory.joint_names:
01049 length = len(val1)
01050 if python3 or type(val1) == unicode:
01051 val1 = val1.encode('utf-8')
01052 length = len(val1)
01053 buff.write(struct.pack('<I%ss'%length, length, val1))
01054 length = len(self.trajectory.points)
01055 buff.write(_struct_I.pack(length))
01056 for val1 in self.trajectory.points:
01057 length = len(val1.positions)
01058 buff.write(_struct_I.pack(length))
01059 pattern = '<%sd'%length
01060 buff.write(struct.pack(pattern, *val1.positions))
01061 length = len(val1.velocities)
01062 buff.write(_struct_I.pack(length))
01063 pattern = '<%sd'%length
01064 buff.write(struct.pack(pattern, *val1.velocities))
01065 length = len(val1.accelerations)
01066 buff.write(_struct_I.pack(length))
01067 pattern = '<%sd'%length
01068 buff.write(struct.pack(pattern, *val1.accelerations))
01069 _v13 = val1.time_from_start
01070 _x = _v13
01071 buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
01072 buff.write(_struct_i.pack(self.error_code.val))
01073 except struct.error as se: self._check_types(se)
01074 except TypeError as te: self._check_types(te)
01075
01076 def deserialize(self, str):
01077 """
01078 unpack serialized message in str into this message instance
01079 :param str: byte array of serialized message, ``str``
01080 """
01081 try:
01082 if self.trajectory is None:
01083 self.trajectory = trajectory_msgs.msg.JointTrajectory()
01084 if self.error_code is None:
01085 self.error_code = arm_navigation_msgs.msg.ArmNavigationErrorCodes()
01086 end = 0
01087 _x = self
01088 start = end
01089 end += 12
01090 (_x.trajectory.header.seq, _x.trajectory.header.stamp.secs, _x.trajectory.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01091 start = end
01092 end += 4
01093 (length,) = _struct_I.unpack(str[start:end])
01094 start = end
01095 end += length
01096 if python3:
01097 self.trajectory.header.frame_id = str[start:end].decode('utf-8')
01098 else:
01099 self.trajectory.header.frame_id = str[start:end]
01100 start = end
01101 end += 4
01102 (length,) = _struct_I.unpack(str[start:end])
01103 self.trajectory.joint_names = []
01104 for i in range(0, length):
01105 start = end
01106 end += 4
01107 (length,) = _struct_I.unpack(str[start:end])
01108 start = end
01109 end += length
01110 if python3:
01111 val1 = str[start:end].decode('utf-8')
01112 else:
01113 val1 = str[start:end]
01114 self.trajectory.joint_names.append(val1)
01115 start = end
01116 end += 4
01117 (length,) = _struct_I.unpack(str[start:end])
01118 self.trajectory.points = []
01119 for i in range(0, length):
01120 val1 = trajectory_msgs.msg.JointTrajectoryPoint()
01121 start = end
01122 end += 4
01123 (length,) = _struct_I.unpack(str[start:end])
01124 pattern = '<%sd'%length
01125 start = end
01126 end += struct.calcsize(pattern)
01127 val1.positions = struct.unpack(pattern, str[start:end])
01128 start = end
01129 end += 4
01130 (length,) = _struct_I.unpack(str[start:end])
01131 pattern = '<%sd'%length
01132 start = end
01133 end += struct.calcsize(pattern)
01134 val1.velocities = struct.unpack(pattern, str[start:end])
01135 start = end
01136 end += 4
01137 (length,) = _struct_I.unpack(str[start:end])
01138 pattern = '<%sd'%length
01139 start = end
01140 end += struct.calcsize(pattern)
01141 val1.accelerations = struct.unpack(pattern, str[start:end])
01142 _v14 = val1.time_from_start
01143 _x = _v14
01144 start = end
01145 end += 8
01146 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
01147 self.trajectory.points.append(val1)
01148 start = end
01149 end += 4
01150 (self.error_code.val,) = _struct_i.unpack(str[start:end])
01151 return self
01152 except struct.error as e:
01153 raise genpy.DeserializationError(e)
01154
01155
01156 def serialize_numpy(self, buff, numpy):
01157 """
01158 serialize message with numpy array types into buffer
01159 :param buff: buffer, ``StringIO``
01160 :param numpy: numpy python module
01161 """
01162 try:
01163 _x = self
01164 buff.write(_struct_3I.pack(_x.trajectory.header.seq, _x.trajectory.header.stamp.secs, _x.trajectory.header.stamp.nsecs))
01165 _x = self.trajectory.header.frame_id
01166 length = len(_x)
01167 if python3 or type(_x) == unicode:
01168 _x = _x.encode('utf-8')
01169 length = len(_x)
01170 buff.write(struct.pack('<I%ss'%length, length, _x))
01171 length = len(self.trajectory.joint_names)
01172 buff.write(_struct_I.pack(length))
01173 for val1 in self.trajectory.joint_names:
01174 length = len(val1)
01175 if python3 or type(val1) == unicode:
01176 val1 = val1.encode('utf-8')
01177 length = len(val1)
01178 buff.write(struct.pack('<I%ss'%length, length, val1))
01179 length = len(self.trajectory.points)
01180 buff.write(_struct_I.pack(length))
01181 for val1 in self.trajectory.points:
01182 length = len(val1.positions)
01183 buff.write(_struct_I.pack(length))
01184 pattern = '<%sd'%length
01185 buff.write(val1.positions.tostring())
01186 length = len(val1.velocities)
01187 buff.write(_struct_I.pack(length))
01188 pattern = '<%sd'%length
01189 buff.write(val1.velocities.tostring())
01190 length = len(val1.accelerations)
01191 buff.write(_struct_I.pack(length))
01192 pattern = '<%sd'%length
01193 buff.write(val1.accelerations.tostring())
01194 _v15 = val1.time_from_start
01195 _x = _v15
01196 buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
01197 buff.write(_struct_i.pack(self.error_code.val))
01198 except struct.error as se: self._check_types(se)
01199 except TypeError as te: self._check_types(te)
01200
01201 def deserialize_numpy(self, str, numpy):
01202 """
01203 unpack serialized message in str into this message instance using numpy for array types
01204 :param str: byte array of serialized message, ``str``
01205 :param numpy: numpy python module
01206 """
01207 try:
01208 if self.trajectory is None:
01209 self.trajectory = trajectory_msgs.msg.JointTrajectory()
01210 if self.error_code is None:
01211 self.error_code = arm_navigation_msgs.msg.ArmNavigationErrorCodes()
01212 end = 0
01213 _x = self
01214 start = end
01215 end += 12
01216 (_x.trajectory.header.seq, _x.trajectory.header.stamp.secs, _x.trajectory.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
01217 start = end
01218 end += 4
01219 (length,) = _struct_I.unpack(str[start:end])
01220 start = end
01221 end += length
01222 if python3:
01223 self.trajectory.header.frame_id = str[start:end].decode('utf-8')
01224 else:
01225 self.trajectory.header.frame_id = str[start:end]
01226 start = end
01227 end += 4
01228 (length,) = _struct_I.unpack(str[start:end])
01229 self.trajectory.joint_names = []
01230 for i in range(0, length):
01231 start = end
01232 end += 4
01233 (length,) = _struct_I.unpack(str[start:end])
01234 start = end
01235 end += length
01236 if python3:
01237 val1 = str[start:end].decode('utf-8')
01238 else:
01239 val1 = str[start:end]
01240 self.trajectory.joint_names.append(val1)
01241 start = end
01242 end += 4
01243 (length,) = _struct_I.unpack(str[start:end])
01244 self.trajectory.points = []
01245 for i in range(0, length):
01246 val1 = trajectory_msgs.msg.JointTrajectoryPoint()
01247 start = end
01248 end += 4
01249 (length,) = _struct_I.unpack(str[start:end])
01250 pattern = '<%sd'%length
01251 start = end
01252 end += struct.calcsize(pattern)
01253 val1.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01254 start = end
01255 end += 4
01256 (length,) = _struct_I.unpack(str[start:end])
01257 pattern = '<%sd'%length
01258 start = end
01259 end += struct.calcsize(pattern)
01260 val1.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01261 start = end
01262 end += 4
01263 (length,) = _struct_I.unpack(str[start:end])
01264 pattern = '<%sd'%length
01265 start = end
01266 end += struct.calcsize(pattern)
01267 val1.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01268 _v16 = val1.time_from_start
01269 _x = _v16
01270 start = end
01271 end += 8
01272 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
01273 self.trajectory.points.append(val1)
01274 start = end
01275 end += 4
01276 (self.error_code.val,) = _struct_i.unpack(str[start:end])
01277 return self
01278 except struct.error as e:
01279 raise genpy.DeserializationError(e)
01280
01281 _struct_I = genpy.struct_I
01282 _struct_i = struct.Struct("<i")
01283 _struct_3I = struct.Struct("<3I")
01284 _struct_2i = struct.Struct("<2i")
01285 class FilterJointTrajectory(object):
01286 _type = 'arm_navigation_msgs/FilterJointTrajectory'
01287 _md5sum = '18a1c6fa9ab739ec5af11210c0fd79d1'
01288 _request_class = FilterJointTrajectoryRequest
01289 _response_class = FilterJointTrajectoryResponse