00001 """autogenerated by genmsg_py from GetAllowedCollisionMatrixRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class GetAllowedCollisionMatrixRequest(roslib.message.Message):
00007 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00008 _type = "planning_environment_msgs/GetAllowedCollisionMatrixRequest"
00009 _has_header = False
00010 _full_text = """
00011 """
00012 __slots__ = []
00013 _slot_types = []
00014
00015 def __init__(self, *args, **kwds):
00016 """
00017 Constructor. Any message fields that are implicitly/explicitly
00018 set to None will be assigned a default value. The recommend
00019 use is keyword arguments as this is more robust to future message
00020 changes. You cannot mix in-order arguments and keyword arguments.
00021
00022 The available fields are:
00023
00024
00025 @param args: complete set of field values, in .msg order
00026 @param kwds: use keyword arguments corresponding to message field names
00027 to set specific fields.
00028 """
00029 if args or kwds:
00030 super(GetAllowedCollisionMatrixRequest, self).__init__(*args, **kwds)
00031
00032 def _get_types(self):
00033 """
00034 internal API method
00035 """
00036 return self._slot_types
00037
00038 def serialize(self, buff):
00039 """
00040 serialize message into buffer
00041 @param buff: buffer
00042 @type buff: StringIO
00043 """
00044 try:
00045 pass
00046 except struct.error, se: self._check_types(se)
00047 except TypeError, te: self._check_types(te)
00048
00049 def deserialize(self, str):
00050 """
00051 unpack serialized message in str into this message instance
00052 @param str: byte array of serialized message
00053 @type str: str
00054 """
00055 try:
00056 end = 0
00057 return self
00058 except struct.error, e:
00059 raise roslib.message.DeserializationError(e)
00060
00061
00062 def serialize_numpy(self, buff, numpy):
00063 """
00064 serialize message with numpy array types into buffer
00065 @param buff: buffer
00066 @type buff: StringIO
00067 @param numpy: numpy python module
00068 @type numpy module
00069 """
00070 try:
00071 pass
00072 except struct.error, se: self._check_types(se)
00073 except TypeError, te: self._check_types(te)
00074
00075 def deserialize_numpy(self, str, numpy):
00076 """
00077 unpack serialized message in str into this message instance using numpy for array types
00078 @param str: byte array of serialized message
00079 @type str: str
00080 @param numpy: numpy python module
00081 @type numpy: module
00082 """
00083 try:
00084 end = 0
00085 return self
00086 except struct.error, e:
00087 raise roslib.message.DeserializationError(e)
00088
00089 _struct_I = roslib.message.struct_I
00090 """autogenerated by genmsg_py from GetAllowedCollisionMatrixResponse.msg. Do not edit."""
00091 import roslib.message
00092 import struct
00093
00094 import planning_environment_msgs.msg
00095
00096 class GetAllowedCollisionMatrixResponse(roslib.message.Message):
00097 _md5sum = "1f99ed5f743c8937d1578d6a9d9f8fda"
00098 _type = "planning_environment_msgs/GetAllowedCollisionMatrixResponse"
00099 _has_header = False
00100 _full_text = """
00101 AllowedCollisionMatrix matrix
00102
00103
00104
00105 ================================================================================
00106 MSG: planning_environment_msgs/AllowedCollisionMatrix
00107 # the list of link names in the matrix
00108 string[] link_names
00109
00110 # the individual entries in the allowed collision matrix
00111 # symmetric, with same order as link_names
00112 AllowedCollisionEntry[] entries
00113
00114 ================================================================================
00115 MSG: planning_environment_msgs/AllowedCollisionEntry
00116 # whether or not collision checking is enabled
00117 bool[] enabled
00118
00119 """
00120 __slots__ = ['matrix']
00121 _slot_types = ['planning_environment_msgs/AllowedCollisionMatrix']
00122
00123 def __init__(self, *args, **kwds):
00124 """
00125 Constructor. Any message fields that are implicitly/explicitly
00126 set to None will be assigned a default value. The recommend
00127 use is keyword arguments as this is more robust to future message
00128 changes. You cannot mix in-order arguments and keyword arguments.
00129
00130 The available fields are:
00131 matrix
00132
00133 @param args: complete set of field values, in .msg order
00134 @param kwds: use keyword arguments corresponding to message field names
00135 to set specific fields.
00136 """
00137 if args or kwds:
00138 super(GetAllowedCollisionMatrixResponse, self).__init__(*args, **kwds)
00139
00140 if self.matrix is None:
00141 self.matrix = planning_environment_msgs.msg.AllowedCollisionMatrix()
00142 else:
00143 self.matrix = planning_environment_msgs.msg.AllowedCollisionMatrix()
00144
00145 def _get_types(self):
00146 """
00147 internal API method
00148 """
00149 return self._slot_types
00150
00151 def serialize(self, buff):
00152 """
00153 serialize message into buffer
00154 @param buff: buffer
00155 @type buff: StringIO
00156 """
00157 try:
00158 length = len(self.matrix.link_names)
00159 buff.write(_struct_I.pack(length))
00160 for val1 in self.matrix.link_names:
00161 length = len(val1)
00162 buff.write(struct.pack('<I%ss'%length, length, val1))
00163 length = len(self.matrix.entries)
00164 buff.write(_struct_I.pack(length))
00165 for val1 in self.matrix.entries:
00166 length = len(val1.enabled)
00167 buff.write(_struct_I.pack(length))
00168 pattern = '<%sB'%length
00169 buff.write(struct.pack(pattern, *val1.enabled))
00170 except struct.error, se: self._check_types(se)
00171 except TypeError, te: self._check_types(te)
00172
00173 def deserialize(self, str):
00174 """
00175 unpack serialized message in str into this message instance
00176 @param str: byte array of serialized message
00177 @type str: str
00178 """
00179 try:
00180 if self.matrix is None:
00181 self.matrix = planning_environment_msgs.msg.AllowedCollisionMatrix()
00182 end = 0
00183 start = end
00184 end += 4
00185 (length,) = _struct_I.unpack(str[start:end])
00186 self.matrix.link_names = []
00187 for i in xrange(0, length):
00188 start = end
00189 end += 4
00190 (length,) = _struct_I.unpack(str[start:end])
00191 start = end
00192 end += length
00193 val1 = str[start:end]
00194 self.matrix.link_names.append(val1)
00195 start = end
00196 end += 4
00197 (length,) = _struct_I.unpack(str[start:end])
00198 self.matrix.entries = []
00199 for i in xrange(0, length):
00200 val1 = planning_environment_msgs.msg.AllowedCollisionEntry()
00201 start = end
00202 end += 4
00203 (length,) = _struct_I.unpack(str[start:end])
00204 pattern = '<%sB'%length
00205 start = end
00206 end += struct.calcsize(pattern)
00207 val1.enabled = struct.unpack(pattern, str[start:end])
00208 val1.enabled = map(bool, val1.enabled)
00209 self.matrix.entries.append(val1)
00210 return self
00211 except struct.error, e:
00212 raise roslib.message.DeserializationError(e)
00213
00214
00215 def serialize_numpy(self, buff, numpy):
00216 """
00217 serialize message with numpy array types into buffer
00218 @param buff: buffer
00219 @type buff: StringIO
00220 @param numpy: numpy python module
00221 @type numpy module
00222 """
00223 try:
00224 length = len(self.matrix.link_names)
00225 buff.write(_struct_I.pack(length))
00226 for val1 in self.matrix.link_names:
00227 length = len(val1)
00228 buff.write(struct.pack('<I%ss'%length, length, val1))
00229 length = len(self.matrix.entries)
00230 buff.write(_struct_I.pack(length))
00231 for val1 in self.matrix.entries:
00232 length = len(val1.enabled)
00233 buff.write(_struct_I.pack(length))
00234 pattern = '<%sB'%length
00235 buff.write(val1.enabled.tostring())
00236 except struct.error, se: self._check_types(se)
00237 except TypeError, te: self._check_types(te)
00238
00239 def deserialize_numpy(self, str, numpy):
00240 """
00241 unpack serialized message in str into this message instance using numpy for array types
00242 @param str: byte array of serialized message
00243 @type str: str
00244 @param numpy: numpy python module
00245 @type numpy: module
00246 """
00247 try:
00248 if self.matrix is None:
00249 self.matrix = planning_environment_msgs.msg.AllowedCollisionMatrix()
00250 end = 0
00251 start = end
00252 end += 4
00253 (length,) = _struct_I.unpack(str[start:end])
00254 self.matrix.link_names = []
00255 for i in xrange(0, length):
00256 start = end
00257 end += 4
00258 (length,) = _struct_I.unpack(str[start:end])
00259 start = end
00260 end += length
00261 val1 = str[start:end]
00262 self.matrix.link_names.append(val1)
00263 start = end
00264 end += 4
00265 (length,) = _struct_I.unpack(str[start:end])
00266 self.matrix.entries = []
00267 for i in xrange(0, length):
00268 val1 = planning_environment_msgs.msg.AllowedCollisionEntry()
00269 start = end
00270 end += 4
00271 (length,) = _struct_I.unpack(str[start:end])
00272 pattern = '<%sB'%length
00273 start = end
00274 end += struct.calcsize(pattern)
00275 val1.enabled = numpy.frombuffer(str[start:end], dtype=numpy.bool, count=length)
00276 val1.enabled = map(bool, val1.enabled)
00277 self.matrix.entries.append(val1)
00278 return self
00279 except struct.error, e:
00280 raise roslib.message.DeserializationError(e)
00281
00282 _struct_I = roslib.message.struct_I
00283 class GetAllowedCollisionMatrix(roslib.message.ServiceDefinition):
00284 _type = 'planning_environment_msgs/GetAllowedCollisionMatrix'
00285 _md5sum = '1f99ed5f743c8937d1578d6a9d9f8fda'
00286 _request_class = GetAllowedCollisionMatrixRequest
00287 _response_class = GetAllowedCollisionMatrixResponse