$search
00001 """autogenerated by genmsg_py from StiffPoint.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 00009 class StiffPoint(roslib.message.Message): 00010 _md5sum = "2b6b597656e805a0ca2e1de07dc31a66" 00011 _type = "ee_cart_imped_msgs/StiffPoint" 00012 _has_header = True #flag to mark the presence of a Header object 00013 _full_text = """Header header 00014 #The pose to achieve in the stiffness directions 00015 geometry_msgs/Pose pose 00016 #Wrench or stiffness for each dimension 00017 geometry_msgs/Wrench wrench_or_stiffness 00018 #The following are True if a force/torque should 00019 #be exerted and False if a stiffness should be used. 00020 bool isForceX 00021 bool isForceY 00022 bool isForceZ 00023 bool isTorqueX 00024 bool isTorqueY 00025 bool isTorqueZ 00026 #The time from the start of the trajectory that this 00027 #point should be achieved. 00028 duration time_from_start 00029 ================================================================================ 00030 MSG: std_msgs/Header 00031 # Standard metadata for higher-level stamped data types. 00032 # This is generally used to communicate timestamped data 00033 # in a particular coordinate frame. 00034 # 00035 # sequence ID: consecutively increasing ID 00036 uint32 seq 00037 #Two-integer timestamp that is expressed as: 00038 # * stamp.secs: seconds (stamp_secs) since epoch 00039 # * stamp.nsecs: nanoseconds since stamp_secs 00040 # time-handling sugar is provided by the client library 00041 time stamp 00042 #Frame this data is associated with 00043 # 0: no frame 00044 # 1: global frame 00045 string frame_id 00046 00047 ================================================================================ 00048 MSG: geometry_msgs/Pose 00049 # A representation of pose in free space, composed of postion and orientation. 00050 Point position 00051 Quaternion orientation 00052 00053 ================================================================================ 00054 MSG: geometry_msgs/Point 00055 # This contains the position of a point in free space 00056 float64 x 00057 float64 y 00058 float64 z 00059 00060 ================================================================================ 00061 MSG: geometry_msgs/Quaternion 00062 # This represents an orientation in free space in quaternion form. 00063 00064 float64 x 00065 float64 y 00066 float64 z 00067 float64 w 00068 00069 ================================================================================ 00070 MSG: geometry_msgs/Wrench 00071 # This represents force in free space, seperated into 00072 # it's linear and angular parts. 00073 Vector3 force 00074 Vector3 torque 00075 00076 ================================================================================ 00077 MSG: geometry_msgs/Vector3 00078 # This represents a vector in free space. 00079 00080 float64 x 00081 float64 y 00082 float64 z 00083 """ 00084 __slots__ = ['header','pose','wrench_or_stiffness','isForceX','isForceY','isForceZ','isTorqueX','isTorqueY','isTorqueZ','time_from_start'] 00085 _slot_types = ['Header','geometry_msgs/Pose','geometry_msgs/Wrench','bool','bool','bool','bool','bool','bool','duration'] 00086 00087 def __init__(self, *args, **kwds): 00088 """ 00089 Constructor. Any message fields that are implicitly/explicitly 00090 set to None will be assigned a default value. The recommend 00091 use is keyword arguments as this is more robust to future message 00092 changes. You cannot mix in-order arguments and keyword arguments. 00093 00094 The available fields are: 00095 header,pose,wrench_or_stiffness,isForceX,isForceY,isForceZ,isTorqueX,isTorqueY,isTorqueZ,time_from_start 00096 00097 @param args: complete set of field values, in .msg order 00098 @param kwds: use keyword arguments corresponding to message field names 00099 to set specific fields. 00100 """ 00101 if args or kwds: 00102 super(StiffPoint, self).__init__(*args, **kwds) 00103 #message fields cannot be None, assign default values for those that are 00104 if self.header is None: 00105 self.header = std_msgs.msg._Header.Header() 00106 if self.pose is None: 00107 self.pose = geometry_msgs.msg.Pose() 00108 if self.wrench_or_stiffness is None: 00109 self.wrench_or_stiffness = geometry_msgs.msg.Wrench() 00110 if self.isForceX is None: 00111 self.isForceX = False 00112 if self.isForceY is None: 00113 self.isForceY = False 00114 if self.isForceZ is None: 00115 self.isForceZ = False 00116 if self.isTorqueX is None: 00117 self.isTorqueX = False 00118 if self.isTorqueY is None: 00119 self.isTorqueY = False 00120 if self.isTorqueZ is None: 00121 self.isTorqueZ = False 00122 if self.time_from_start is None: 00123 self.time_from_start = roslib.rostime.Duration() 00124 else: 00125 self.header = std_msgs.msg._Header.Header() 00126 self.pose = geometry_msgs.msg.Pose() 00127 self.wrench_or_stiffness = geometry_msgs.msg.Wrench() 00128 self.isForceX = False 00129 self.isForceY = False 00130 self.isForceZ = False 00131 self.isTorqueX = False 00132 self.isTorqueY = False 00133 self.isTorqueZ = False 00134 self.time_from_start = roslib.rostime.Duration() 00135 00136 def _get_types(self): 00137 """ 00138 internal API method 00139 """ 00140 return self._slot_types 00141 00142 def serialize(self, buff): 00143 """ 00144 serialize message into buffer 00145 @param buff: buffer 00146 @type buff: StringIO 00147 """ 00148 try: 00149 _x = self 00150 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00151 _x = self.header.frame_id 00152 length = len(_x) 00153 buff.write(struct.pack('<I%ss'%length, length, _x)) 00154 _x = self 00155 buff.write(_struct_13d6B2i.pack(_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.wrench_or_stiffness.force.x, _x.wrench_or_stiffness.force.y, _x.wrench_or_stiffness.force.z, _x.wrench_or_stiffness.torque.x, _x.wrench_or_stiffness.torque.y, _x.wrench_or_stiffness.torque.z, _x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ, _x.time_from_start.secs, _x.time_from_start.nsecs)) 00156 except struct.error as se: self._check_types(se) 00157 except TypeError as te: self._check_types(te) 00158 00159 def deserialize(self, str): 00160 """ 00161 unpack serialized message in str into this message instance 00162 @param str: byte array of serialized message 00163 @type str: str 00164 """ 00165 try: 00166 if self.header is None: 00167 self.header = std_msgs.msg._Header.Header() 00168 if self.pose is None: 00169 self.pose = geometry_msgs.msg.Pose() 00170 if self.wrench_or_stiffness is None: 00171 self.wrench_or_stiffness = geometry_msgs.msg.Wrench() 00172 if self.time_from_start is None: 00173 self.time_from_start = roslib.rostime.Duration() 00174 end = 0 00175 _x = self 00176 start = end 00177 end += 12 00178 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00179 start = end 00180 end += 4 00181 (length,) = _struct_I.unpack(str[start:end]) 00182 start = end 00183 end += length 00184 self.header.frame_id = str[start:end] 00185 _x = self 00186 start = end 00187 end += 118 00188 (_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.wrench_or_stiffness.force.x, _x.wrench_or_stiffness.force.y, _x.wrench_or_stiffness.force.z, _x.wrench_or_stiffness.torque.x, _x.wrench_or_stiffness.torque.y, _x.wrench_or_stiffness.torque.z, _x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ, _x.time_from_start.secs, _x.time_from_start.nsecs,) = _struct_13d6B2i.unpack(str[start:end]) 00189 self.isForceX = bool(self.isForceX) 00190 self.isForceY = bool(self.isForceY) 00191 self.isForceZ = bool(self.isForceZ) 00192 self.isTorqueX = bool(self.isTorqueX) 00193 self.isTorqueY = bool(self.isTorqueY) 00194 self.isTorqueZ = bool(self.isTorqueZ) 00195 self.time_from_start.canon() 00196 return self 00197 except struct.error as e: 00198 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00199 00200 00201 def serialize_numpy(self, buff, numpy): 00202 """ 00203 serialize message with numpy array types into buffer 00204 @param buff: buffer 00205 @type buff: StringIO 00206 @param numpy: numpy python module 00207 @type numpy module 00208 """ 00209 try: 00210 _x = self 00211 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00212 _x = self.header.frame_id 00213 length = len(_x) 00214 buff.write(struct.pack('<I%ss'%length, length, _x)) 00215 _x = self 00216 buff.write(_struct_13d6B2i.pack(_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.wrench_or_stiffness.force.x, _x.wrench_or_stiffness.force.y, _x.wrench_or_stiffness.force.z, _x.wrench_or_stiffness.torque.x, _x.wrench_or_stiffness.torque.y, _x.wrench_or_stiffness.torque.z, _x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ, _x.time_from_start.secs, _x.time_from_start.nsecs)) 00217 except struct.error as se: self._check_types(se) 00218 except TypeError as te: self._check_types(te) 00219 00220 def deserialize_numpy(self, str, numpy): 00221 """ 00222 unpack serialized message in str into this message instance using numpy for array types 00223 @param str: byte array of serialized message 00224 @type str: str 00225 @param numpy: numpy python module 00226 @type numpy: module 00227 """ 00228 try: 00229 if self.header is None: 00230 self.header = std_msgs.msg._Header.Header() 00231 if self.pose is None: 00232 self.pose = geometry_msgs.msg.Pose() 00233 if self.wrench_or_stiffness is None: 00234 self.wrench_or_stiffness = geometry_msgs.msg.Wrench() 00235 if self.time_from_start is None: 00236 self.time_from_start = roslib.rostime.Duration() 00237 end = 0 00238 _x = self 00239 start = end 00240 end += 12 00241 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00242 start = end 00243 end += 4 00244 (length,) = _struct_I.unpack(str[start:end]) 00245 start = end 00246 end += length 00247 self.header.frame_id = str[start:end] 00248 _x = self 00249 start = end 00250 end += 118 00251 (_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.wrench_or_stiffness.force.x, _x.wrench_or_stiffness.force.y, _x.wrench_or_stiffness.force.z, _x.wrench_or_stiffness.torque.x, _x.wrench_or_stiffness.torque.y, _x.wrench_or_stiffness.torque.z, _x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ, _x.time_from_start.secs, _x.time_from_start.nsecs,) = _struct_13d6B2i.unpack(str[start:end]) 00252 self.isForceX = bool(self.isForceX) 00253 self.isForceY = bool(self.isForceY) 00254 self.isForceZ = bool(self.isForceZ) 00255 self.isTorqueX = bool(self.isTorqueX) 00256 self.isTorqueY = bool(self.isTorqueY) 00257 self.isTorqueZ = bool(self.isTorqueZ) 00258 self.time_from_start.canon() 00259 return self 00260 except struct.error as e: 00261 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00262 00263 _struct_I = roslib.message.struct_I 00264 _struct_3I = struct.Struct("<3I") 00265 _struct_13d6B2i = struct.Struct("<13d6B2i")