36 lines
		
	
	
	
		
			2 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
	
		
			2 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
A tool to send lines to a series of laser projectors (showlasers). Uses the [nannou](https://github.com/nannou-org/nannou) creative coding framework for laser control, and optimisation of the lines before sending them to the DAC.
 | 
						|
 | 
						|
It's still a bit of a hacked-together tool. But it works for my case.
 | 
						|
 | 
						|
## Features
 | 
						|
 | 
						|
* Receive lines over ZMQ. 
 | 
						|
  * Safety feature: stop the output if no lines are received
 | 
						|
* Clipping mask, to mark laser-free zones
 | 
						|
* Homography by simply dragging the corners of the projection area/corner-pin.
 | 
						|
* Change intensity of projected lines.
 | 
						|
* Geometric (pincushion/barrel) correction for x and y axes independently
 | 
						|
  * Particularly x-distortion tends to be present in laser systems due to the independent x/y galvanometer setup.
 | 
						|
* Configuration can be saved to a JSON file.
 | 
						|
* Many of the settings can be configured per DAC.
 | 
						|
* Some pre-defined shapes for debugging purposes.
 | 
						|
 | 
						|
##  Basic idea
 | 
						|
 | 
						|
This tool was initially an adaption of the [laser_frame_stream_gui.rs example code](https://github.com/nannou-org/nannou/blob/master/examples/laser/laser_frame_stream.rs) to enable projection mapping of a large space, which required multiple lasers. Received lines are assumed to be in world-space coordinates. The space is mapped to distinct laser DACs by means of homography/corner-pinning and various geometric correction parameters.
 | 
						|
 | 
						|
By using ZMQ as input, the mapping of the lines is decoupled from the generation code. In my own setup ([trap](https://git.rubenvandeven.com/security_vision/trap)) the lines are generated by means of a sequence of Python scripts.
 | 
						|
 | 
						|

 | 
						|

 | 
						|

 | 
						|
 | 
						|
<video controls="" src="/security_vision/laserspace/raw/branch/main/assets/screenshots/laserspace-demo.mp4">
 | 
						|
  <strong>Your browser does not support the HTML5 "video" tag.</strong>
 | 
						|
</video>
 | 
						|
 | 
						|
## Usage
 | 
						|
 | 
						|
```bash
 | 
						|
cargo run ZMQ_QUEUE_ADDRESS
 | 
						|
```
 |