udaan.utils package¶
Subpackages¶
Submodules¶
Module contents¶
Utility functions and classes for Udaan.
- class udaan.utils.Flat2State[source]¶
Bases:
objectDifferential flatness maps for quadrotor and quadrotor-payload systems.
- class udaan.utils.LoggerMixin[source]¶
Bases:
objectMixin class providing logging capabilities to classes.
Inherit from this mixin to get a _logger property that returns a logger named after the class.
Example
>>> class MyController(LoggerMixin): ... def compute(self): ... self._logger.debug("Computing...")
- udaan.utils.get_logger(name)[source]¶
Get a logger for the given module name.
- Parameters:
name (
str) – Module name, typically __name__.- Return type:
- Returns:
Logger instance under the udaan namespace.
Example
>>> logger = get_logger(__name__) >>> logger.info("Message")
- udaan.utils.setup_logging(level=20, format_string=None, stream=None, color=None)[source]¶
Configure logging for interactive use.
Call this function to enable logging output from Udaan. By default, the library produces no output (NullHandler).
- Parameters:
- Return type:
Example
>>> import logging >>> from udaan.utils.logging import setup_logging >>> setup_logging() # Enable INFO level with colors >>> setup_logging(level=logging.DEBUG) # Enable debug