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