This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/DLPLCR4500EVM: Unable to build SDK, please help

Part Number: DLPLCR4500EVM
Other Parts Discussed in Thread: TIDA-00254, DLPC350,

Tool/software: TI C/C++ Compiler

Hello,

I am struggling to build the SDK ; I followed all the steps, and had many problems which I managed to solve with the answers to the other threads about building the SDK.

In particular, I had the same problem with the FlyCapture dll files as in this thread, where errors occur in the CMake configure step, to build the DLP ALC SDK.

I downloaded the Point Grey FlyCapture2 full SDK, as advised in the thread answer, and managed to go to the next step : running the make command line. 

That's where I get stuck : At 74%, the build fails as the format of one of the dll files from Point Grey is apparently 'not recognized' (see screenshot, the first 74% do not appear as they were previously successfully built).

I have rigorously followed all the steps from the SDK guide before this one. I run Windows 8.1 with 64 bit OS, x64 processor.

Can you help me out with this ? Thanks for the help !

Tristan

  • Hi Tristan,

    Thanks for your question and welcome to the DLP Forums!

    My guess is that perhaps you downloaded the 64b version of the FlyCapture SDK? We did everything in 32b. Can you download the 32b and try again to see if that fixes your issue?

    -Paul
  • You nailed it, thanks ! It was built successfully with the 32b version
    Just a quick question : I am not sure exactly how to use the SDK now that it is built. Say I want to write a simple code that tells me if the DMD is connected or not, I will want to write some main.cpp with the correct bool function in the main(), but what should I include exactly at the beginning of the file ?

    To make my question clearer : the example cpp files (in the documentation) include header hpp files like "dlp_sdk.hpp", "common/debug.hpp", but I cannot find them in the built SDK directory. What is the correct process ?

  • In general, the SDK is intended for machine vision applications. To answer your question, I would recommend that you take a look at the source code for one of the 3D scanner reference designs, which is included in the SDK (TIDA-00254, etc). Those designs include the functionality you're looking to write and would be a good starting point for you to study from.

    -Paul
  • Thank you for your answer but I am really confused ... it would be great if you could help me by answering very precisely to 2 questions :

    1. Say I am interested in machine vision applications and only need the basic SDK, how can I make it work ? If I write a main.cpp file for my program, what files should I include at the beginning of the cpp ? In the SDK example files, "dlp_sdk.hpp" is included for example, however it is not a file that exists in the built SDK directory .. How should I proceed if I want to re-create one of the SDK examples ?

    This is a big question mark for me : I do not understand how this kit is supposed to be used..

    2. Now, my goal with this is quite simple : I work in a lab, and I want to be able to do what the GUI does without clicking but by controlling it with a program. This means basically controlling what and when the DMD projects, in what sequence, and loading images to the DMD. Can you tell me what tools could enable me to do this ?
  • The SDK is intended to be a starting point for machine vision applications and the source code for our proof of concept implementation of structured light with DLP. The code is specific to each platform, so look in the following directory for code relating to the 4500:
    {installed directory}\DLP_3D_Scanner_SDK\dlp_structured_light_sdk\src\dlp_platforms\lightcrafter_4500

    To control the Lightcrafter remotely, you have two options - USB or I2C. I recommend that you study the DLPC350 programmer's guide for details on the commands and to see examples of how to set up pattern sequences. www.ti.com/.../dlpu010
    We do not have any specific tools out there to do this, but many people have successfully written their own C/Python/Matlab/etc. code to control the Lightcrafter over these interfaces and programmatically accomplish what you are looking for. You can find the source code for the DLPLCR4500EVM in the software bundle which is a good reference for how to communicate with the device.

    -Paul
  • Paul,

    Thanks for your advice, I managed to get started with all this and am trying to understand how to use the SDK. I am trying to use basic functions to interface with the SDK, and tried to use the ProjectSolidWhitePattern and ProjectSolidBlackPattern functions, with the following code (editing the TIDA main.cpp file). There is no error, the connection works fine and the debug messages look good, but I cant see anything on the DMD ... Is there anything wrong ?


    Thanks,
    Tristan

  • Hi Tristan,

    I don't see anything glaringly wrong, but it's difficult to say when it is being applied outside of the TI design. I recommend that you take a close look at how this function is used in the TI Design and make sure that you are setting the right configurations before calling the function.

    Sorry I can't be of more help.

    Paul
  • Oh I was waiting for your answer, but just saw it now ! Thanks for your answer, still did not manage to make it work... But I managed to show black/white patterns by using this code instead (inspired from the definitions of ProjectSolidBlackPattern) :

    I am interested in displaying a sequence of images from flash, while controlling the display moments with the trig in, and understood that this works (by choosing the correct bitplane, and activating Ext_positive triggering) :

    Now, one issue arises when using External trigger with the sdk : at the end of the period time, the DMD displays a black pattern while waiting for the next trigger signal. This is annoying : I want the DMD to display an image when I trigger, and change when the next trigger arrives, without displaying something else (=black) in the meantime. This is possible in the GUI : unchecking the "Clear DMD after exposure" for all patterns does exactly what I want.

    But I understood that the SDK would not work for that : the CreateSendStartSequenceLut function in lcr4500.cpp assigns insert_black bool to true when the trigger source is not Internal. So I changed this to false whenever the function (only this one) wanted to insert a black pattern. I recompiled the SDK, used the new libs to run my main.cpp program. See an example of my changes to lcr4500.cpp :

    Problem, the sequence validation now fails : "Black Vector Missing when exposure less than frame period". This corresponds to an error on the BIT3 of the DLPC350_CheckPatLutValidate result. I have spent a lot of time in the source code of the GUI to understand if there is a trick when trig is ext_pos and insert_black is false simultaneously, but I cant find anything. I dont understand why this works in the GUI and not with my slightly modified SDK.

    Can you please tell me how to proceed to get my result using the SDK ? (and modifying it a bit if necessary)

    Is there a special parameter to set when you want the DMD to keep its pattern while waiting for the trigger input ?

    Thank you very much, your help is very appreciated !

    Tristan

  • Hi Tristan,

    When you tried unchecking "clear DMD after exposure" in the GUI, did you use the same pattern periods and exposure times? The error that you received makes me believe that the exposure/period that you set in your code is too short.

    -Paul
  • Absolutely, period = exposure time works in the GUI. In the code, it is also the same as you can see from the screenshots.
    How could it be too short ? It is 1 second in the code (1 000 000 microseconds), when I have used a lot periods of a few hundreds of us.

    Moreover it worked with these exact parameters before recompiling the SDK, but with a mandatory insert_black parameter imposed by the SDK.

    Tristan

  • Hi Tristan,

    I missed that you set your exposure to 1s in your code - thanks for pointing that out. I don't believe that there is anything special going on in the GUI. Looking at the SDK, I saw the following. Please bear with me because I am not sure which code will exactly apply to your situation, so I'm just brainstorming:

    // If using external trigger and NOT the first pattern, set the
                // previous pattern to clear the DMD after its exposure
                if( (sequence_LUT.size() != 0) &&
                   ((pattern_entry.trigger_type == LCr4500::Pattern::TriggerSource::EXTERNAL_NEGATIVE) ||
                    (pattern_entry.trigger_type == LCr4500::Pattern::TriggerSource::EXTERNAL_POSITIVE))){
                    sequence_LUT.at(sequence_LUT.size()-1).insert_black = true;
                }

    Did you change that last insert_black to false?

    I'm digging into your question and seeing what else I can learn. I'll post back if I've got some for information for you. Would you be able to attach all of your code so that I can take a look at it?

    Thanks,

    Paul

  • Hi Tristan,

    I did a little more digging and the BIT 3 warning that you are receiving is just a warning. If you notice in the GUI, you'll see that the indicator goes yellow meaning that the flag is thrown but that the sequence can proceed. You may need to modify the SDK code to make sure that the flag is ignored.

    Effectively, the flag is used so that users are aware that if they do not put in the black fill, the pattern they set may not be precisely exposed.

    -Paul
  • Indeed, there is a warning in the GUI, but it still works. How can I force the SDK to ignore this warning ? What should I modify ?

    I have changed all the insert_black in the lcr4500.cpp as you can see in the attached file.

    Thanks very much for your help !

    Tristan

    4377.lcr4500.cpp

  • You'll need to modify how your code handles the value returned by "DLPC350_StartPatLutValidate" so that the flagged error doesn't stop anything.

    -Paul

  • Ok, could you please tell me precisely how I need to change the SDK to make it ignore the flagged error ?
    Thanks ! Tristan