« Safe Hacking

OpenLase hardware and simulator

I apologize for taking this long to post this! I’ve been busy non-stop since 27c3 and never got a chance to get around to it. Finally, though, here it is: the description of the Mark 1 laser projector that I use with OpenLase.

But wait, there’s more! If you don’t have the hardware and don’t want to build it, or you want to try out OpenLase, or you want to be able to mess around with it on the go, you can now do that. There’s a new OpenGL-based simulator in the OpenLase tree. It works off of the JACK data (so you still need JACK) and it tries to simulate the dynamics of my laser scanner, including brightness effects and some of the physical limitations of the galvos. Here’s a comparison of the simulator vs. the real thing:

I’m aware that documentation on the software is still sorely lacking. Please bear with me while I get my act together and write that up spacer

This entry was posted on Monday, January 31st, 2011 at 8:48 pm and is filed under Electronics, Hacks. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

34 Responses to “OpenLase hardware and simulator”

  1. Tweets that mention Abort, Retry, Hack? » Blog Archive » OpenLase hardware and simulator -- Topsy.com Says:
    January 31st, 2011 at 9:08 pm

    [...] This post was mentioned on Twitter by Mohamed Ik Boulabiar, Hector Martin. Hector Martin said: Sorry for taking this long! OpenLase hardware description is up: goo.gl/G8crS [...]

  2. spacer Squall Says:
    January 31st, 2011 at 9:13 pm

    LOL
    you´re anmie freak.
    Love your Project, but may a little bit to expensive for me
    :-/

  3. spacer Nathan Fearnley Says:
    January 31st, 2011 at 9:27 pm

    Really cool work. I had some fun toying with the simulator but I took me a bit to get it to compile. Would you be willing to post some more information on which libraries you are using to build it? It would make the job of working on it a lot easier.

  4. spacer Federico Says:
    February 1st, 2011 at 11:56 am

    Hey!

    I’m not going to use laser anytime soon, but your work is simply SUPERB and a pleasure to read about!

  5. spacer Andreas Says:
    February 1st, 2011 at 3:53 pm

    What is that (awesome) soundtrack?

  6. Abort, Retry, Hack? » Blog Archive » OpenLase: open realtime laser graphics Says:
    February 2nd, 2011 at 5:48 pm

    [...] see this post for hardware info and also a new GL laser simulator for those without [...]

  7. spacer marcan Says:
    February 2nd, 2011 at 5:51 pm

    @Nathan

    The dependencies are straightforward: cmake, JACK, ffmpeg (for playvid and the slides), ALSA (only for midiview), Qt4 (output processor only), and Python2.x for some scripts. The usual cmake build process applies: $ mkdir build && cd build && cmake .. && make (or similar).

    It should also build with very minor changes on OSX (just comment out the midiview target, since that needs ALSA for MIDI). Windows is more of a challenge but I know one enterprising soul who did manage to get most of it built there.

    @Andreas
    The source video/soundtrack is Marisa Stole the Precious Thing by IOSYS. The video is automatically traced by playvid spacer

  8. spacer jorrick Says:
    February 9th, 2011 at 7:42 pm

    I dont realy understand whats so fascinating about this?
    I dont mean to be rude, but i dont know/understand what purpose this has? what can i be used for and why is it being developed?

  9. spacer Kendrick Eastes Says:
    March 10th, 2011 at 7:14 am

    @jorrick its a DIY laser projector, and its associated software. not all of us have several hundred to shell a professional laser projector, or jsut want to build our own for geek cred, a hobby, or WTH value.

    @marcan more project touhou? also exelent work, looking forward to more.

  10. spacer kelly Says:
    March 27th, 2011 at 12:02 am

    www.marcansoft.com

  11. spacer Milarepa Says:
    April 5th, 2011 at 2:52 pm

    Hey there!
    Thanks for sharing your awe inspiring work, I was so knocked off my socks from your presentation that I went ahead and bought the same Galvo set from Ebay and the same soundcard from Dealextreme in order to make a laser projector of my own. The build process will be documented on my site when the parts arrive.
    Hope you will share some more of that glorious software of yours!

    Thanks again!

  12. spacer Eshat Says:
    May 15th, 2011 at 10:53 am

    I just had the pleasure to see some of your work yesterday on the LinuxTag in Berlin. It’s very impressive.
    Keep up the good work, that you share with others.

  13. spacer Volker Says:
    May 19th, 2011 at 12:29 am

    I also had the chance and pleasure to see talk and presentation at LinuxTag. This was REALLY cool! Thanks for sharing this with us !!!

  14. spacer iridium tracker Says:
    May 30th, 2011 at 9:39 am

    hola hector, I wonder if you can help me find out how to solve this error when running make:
    gracias!

    [ 42%] Generating moc_qplayvid_gui.cxx
    Scanning dependencies of target qplayvid
    [ 44%] Building C object tools/qplayvid/CMakeFiles/qplayvid.dir/qplayvid.c.o
    /home/alejo/Desktop/openlase/openlase/tools/qplayvid/qplayvid.c: In function ‘decode_audio’:
    /home/alejo/Desktop/openlase/openlase/tools/qplayvid/qplayvid.c:130:2: warning: implicit declaration of function ‘avcodec_decode_audio3’
    /home/alejo/Desktop/openlase/openlase/tools/qplayvid/qplayvid.c: In function ‘decode_video’:
    /home/alejo/Desktop/openlase/openlase/tools/qplayvid/qplayvid.c:197:2: warning: implicit declaration of function ‘avcodec_decode_video2’
    /home/alejo/Desktop/openlase/openlase/tools/qplayvid/qplayvid.c: In function ‘decoder_init’:
    /home/alejo/Desktop/openlase/openlase/tools/qplayvid/qplayvid.c:428:2: warning: implicit declaration of function ‘av_audio_resample_init’
    /home/alejo/Desktop/openlase/openlase/tools/qplayvid/qplayvid.c:428:19: warning: assignment makes pointer from integer without a cast
    /home/alejo/Desktop/openlase/openlase/tools/qplayvid/qplayvid.c:437:2: warning: implicit declaration of function ‘av_get_bits_per_sample_fmt’
    /home/alejo/Desktop/openlase/openlase/tools/qplayvid/qplayvid.c: In function ‘display_thread’:
    /home/alejo/Desktop/openlase/openlase/tools/qplayvid/qplayvid.c:677:44: error: ‘AVStream’ has no member named ‘sample_aspect_ratio’
    make[2]: *** [tools/qplayvid/CMakeFiles/qplayvid.dir/qplayvid.c.o] Error 1
    make[1]: *** [tools/qplayvid/CMakeFiles/qplayvid.dir/all] Error 2
    make: *** [all] Error 2

  15. spacer Wolfman_123_ Says:
    June 4th, 2011 at 6:02 am

    I’m stuck with a few errors while trying to compile this, is there any chance someone could tell me all of the required packages for this and how to fix the cmake asm ysm compiler notfound error
    Here is an error log

    – Found JACK
    – Found FFMPEG: /usr/lib/libavcodec.so;/usr/lib/libavutil.so /usr/include
    – Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
    – Didn’t find assembler
    – Loaded CMakeASM_YASMInformation – ASM_YASM support is still experimental, please report issues
    CMake Error: your ASM_YASM compiler: “CMAKE_ASM_YASM_COMPILER-NOTFOUND” was not found. Please set CMAKE_ASM_YASM_COMPILER to a valid compiler path or name.– Will NOT build simulator (OpenGL or GLUT missing)
    – Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
    – Will NOT build python bindings (python libs or cython missing)
    – Will NOT build 27c3_slides (curses or FFmpeg missing)
    – Configuring incomplete, errors occurred!

    Make Error: your ASM_YASM compiler: “CMAKE_ASM_YASM_COMPILER-NOTFOUND” was not found. Please set CMAKE_ASM_YASM_COMPILER to a valid compiler path or name.

  16. spacer marcan Says:
    June 13th, 2011 at 8:44 pm

    @iridium tracker:

    You need a newer FFMpeg (or libav). Currently the check isn’t specific enough for it to fail while configuring instead of while building.

    @Wolfman_123_

    As the output you pasted says, you need yasm, ncurses, python, opengl, GLUT, cython. Some of those are optional and just will cause the relevant portion not to be built, but at the very least yasm is mandatory (it probably won’t be in the future). You need the -dev packages for the libs (everything except yasm and cython in that list). The specific names vary by distro so I can’t give you a concrete list of packages to install, just search for those names in your package manager and you should be able to work them out.

  17. spacer Wolfman_123_ Says:
    June 14th, 2011 at 4:00 am

    Alright thanks for the help so far, got everything working so far except curses. I can’t seem to find the right curses package, I’m running a 10.04 Ubuntu 32bit with synaptic package manager

  18. spacer David Says:
    September 24th, 2011 at 8:06 pm

    Hi Hector,

    I’m trying to compile on OSX. I’ve commented out the ALSA dependency in the cmakelists file, but cmake is still unhappy and I’m not sure why. Any hints? I’m kind of new to cmake. Thanks…

    Found JACK
    Looking for Q_WS_X11
    Looking for Q_WS_X11 – not found.
    Looking for Q_WS_WIN
    Looking for Q_WS_WIN – not found.
    Looking for Q_WS_QWS
    Looking for Q_WS_QWS – not found.
    Looking for Q_WS_MAC
    Looking for Q_WS_MAC – found
    Looking for QT_MAC_USE_COCOA
    Looking for QT_MAC_USE_COCOA – found
    Found Qt-Version 4.7.4 (using /usr/local/bin/qmake)
    Found FFMPEG: /usr/local/Cellar/ffmpeg/0.8.2/lib/libavcodec.dylib;/usr/local/Cellar/ffmpeg/0.8.2/lib/libavformat.dylib;/usr/local/Cellar/ffmpeg/0.8.2/lib/libavutil.dylib /usr/local/Cellar/ffmpeg/0.8.2/include
    CMake Error at libol/CMakeLists.txt:20 (check_function_exists):
    Unknown CMake command “check_function_exists”.

  19. spacer Matias Wilkman Says:
    October 4th, 2011 at 10:36 pm

    Hi,
    I am in a position where I have a Minilumax USB-ILDA-adapter ( www.lumax.de/ ) that’s being used in conjunction with another software suite ( vvvv.org/ ). I would like to use your laser simulator to test this rig – so, I guess I’d need to go from ILDA to audio input & use this as the JACK source. Do you have any advice to give? The pinout for the device is available on the website (standard ILDA).
    Or, do you think it’d be better to go for a different approach altogether – like transmitting the ILDA data over a network & patching together something to feed it to OpenLase? Again, any suggestions on this?

  20. spacer Cristiano Says:
    October 7th, 2011 at 11:38 am

    Love it man! But I showed my Jap wife, and she thought it was shite! She said you should get a job in a club! I guess we have different tastes my wife and I!!!

  21. spacer Karen Says:
    March 8th, 2012 at 5:37 am

    I’m using JACK (2) with the simulator. The simulator window pops up, but I don’t see anything when I run the demos.

    I’m starting jacks as jackd -r -d dummy

    When I put a printf method to output x, y, and g samples inside of process, it just continuously prints zero, regardless of what example app I’m runing.

    Do you have any idea what may be my issue? Thanks!

  22. spacer Karen Says:
    March 8th, 2012 at 5:38 am

    I forgot to mention that I am using Ubuntu 11.10.

  23. spacer David Says:
    March 24th, 2012 at 1:24 am

    @Karen: Did you open QjackCtl and make the proper connections?

    click on Connect>i.imgur.com/NbYt4.png

    Then drag and drop the items from the left to the right> i.imgur.com/9nh2r.png

  24. spacer Karen Says:
    March 25th, 2012 at 3:23 am

    Nope. Now it works! Huzza. I’ve been fighting that for hours upon hours! Thanks

  25. spacer David Says:
    March 26th, 2012 at 4:36 am

    What are all the necessary packages to successfully cmake and make openlase project in ubuntu 11.10?

  26. spacer Skappy Says:
    March 26th, 2012 at 12:40 pm

    Dear All,

    Hardware is now ready but no test available as I’m not able to install all the packages under Ubuntu system. May I ask you if somebody can told people like me how to install all the needed files. I think that it will be useful for lot of users.
    I do not understand how to work with cmake, what to do with python files .
    Thank you very much for your help.
    Have a nice day
    Skappy

  27. spacer Karen Says:
    March 30th, 2012 at 3:22 am

    David, I’m sorry to say I didn’t keep track of the packages. I really wish I had now. My suggestion is to build it, look at what it complains that it is missing, then search through the synaptic package manager to install .. then try again! That’s what I did.

  28. spacer David Says:
    March 30th, 2012 at 4:57 am

    Karen> Yeah, thats what I did too, but it took a while to find out all the needed packages. I was thinking of writing a post about this, so others wouldnt have to hassle that much.

    Is there a way to contact you? I am working on this for a school project and I’m having a few issues, maybe I could be of help as well.

  29. spacer Skappy Says:
    March 30th, 2012 at 10:21 am

    Hi everybody,

    Karen & David,

    Here is a starting list …

    sudo apt-get install git-core
    sudo apt-get install cmake
    sudo apt-get install jack
    sudo apt-get install jackd
    sudo apt-get install libjack-dev
    sudo apt-get install yasm
    sudo apt-get install libncurses-dev
    sudo apt-get install libasound2-dev
    sudo apt-get install freeglut3-dev
    sudo apt-get install libglew1.5-dev
    sudo apt-get install libxmu-dev libxi-dev

    Installation of jack and jackd do not run correctly under Ubuntu 11.10… (could not find corresponding packets )

    I also encounter some difficulties with cmake -G command…
    May I have some help please ?
    Thank you very much
    Skappy

  30. spacer David Says:
    April 1st, 2012 at 7:53 am

    Hello,
    Adding to what skappy said, im trying to make a list of steps to configure openlase

    While inside openlase dir, run
    $cmake CmakeList.txt

    if some errors appear, try to install/configure the packages needed, such as>

    jack jackd libav libjack-dev python-dev libglut-dev cython libncurses-dev libasound2-dev yasm ffmpeg qjackqtl libxmu-dev libxi-dev qt4-core libavformat-dev libavformat-extra-53

    *If after you installed libncurses-dev it still shows an error that it can’t find curses, edit /usr/share/cmake-2.8/Modules/FindCurses.cmake and change this line:
    SET(CURSES_USE_NCURSES FALSE)
    to
    SET(CURSES_USE_NCURSES TRUE)

    Then, if the cmake works, run:
    $make

    and all the files and libraries should be compiled

    ———————

    In order to make jack work:

    $sudo apt-get install jackd qjackctl libjack-dev

    Then in /etc/security/limits.conf add
    @audio -rtprio 99
    @audio -memlock unlimited
    @audio -nice -19

    Then create group audio and add your user to it
    $sudo groupadd audio
    $sudo usermod -a -G audio

    Then you can run QjackCtl in order to start/stop/configure the jack server. In order to make it work with the openlase simulator, you have to set the sample rate to a multiple of 1000, so in config, change the sample rate to 48000 i.imgur.com/x68K1.png

  31. spacer David Says:
    April 1st, 2012 at 7:57 am

    I am having issues trying to use the external usb sound card with jack, when I try to run the server, i get this error:

    pastebin.com/pK8PxHCX

    Summary:
    DRIVER NT: could not start driver
    cannot start driver
    no message buffer overruns
    00:55:18.393 JACK was stopped successfully.

    Note: I already have this package installed
    linux-headers-alsa-driver-3.0.0-15-generic

    any help?

  32. spacer David Says:
    April 12th, 2012 at 8:50 am

    @Marcan advised me to change the ‘Audio’ setting in QjackCtl to Playback Only, and it worked. Here is my working configuration i.imgur.com/sSoHL.png

  33. spacer Skappy Says:
    April 19th, 2012 at 7:37 am

    Hi David,
    Thank you very much for your help.
    The simulator is now running fine, I’m just trying to connect the USB sound-card in order to test Openlase in real condition but as I’m a newbie in Ubuntu I’m encountering problem with the limits.conf file. I can not save the modified files, the “save” option is disabled. I’ve try to cut and paste the file but it also doesn’t work. I do not know how to change the status of the user in Ubuntu. I think that only admin or super user could save the modification.
    Do you have any idea ?
    Thank you very much
    Have a nice day

  34. spacer Skappy Says:
    April 20th, 2012 at 9:03 am

    Sorry to have disturbed you David

    Everything seems to be ok now concerning the modification of limits.conf.

    One more step forward !

Leave a Reply


gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.