_PR2GripperSlipServoAction.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_gripper_sensor_msgs/PR2GripperSlipServoAction.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 genpy
00008 import actionlib_msgs.msg
00009 import pr2_gripper_sensor_msgs.msg
00010 import std_msgs.msg
00011 
00012 class PR2GripperSlipServoAction(genpy.Message):
00013   _md5sum = "d1abef6e5d417a62bf67570de0fcd426"
00014   _type = "pr2_gripper_sensor_msgs/PR2GripperSlipServoAction"
00015   _has_header = False #flag to mark the presence of a Header object
00016   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017 
00018 PR2GripperSlipServoActionGoal action_goal
00019 PR2GripperSlipServoActionResult action_result
00020 PR2GripperSlipServoActionFeedback action_feedback
00021 
00022 ================================================================================
00023 MSG: pr2_gripper_sensor_msgs/PR2GripperSlipServoActionGoal
00024 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00025 
00026 Header header
00027 actionlib_msgs/GoalID goal_id
00028 PR2GripperSlipServoGoal goal
00029 
00030 ================================================================================
00031 MSG: std_msgs/Header
00032 # Standard metadata for higher-level stamped data types.
00033 # This is generally used to communicate timestamped data 
00034 # in a particular coordinate frame.
00035 # 
00036 # sequence ID: consecutively increasing ID 
00037 uint32 seq
00038 #Two-integer timestamp that is expressed as:
00039 # * stamp.secs: seconds (stamp_secs) since epoch
00040 # * stamp.nsecs: nanoseconds since stamp_secs
00041 # time-handling sugar is provided by the client library
00042 time stamp
00043 #Frame this data is associated with
00044 # 0: no frame
00045 # 1: global frame
00046 string frame_id
00047 
00048 ================================================================================
00049 MSG: actionlib_msgs/GoalID
00050 # The stamp should store the time at which this goal was requested.
00051 # It is used by an action server when it tries to preempt all
00052 # goals that were requested before a certain time
00053 time stamp
00054 
00055 # The id provides a way to associate feedback and
00056 # result message with specific goal requests. The id
00057 # specified must be unique.
00058 string id
00059 
00060 
00061 ================================================================================
00062 MSG: pr2_gripper_sensor_msgs/PR2GripperSlipServoGoal
00063 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00064 # Action to launch the gripper into slip servoing mode 
00065 
00066 #goals
00067 PR2GripperSlipServoCommand command
00068 
00069 ================================================================================
00070 MSG: pr2_gripper_sensor_msgs/PR2GripperSlipServoCommand
00071 # this command is currently blank, but may see additional variable
00072 # additions in the future
00073 
00074 # see the param server documentation for a list of variables that effect
00075 # slip servo performance
00076 ================================================================================
00077 MSG: pr2_gripper_sensor_msgs/PR2GripperSlipServoActionResult
00078 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00079 
00080 Header header
00081 actionlib_msgs/GoalStatus status
00082 PR2GripperSlipServoResult result
00083 
00084 ================================================================================
00085 MSG: actionlib_msgs/GoalStatus
00086 GoalID goal_id
00087 uint8 status
00088 uint8 PENDING         = 0   # The goal has yet to be processed by the action server
00089 uint8 ACTIVE          = 1   # The goal is currently being processed by the action server
00090 uint8 PREEMPTED       = 2   # The goal received a cancel request after it started executing
00091                             #   and has since completed its execution (Terminal State)
00092 uint8 SUCCEEDED       = 3   # The goal was achieved successfully by the action server (Terminal State)
00093 uint8 ABORTED         = 4   # The goal was aborted during execution by the action server due
00094                             #    to some failure (Terminal State)
00095 uint8 REJECTED        = 5   # The goal was rejected by the action server without being processed,
00096                             #    because the goal was unattainable or invalid (Terminal State)
00097 uint8 PREEMPTING      = 6   # The goal received a cancel request after it started executing
00098                             #    and has not yet completed execution
00099 uint8 RECALLING       = 7   # The goal received a cancel request before it started executing,
00100                             #    but the action server has not yet confirmed that the goal is canceled
00101 uint8 RECALLED        = 8   # The goal received a cancel request before it started executing
00102                             #    and was successfully cancelled (Terminal State)
00103 uint8 LOST            = 9   # An action client can determine that a goal is LOST. This should not be
00104                             #    sent over the wire by an action server
00105 
00106 #Allow for the user to associate a string with GoalStatus for debugging
00107 string text
00108 
00109 
00110 ================================================================================
00111 MSG: pr2_gripper_sensor_msgs/PR2GripperSlipServoResult
00112 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00113 
00114 #result
00115 PR2GripperSlipServoData data
00116 
00117 
00118 ================================================================================
00119 MSG: pr2_gripper_sensor_msgs/PR2GripperSlipServoData
00120 # time the data was recorded at
00121 time stamp
00122 
00123 # the amount of deformation from action start (in meters)
00124 float64 deformation
00125 
00126 # the force experinced by the finger Pads  (N)
00127 # NOTE:this ignores data from the edges of the finger pressure
00128 float64 left_fingertip_pad_force
00129 float64 right_fingertip_pad_force
00130 
00131 # the current virtual parallel joint effort of the gripper (in N)
00132 float64 joint_effort
00133 
00134 # true if the object recently slipped
00135 bool slip_detected
00136 
00137 # true if we are at or exceeding the deformation limit
00138 # (see wiki page and param server for more info)
00139 bool deformation_limit_reached
00140 
00141 # true if we are at or exceeding our force 
00142 # (see wiki page and param server for more info)
00143 bool fingertip_force_limit_reached
00144 
00145 # true if the controller thinks the gripper is empty
00146 # (see wiki page for more info)
00147 bool gripper_empty
00148 
00149 # the control state of our realtime controller
00150 PR2GripperSensorRTState rtstate
00151 ================================================================================
00152 MSG: pr2_gripper_sensor_msgs/PR2GripperSensorRTState
00153 # the control state of our realtime controller
00154 int8 realtime_controller_state
00155 
00156 # predefined values to indicate our realtime_controller_state
00157 int8 DISABLED = 0
00158 int8 POSITION_SERVO = 3
00159 int8 FORCE_SERVO = 4
00160 int8 FIND_CONTACT = 5
00161 int8 SLIP_SERVO = 6
00162 ================================================================================
00163 MSG: pr2_gripper_sensor_msgs/PR2GripperSlipServoActionFeedback
00164 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00165 
00166 Header header
00167 actionlib_msgs/GoalStatus status
00168 PR2GripperSlipServoFeedback feedback
00169 
00170 ================================================================================
00171 MSG: pr2_gripper_sensor_msgs/PR2GripperSlipServoFeedback
00172 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00173 
00174 #feedback
00175 PR2GripperSlipServoData data
00176 
00177 """
00178   __slots__ = ['action_goal','action_result','action_feedback']
00179   _slot_types = ['pr2_gripper_sensor_msgs/PR2GripperSlipServoActionGoal','pr2_gripper_sensor_msgs/PR2GripperSlipServoActionResult','pr2_gripper_sensor_msgs/PR2GripperSlipServoActionFeedback']
00180 
00181   def __init__(self, *args, **kwds):
00182     """
00183     Constructor. Any message fields that are implicitly/explicitly
00184     set to None will be assigned a default value. The recommend
00185     use is keyword arguments as this is more robust to future message
00186     changes.  You cannot mix in-order arguments and keyword arguments.
00187 
00188     The available fields are:
00189        action_goal,action_result,action_feedback
00190 
00191     :param args: complete set of field values, in .msg order
00192     :param kwds: use keyword arguments corresponding to message field names
00193     to set specific fields.
00194     """
00195     if args or kwds:
00196       super(PR2GripperSlipServoAction, self).__init__(*args, **kwds)
00197       #message fields cannot be None, assign default values for those that are
00198       if self.action_goal is None:
00199         self.action_goal = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoActionGoal()
00200       if self.action_result is None:
00201         self.action_result = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoActionResult()
00202       if self.action_feedback is None:
00203         self.action_feedback = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoActionFeedback()
00204     else:
00205       self.action_goal = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoActionGoal()
00206       self.action_result = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoActionResult()
00207       self.action_feedback = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoActionFeedback()
00208 
00209   def _get_types(self):
00210     """
00211     internal API method
00212     """
00213     return self._slot_types
00214 
00215   def serialize(self, buff):
00216     """
00217     serialize message into buffer
00218     :param buff: buffer, ``StringIO``
00219     """
00220     try:
00221       _x = self
00222       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00223       _x = self.action_goal.header.frame_id
00224       length = len(_x)
00225       if python3 or type(_x) == unicode:
00226         _x = _x.encode('utf-8')
00227         length = len(_x)
00228       buff.write(struct.pack('<I%ss'%length, length, _x))
00229       _x = self
00230       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00231       _x = self.action_goal.goal_id.id
00232       length = len(_x)
00233       if python3 or type(_x) == unicode:
00234         _x = _x.encode('utf-8')
00235         length = len(_x)
00236       buff.write(struct.pack('<I%ss'%length, length, _x))
00237       _x = self
00238       buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00239       _x = self.action_result.header.frame_id
00240       length = len(_x)
00241       if python3 or type(_x) == unicode:
00242         _x = _x.encode('utf-8')
00243         length = len(_x)
00244       buff.write(struct.pack('<I%ss'%length, length, _x))
00245       _x = self
00246       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00247       _x = self.action_result.status.goal_id.id
00248       length = len(_x)
00249       if python3 or type(_x) == unicode:
00250         _x = _x.encode('utf-8')
00251         length = len(_x)
00252       buff.write(struct.pack('<I%ss'%length, length, _x))
00253       buff.write(_struct_B.pack(self.action_result.status.status))
00254       _x = self.action_result.status.text
00255       length = len(_x)
00256       if python3 or type(_x) == unicode:
00257         _x = _x.encode('utf-8')
00258         length = len(_x)
00259       buff.write(struct.pack('<I%ss'%length, length, _x))
00260       _x = self
00261       buff.write(_struct_2I4d4Bb3I.pack(_x.action_result.result.data.stamp.secs, _x.action_result.result.data.stamp.nsecs, _x.action_result.result.data.deformation, _x.action_result.result.data.left_fingertip_pad_force, _x.action_result.result.data.right_fingertip_pad_force, _x.action_result.result.data.joint_effort, _x.action_result.result.data.slip_detected, _x.action_result.result.data.deformation_limit_reached, _x.action_result.result.data.fingertip_force_limit_reached, _x.action_result.result.data.gripper_empty, _x.action_result.result.data.rtstate.realtime_controller_state, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00262       _x = self.action_feedback.header.frame_id
00263       length = len(_x)
00264       if python3 or type(_x) == unicode:
00265         _x = _x.encode('utf-8')
00266         length = len(_x)
00267       buff.write(struct.pack('<I%ss'%length, length, _x))
00268       _x = self
00269       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00270       _x = self.action_feedback.status.goal_id.id
00271       length = len(_x)
00272       if python3 or type(_x) == unicode:
00273         _x = _x.encode('utf-8')
00274         length = len(_x)
00275       buff.write(struct.pack('<I%ss'%length, length, _x))
00276       buff.write(_struct_B.pack(self.action_feedback.status.status))
00277       _x = self.action_feedback.status.text
00278       length = len(_x)
00279       if python3 or type(_x) == unicode:
00280         _x = _x.encode('utf-8')
00281         length = len(_x)
00282       buff.write(struct.pack('<I%ss'%length, length, _x))
00283       _x = self
00284       buff.write(_struct_2I4d4Bb.pack(_x.action_feedback.feedback.data.stamp.secs, _x.action_feedback.feedback.data.stamp.nsecs, _x.action_feedback.feedback.data.deformation, _x.action_feedback.feedback.data.left_fingertip_pad_force, _x.action_feedback.feedback.data.right_fingertip_pad_force, _x.action_feedback.feedback.data.joint_effort, _x.action_feedback.feedback.data.slip_detected, _x.action_feedback.feedback.data.deformation_limit_reached, _x.action_feedback.feedback.data.fingertip_force_limit_reached, _x.action_feedback.feedback.data.gripper_empty, _x.action_feedback.feedback.data.rtstate.realtime_controller_state))
00285     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00286     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00287 
00288   def deserialize(self, str):
00289     """
00290     unpack serialized message in str into this message instance
00291     :param str: byte array of serialized message, ``str``
00292     """
00293     try:
00294       if self.action_goal is None:
00295         self.action_goal = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoActionGoal()
00296       if self.action_result is None:
00297         self.action_result = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoActionResult()
00298       if self.action_feedback is None:
00299         self.action_feedback = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoActionFeedback()
00300       end = 0
00301       _x = self
00302       start = end
00303       end += 12
00304       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00305       start = end
00306       end += 4
00307       (length,) = _struct_I.unpack(str[start:end])
00308       start = end
00309       end += length
00310       if python3:
00311         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00312       else:
00313         self.action_goal.header.frame_id = str[start:end]
00314       _x = self
00315       start = end
00316       end += 8
00317       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00318       start = end
00319       end += 4
00320       (length,) = _struct_I.unpack(str[start:end])
00321       start = end
00322       end += length
00323       if python3:
00324         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00325       else:
00326         self.action_goal.goal_id.id = str[start:end]
00327       _x = self
00328       start = end
00329       end += 12
00330       (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00331       start = end
00332       end += 4
00333       (length,) = _struct_I.unpack(str[start:end])
00334       start = end
00335       end += length
00336       if python3:
00337         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00338       else:
00339         self.action_result.header.frame_id = str[start:end]
00340       _x = self
00341       start = end
00342       end += 8
00343       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00344       start = end
00345       end += 4
00346       (length,) = _struct_I.unpack(str[start:end])
00347       start = end
00348       end += length
00349       if python3:
00350         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00351       else:
00352         self.action_result.status.goal_id.id = str[start:end]
00353       start = end
00354       end += 1
00355       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00356       start = end
00357       end += 4
00358       (length,) = _struct_I.unpack(str[start:end])
00359       start = end
00360       end += length
00361       if python3:
00362         self.action_result.status.text = str[start:end].decode('utf-8')
00363       else:
00364         self.action_result.status.text = str[start:end]
00365       _x = self
00366       start = end
00367       end += 57
00368       (_x.action_result.result.data.stamp.secs, _x.action_result.result.data.stamp.nsecs, _x.action_result.result.data.deformation, _x.action_result.result.data.left_fingertip_pad_force, _x.action_result.result.data.right_fingertip_pad_force, _x.action_result.result.data.joint_effort, _x.action_result.result.data.slip_detected, _x.action_result.result.data.deformation_limit_reached, _x.action_result.result.data.fingertip_force_limit_reached, _x.action_result.result.data.gripper_empty, _x.action_result.result.data.rtstate.realtime_controller_state, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_2I4d4Bb3I.unpack(str[start:end])
00369       self.action_result.result.data.slip_detected = bool(self.action_result.result.data.slip_detected)
00370       self.action_result.result.data.deformation_limit_reached = bool(self.action_result.result.data.deformation_limit_reached)
00371       self.action_result.result.data.fingertip_force_limit_reached = bool(self.action_result.result.data.fingertip_force_limit_reached)
00372       self.action_result.result.data.gripper_empty = bool(self.action_result.result.data.gripper_empty)
00373       start = end
00374       end += 4
00375       (length,) = _struct_I.unpack(str[start:end])
00376       start = end
00377       end += length
00378       if python3:
00379         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00380       else:
00381         self.action_feedback.header.frame_id = str[start:end]
00382       _x = self
00383       start = end
00384       end += 8
00385       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00386       start = end
00387       end += 4
00388       (length,) = _struct_I.unpack(str[start:end])
00389       start = end
00390       end += length
00391       if python3:
00392         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00393       else:
00394         self.action_feedback.status.goal_id.id = str[start:end]
00395       start = end
00396       end += 1
00397       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00398       start = end
00399       end += 4
00400       (length,) = _struct_I.unpack(str[start:end])
00401       start = end
00402       end += length
00403       if python3:
00404         self.action_feedback.status.text = str[start:end].decode('utf-8')
00405       else:
00406         self.action_feedback.status.text = str[start:end]
00407       _x = self
00408       start = end
00409       end += 45
00410       (_x.action_feedback.feedback.data.stamp.secs, _x.action_feedback.feedback.data.stamp.nsecs, _x.action_feedback.feedback.data.deformation, _x.action_feedback.feedback.data.left_fingertip_pad_force, _x.action_feedback.feedback.data.right_fingertip_pad_force, _x.action_feedback.feedback.data.joint_effort, _x.action_feedback.feedback.data.slip_detected, _x.action_feedback.feedback.data.deformation_limit_reached, _x.action_feedback.feedback.data.fingertip_force_limit_reached, _x.action_feedback.feedback.data.gripper_empty, _x.action_feedback.feedback.data.rtstate.realtime_controller_state,) = _struct_2I4d4Bb.unpack(str[start:end])
00411       self.action_feedback.feedback.data.slip_detected = bool(self.action_feedback.feedback.data.slip_detected)
00412       self.action_feedback.feedback.data.deformation_limit_reached = bool(self.action_feedback.feedback.data.deformation_limit_reached)
00413       self.action_feedback.feedback.data.fingertip_force_limit_reached = bool(self.action_feedback.feedback.data.fingertip_force_limit_reached)
00414       self.action_feedback.feedback.data.gripper_empty = bool(self.action_feedback.feedback.data.gripper_empty)
00415       return self
00416     except struct.error as e:
00417       raise genpy.DeserializationError(e) #most likely buffer underfill
00418 
00419 
00420   def serialize_numpy(self, buff, numpy):
00421     """
00422     serialize message with numpy array types into buffer
00423     :param buff: buffer, ``StringIO``
00424     :param numpy: numpy python module
00425     """
00426     try:
00427       _x = self
00428       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00429       _x = self.action_goal.header.frame_id
00430       length = len(_x)
00431       if python3 or type(_x) == unicode:
00432         _x = _x.encode('utf-8')
00433         length = len(_x)
00434       buff.write(struct.pack('<I%ss'%length, length, _x))
00435       _x = self
00436       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00437       _x = self.action_goal.goal_id.id
00438       length = len(_x)
00439       if python3 or type(_x) == unicode:
00440         _x = _x.encode('utf-8')
00441         length = len(_x)
00442       buff.write(struct.pack('<I%ss'%length, length, _x))
00443       _x = self
00444       buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00445       _x = self.action_result.header.frame_id
00446       length = len(_x)
00447       if python3 or type(_x) == unicode:
00448         _x = _x.encode('utf-8')
00449         length = len(_x)
00450       buff.write(struct.pack('<I%ss'%length, length, _x))
00451       _x = self
00452       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00453       _x = self.action_result.status.goal_id.id
00454       length = len(_x)
00455       if python3 or type(_x) == unicode:
00456         _x = _x.encode('utf-8')
00457         length = len(_x)
00458       buff.write(struct.pack('<I%ss'%length, length, _x))
00459       buff.write(_struct_B.pack(self.action_result.status.status))
00460       _x = self.action_result.status.text
00461       length = len(_x)
00462       if python3 or type(_x) == unicode:
00463         _x = _x.encode('utf-8')
00464         length = len(_x)
00465       buff.write(struct.pack('<I%ss'%length, length, _x))
00466       _x = self
00467       buff.write(_struct_2I4d4Bb3I.pack(_x.action_result.result.data.stamp.secs, _x.action_result.result.data.stamp.nsecs, _x.action_result.result.data.deformation, _x.action_result.result.data.left_fingertip_pad_force, _x.action_result.result.data.right_fingertip_pad_force, _x.action_result.result.data.joint_effort, _x.action_result.result.data.slip_detected, _x.action_result.result.data.deformation_limit_reached, _x.action_result.result.data.fingertip_force_limit_reached, _x.action_result.result.data.gripper_empty, _x.action_result.result.data.rtstate.realtime_controller_state, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00468       _x = self.action_feedback.header.frame_id
00469       length = len(_x)
00470       if python3 or type(_x) == unicode:
00471         _x = _x.encode('utf-8')
00472         length = len(_x)
00473       buff.write(struct.pack('<I%ss'%length, length, _x))
00474       _x = self
00475       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00476       _x = self.action_feedback.status.goal_id.id
00477       length = len(_x)
00478       if python3 or type(_x) == unicode:
00479         _x = _x.encode('utf-8')
00480         length = len(_x)
00481       buff.write(struct.pack('<I%ss'%length, length, _x))
00482       buff.write(_struct_B.pack(self.action_feedback.status.status))
00483       _x = self.action_feedback.status.text
00484       length = len(_x)
00485       if python3 or type(_x) == unicode:
00486         _x = _x.encode('utf-8')
00487         length = len(_x)
00488       buff.write(struct.pack('<I%ss'%length, length, _x))
00489       _x = self
00490       buff.write(_struct_2I4d4Bb.pack(_x.action_feedback.feedback.data.stamp.secs, _x.action_feedback.feedback.data.stamp.nsecs, _x.action_feedback.feedback.data.deformation, _x.action_feedback.feedback.data.left_fingertip_pad_force, _x.action_feedback.feedback.data.right_fingertip_pad_force, _x.action_feedback.feedback.data.joint_effort, _x.action_feedback.feedback.data.slip_detected, _x.action_feedback.feedback.data.deformation_limit_reached, _x.action_feedback.feedback.data.fingertip_force_limit_reached, _x.action_feedback.feedback.data.gripper_empty, _x.action_feedback.feedback.data.rtstate.realtime_controller_state))
00491     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00492     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00493 
00494   def deserialize_numpy(self, str, numpy):
00495     """
00496     unpack serialized message in str into this message instance using numpy for array types
00497     :param str: byte array of serialized message, ``str``
00498     :param numpy: numpy python module
00499     """
00500     try:
00501       if self.action_goal is None:
00502         self.action_goal = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoActionGoal()
00503       if self.action_result is None:
00504         self.action_result = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoActionResult()
00505       if self.action_feedback is None:
00506         self.action_feedback = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoActionFeedback()
00507       end = 0
00508       _x = self
00509       start = end
00510       end += 12
00511       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00512       start = end
00513       end += 4
00514       (length,) = _struct_I.unpack(str[start:end])
00515       start = end
00516       end += length
00517       if python3:
00518         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00519       else:
00520         self.action_goal.header.frame_id = str[start:end]
00521       _x = self
00522       start = end
00523       end += 8
00524       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00525       start = end
00526       end += 4
00527       (length,) = _struct_I.unpack(str[start:end])
00528       start = end
00529       end += length
00530       if python3:
00531         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00532       else:
00533         self.action_goal.goal_id.id = str[start:end]
00534       _x = self
00535       start = end
00536       end += 12
00537       (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00538       start = end
00539       end += 4
00540       (length,) = _struct_I.unpack(str[start:end])
00541       start = end
00542       end += length
00543       if python3:
00544         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00545       else:
00546         self.action_result.header.frame_id = str[start:end]
00547       _x = self
00548       start = end
00549       end += 8
00550       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00551       start = end
00552       end += 4
00553       (length,) = _struct_I.unpack(str[start:end])
00554       start = end
00555       end += length
00556       if python3:
00557         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00558       else:
00559         self.action_result.status.goal_id.id = str[start:end]
00560       start = end
00561       end += 1
00562       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00563       start = end
00564       end += 4
00565       (length,) = _struct_I.unpack(str[start:end])
00566       start = end
00567       end += length
00568       if python3:
00569         self.action_result.status.text = str[start:end].decode('utf-8')
00570       else:
00571         self.action_result.status.text = str[start:end]
00572       _x = self
00573       start = end
00574       end += 57
00575       (_x.action_result.result.data.stamp.secs, _x.action_result.result.data.stamp.nsecs, _x.action_result.result.data.deformation, _x.action_result.result.data.left_fingertip_pad_force, _x.action_result.result.data.right_fingertip_pad_force, _x.action_result.result.data.joint_effort, _x.action_result.result.data.slip_detected, _x.action_result.result.data.deformation_limit_reached, _x.action_result.result.data.fingertip_force_limit_reached, _x.action_result.result.data.gripper_empty, _x.action_result.result.data.rtstate.realtime_controller_state, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_2I4d4Bb3I.unpack(str[start:end])
00576       self.action_result.result.data.slip_detected = bool(self.action_result.result.data.slip_detected)
00577       self.action_result.result.data.deformation_limit_reached = bool(self.action_result.result.data.deformation_limit_reached)
00578       self.action_result.result.data.fingertip_force_limit_reached = bool(self.action_result.result.data.fingertip_force_limit_reached)
00579       self.action_result.result.data.gripper_empty = bool(self.action_result.result.data.gripper_empty)
00580       start = end
00581       end += 4
00582       (length,) = _struct_I.unpack(str[start:end])
00583       start = end
00584       end += length
00585       if python3:
00586         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00587       else:
00588         self.action_feedback.header.frame_id = str[start:end]
00589       _x = self
00590       start = end
00591       end += 8
00592       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00593       start = end
00594       end += 4
00595       (length,) = _struct_I.unpack(str[start:end])
00596       start = end
00597       end += length
00598       if python3:
00599         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00600       else:
00601         self.action_feedback.status.goal_id.id = str[start:end]
00602       start = end
00603       end += 1
00604       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00605       start = end
00606       end += 4
00607       (length,) = _struct_I.unpack(str[start:end])
00608       start = end
00609       end += length
00610       if python3:
00611         self.action_feedback.status.text = str[start:end].decode('utf-8')
00612       else:
00613         self.action_feedback.status.text = str[start:end]
00614       _x = self
00615       start = end
00616       end += 45
00617       (_x.action_feedback.feedback.data.stamp.secs, _x.action_feedback.feedback.data.stamp.nsecs, _x.action_feedback.feedback.data.deformation, _x.action_feedback.feedback.data.left_fingertip_pad_force, _x.action_feedback.feedback.data.right_fingertip_pad_force, _x.action_feedback.feedback.data.joint_effort, _x.action_feedback.feedback.data.slip_detected, _x.action_feedback.feedback.data.deformation_limit_reached, _x.action_feedback.feedback.data.fingertip_force_limit_reached, _x.action_feedback.feedback.data.gripper_empty, _x.action_feedback.feedback.data.rtstate.realtime_controller_state,) = _struct_2I4d4Bb.unpack(str[start:end])
00618       self.action_feedback.feedback.data.slip_detected = bool(self.action_feedback.feedback.data.slip_detected)
00619       self.action_feedback.feedback.data.deformation_limit_reached = bool(self.action_feedback.feedback.data.deformation_limit_reached)
00620       self.action_feedback.feedback.data.fingertip_force_limit_reached = bool(self.action_feedback.feedback.data.fingertip_force_limit_reached)
00621       self.action_feedback.feedback.data.gripper_empty = bool(self.action_feedback.feedback.data.gripper_empty)
00622       return self
00623     except struct.error as e:
00624       raise genpy.DeserializationError(e) #most likely buffer underfill
00625 
00626 _struct_I = genpy.struct_I
00627 _struct_2I4d4Bb3I = struct.Struct("<2I4d4Bb3I")
00628 _struct_3I = struct.Struct("<3I")
00629 _struct_B = struct.Struct("<B")
00630 _struct_2I = struct.Struct("<2I")
00631 _struct_2I4d4Bb = struct.Struct("<2I4d4Bb")


pr2_gripper_sensor_msgs
Author(s): Joe Romano
autogenerated on Mon Oct 6 2014 12:17:32