Skip to content

HS-Kempten/relign

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Relign

Relign is a Python software for simulating the active alignment of optical systems. More precisely, Relign can be used to analyze the sensor output of multi-lens systems by changing the relative alignment to the sensor. It also offers an interface for reinforcement learning algorithms to well-known open source libraries such as Gymnasium and Stable-Baselines.

An example of a trained RL agent, aligning a lens system with two lenses within 10 steps can be seen here:

til

The methodology and results are detailed in our paper, that is currently under review and available as a preprint on arXiv:2503.02075.

Getting Started

Prerequisites

Ensure you have the following installed:

  • Python 3.10+
  • pip

Installation

Once cloned, install the package with:

pip install .
pip install .[dev]

Run the tests

pytest

Build the docs

Run

mkdocs serve

to build and serve the docs locally.

Environment

To familiarize yourself with using the environment for your own algorithms, see docs/getting_started.ipynb.

Training a Model

To start training a model, use the scripts/train.py script. You can customize the training parameters using command-line options.

Example Command

python3 scripts/train.py --env="la" --model=PPO \
    --learning-rate=1e-3 --ent-coef=0.01 \
    --benchmark="b_OD_N000_256"

Citation

@misc{burkhardt2025relign,
      title={Active Alignments of Lens Systems with Reinforcement Learning}, 
      author={Matthias Burkhardt and Tobias Schmähling and Pascal Stegmann and Michael Layh and Tobias Windisch},
      year={2025},
      eprint={2503.02075},
      archivePrefix={arXiv},
      primaryClass={cs.RO},
      url={https://arxiv.org/abs/2503.02075}, 
}

Funding

BMFTR
This work was funded by the German Federal Ministry of Research, Technology and Space (BMFTR) under grant number 13FH605KX2.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •