self_driving_lab_demo package

Subpackages

Submodules

self_driving_lab_demo.cli module

self_driving_lab_demo.cli.check_files(path, extension)[source]
self_driving_lab_demo.cli.check_path(path, extension)[source]
self_driving_lab_demo.cli.check_save_dir(save_dir)[source]

self_driving_lab_demo.core module

This is a skeleton file that can serve as a starting point for a Python console script. To run this script uncomment the following lines in the [options.entry_points] section in setup.cfg:

console_scripts =
     fibonacci = ${package}.skeleton:run

Then run pip install . (or pip install -e . for editable mode) which will install the command fibonacci inside your current environment.

Besides console scripts, the header (i.e. until _logger…) of this file can also be used as template for Python modules.

Note

This file can be renamed depending on your needs or safely removed if not needed.

References

class self_driving_lab_demo.core.SDLSimulation(*args, **kwargs)[source]

Bases: SelfDrivingLabDemo

observe_sensor_data(parameters)[source]
class self_driving_lab_demo.core.SelfDrivingLabDemo(random_rng=Generator(PCG64) at 0x710F29936DC0, target_seed=604523, target_inputs=None, rest_seconds=0.0, max_power=0.35, autoload=False, simulation=False, simulator=<self_driving_lab_demo.core.SensorSimulator object>, observe_sensor_data_fn=<function mqtt_observe_sensor_data>, observe_sensor_data_kwargs={})[source]

Bases: object

property bounds
evaluate(parameters)[source]
get_random_inputs(rng=None)[source]
get_target_inputs()[source]
observe_sensor_data(parameters)[source]
observe_target_results()[source]
property parameters
simulate_sensor_data(parameters)[source]
class self_driving_lab_demo.core.SensorSimulator[source]

Bases: object

simulate_sensor_data(parameters)[source]
self_driving_lab_demo.core.fib(n)[source]

Fibonacci example function

This isn’t actually used in this package; it’s just for demonstration purposes (e.g., running tests, CLI).

Parameters:

n (int) – integer

Returns:

n-th Fibonacci number

Return type:

int

self_driving_lab_demo.core.setup_logging(loglevel)[source]

Setup basic logging

Parameters:

loglevel (int) – minimum loglevel for emitting messages

Module contents

class self_driving_lab_demo.SelfDrivingLabDemo(random_rng=Generator(PCG64) at 0x710F29936DC0, target_seed=604523, target_inputs=None, rest_seconds=0.0, max_power=0.35, autoload=False, simulation=False, simulator=<self_driving_lab_demo.core.SensorSimulator object>, observe_sensor_data_fn=<function mqtt_observe_sensor_data>, observe_sensor_data_kwargs={})[source]

Bases: object

property bounds
evaluate(parameters)[source]
get_random_inputs(rng=None)[source]
get_target_inputs()[source]
observe_sensor_data(parameters)[source]
observe_target_results()[source]
property parameters
simulate_sensor_data(parameters)[source]
class self_driving_lab_demo.SelfDrivingLabDemoLight(random_rng=Generator(PCG64) at 0x710F1C832F80, target_seed=604523, target_inputs=None, rest_seconds=0.0, max_power=0.35, autoload=False, simulation=False, simulator=<self_driving_lab_demo.demos.light.SensorSimulatorLight object>, observe_sensor_data_fn=<function mqtt_observe_sensor_data>, observe_sensor_data_kwargs={})[source]

Bases: SelfDrivingLabDemo

property bounds
property channel_names
property channel_wavelengths
property channel_wavelengths_mean_fwhm
clear()[source]
evaluate(parameters)[source]
get_random_inputs(rng=None)[source]
property parameters
class self_driving_lab_demo.SelfDrivingLabDemoLiquid(random_rng=Generator(PCG64) at 0x710F1C874D60, target_seed=604523, rest_seconds=0.0, max_power=0.35, autoload=False, simulation=False, simulator=<self_driving_lab_demo.demos.liquid.SensorSimulatorLiquid object>, observe_sensor_data_fn=<function liquid_observe_sensor_data>, observe_sensor_data_kwargs={})[source]

Bases: SelfDrivingLabDemo

property bounds
property channel_names
property channel_wavelengths
property channel_wavelengths_mean_fwhm
clear()[source]
evaluate(parameters)[source]
get_random_inputs(rng=None)[source]
property parameters
class self_driving_lab_demo.SensorSimulator[source]

Bases: object

simulate_sensor_data(parameters)[source]
class self_driving_lab_demo.SensorSimulatorLight[source]

Bases: SensorSimulator

property channel_hex_colors
property channel_wavelengths
create_interpolator(fname)[source]
simulate_sensor_data(parameters)[source]
class self_driving_lab_demo.SensorSimulatorLiquid[source]

Bases: SensorSimulator

property channel_hex_colors
property channel_wavelengths
create_interpolator(fname)[source]
simulate_sensor_data(parameters)[source]
self_driving_lab_demo.get_paho_client(sensor_topic, username=None, password=None, hostname=None, port=8883, tls=True)[source]
self_driving_lab_demo.liquid_observe_sensor_data(R: float, Y: float, B: float, water: float = 0.0, prerinse_power: float = 0.5, prerinse_time: float = 20.0, runtime: float = 10.0, atime: int = 100, astep: int = 999, gain: int | float = 128, pico_id=None, session_id=None, timeout=3600, queue_timeout=60, client=None, username: str | None = None, password: str | None = None, hostname=None, port=8883, tls=True)[source]
self_driving_lab_demo.mqtt_observe_sensor_data(R: int, G: int, B: int, atime: int = 100, astep: int = 999, gain: int | float = 128, pico_id: str | None = None, session_id: str | None = None, timeout: int = 3600, queue_timeout: int = 60, client=None, username: str | None = None, password: str | None = None, hostname=None, port=8883, tls=True, mongodb=True, extra_info: dict | None = None)[source]
self_driving_lab_demo.pico_server_observe_sensor_data(R: int, G: int, B: int, atime: int = 100, astep: int = 999, gain: int = 128, url='http://192.168.0.111/')[source]