def addCustomConverter(self, converter):
        """ Register a new custom Converter.

            @raise:     rce.error.InternalError,
                        rce.util.interfaces.InterfaceError
        """
        verifyClass(ICustomROSConverter, converter)

        if converter.MESSAGE_TYPE in self._customTypes:
            raise InternalError('There are multiple Converters given for '
                                'message type "{0}".'.format(
                                    converter.MESSAGE_TYPE))

        try:
            pkg, name = package_resource_name(converter.MESSAGE_TYPE)
        except ValueError:
            raise InternalError('msg type is not valid. Has to be of the from '
                                'pkg/msg, i.e. std_msgs/Int8.')

        self._customTypes[converter.MESSAGE_TYPE] = (converter,
            self._loader.loadMsg(pkg, name))
dataset/ETHPy150Open rapyuta/rce/rce-core/rce/util/converter.py/Converter.addCustomConverter/original