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