frankaemika / libfranka

C++ library for Franka research robots
https://frankaemika.github.io
Apache License 2.0
221 stars 147 forks source link

Can't build libfranka in Windows #83

Open dborro opened 3 years ago

dborro commented 3 years ago

I tried to compile and build libfranka in Windows 10 using Visual Studio 2019 but I have the following error:

Description: 'Poco::Foundation-NOTFOUND', needed by 'franka.dll', missing and no known rule to make it Project: C:\src\vcpkg\libfranka\out\build\x64-Debug\libfranka File: C:\src\vcpkg\libfranka\out\build\x64-Debug\ninja

I followed all the instructions for windows (https://frankaemika.github.io/docs/installation_windows.html) but in the last step (building), it seems the project can't locate the path to poco. I also tried to put directly dll files into the chosen build root (as the instructions say) but with the same error.

THELUOHAO commented 3 years ago

it is just the problem of the wrong path. please ensure the right path can be found by a compiler. but how to combine the libfranka and the frame of MFC project. it really fuzzy me. Maybe we could have a discussion.

avadhutmali999 commented 1 year ago

Facing a same issue. Please guide if someone has solved it already. Need it on URGENT basis. Please HELP.

avadhutmali999 commented 1 year ago

Solved the issue partially ,check whether it works for you.

  1. Install vcpkg using administrator CMD prompt only.
  2. Install eigen3 and poco as installed earlier (This too with ADMINISTRATOR CMD prompt).
  3. Enter this line in command prompt "vcpkg integrate install" .
  4. Open CMakelists.txt file in note pad, and set "BUILD_test" to OFF.
  5. Save the Cmakelists.txt file.
  6. Follow the remaining instructions for Visual Studio as per franka documentation and build libfranka accordingly.
  7. Franka.dll and pocoNetd.dll file will be placed in libfranka\out\build..
  8. Copy paste these files to - your directory\libfranka\out\build\examples

Now You'll be able to run the examples.

fcc315 commented 1 year ago

Solved the issue partially ,check whether it works for you.

  1. Install vcpkg using administrator CMD prompt only.
  2. Install eigen3 and poco as installed earlier.
  3. Enter this line in command prompt "vcpkg integrate install" .
  4. Open CMakelists.txt file in note pad, and set "BUILD_test" to OFF.
  5. Save the Cmakelists.txt file.
  6. Follow the remaining instructions for Visual Studio as per franka documentation and build libfranka accordingly.
  7. Franka.dll and pocoNetd.dll file will be placed in libfranka\out\build..
  8. Copy paste these files to C:\windows\System32.

Now You'll be able to run the examples.

Your answer is very helpful, thanks! Following your steps, I still have an error. There is some lines relate to Debian package in CMakeLists.txt line 183-191. Do you have this problem and how to solve this?

avadhutmali999 commented 1 year ago

Solved the issue partially ,check whether it works for you.

  1. Install vcpkg using administrator CMD prompt only.
  2. Install eigen3 and poco as installed earlier.
  3. Enter this line in command prompt "vcpkg integrate install" .
  4. Open CMakelists.txt file in note pad, and set "BUILD_test" to OFF.
  5. Save the Cmakelists.txt file.
  6. Follow the remaining instructions for Visual Studio as per franka documentation and build libfranka accordingly.
  7. Franka.dll and pocoNetd.dll file will be placed in libfranka\out\build..
  8. Copy paste these files to C:\windows\System32.

Now You'll be able to run the examples.

Your answer is very helpful, thanks! Following your steps, I still have an error. There is some lines relate to Debian package in CMakeLists.txt line 183-191. Do you have this problem and how to solve this?

Can you elaborate the error with snapshots? as I haven't encountered such errors.

fcc315 commented 1 year ago

Can you elaborate the error with snapshots? as I haven't encountered such errors.

Hey I attached a snapshot. These lines can be found in CMakeLists.txt in libfranka folder. I wonder what these are used for. I comment out them and compiled successfully.

Capture

avadhutmali999 commented 1 year ago

Not sure what it means as I am working only on windows. Nevertheless if you are able to get the BUILD its totally fine to comment out these. Also I need some help with building my own code for PANDA Robot, getting a few issues using CMake, could you please help me out?

fcc315 commented 1 year ago

Not sure what it means as I am working only on windows. Nevertheless if you are able to get the BUILD its totally fine to comment out these. Also I need some help with building my own code for PANDA Robot, getting a few issues using CMake, could you please help me out?

sure. you can list your issues here and let's see. I am also working on windows, let's see what I can help

Zahras17 commented 1 year ago

Hi, I want to start programming the Panda robot. Since you already have installed libfranka on windows, I wanted to make sure if this method works appropriately or if I should go for the Linux-based approach. Any advice based on your experience could be helpful. Thanks in advance for your response.

avadhutmali999 commented 1 year ago

Yes, the approach i have followed works perfectly. Please make sure you have full access to internet. Using proxy can cause issues sometimes. Connect to me if you face any issues.

On Tue, 28 Feb, 2023, 1:36 am Zahra Safari, @.***> wrote:

Hi, I want to start programming the Panda robot. Since you already have installed libfranka on windows, I wanted to make sure if this method works appropriately or if I should go for the Linux-based approach. Any advice based on your experience could be helpful. Thanks in advance for your response.

— Reply to this email directly, view it on GitHub https://github.com/frankaemika/libfranka/issues/83#issuecomment-1447006872, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASFW4KDOQVS4A4L4PCOK6ATWZUCNTANCNFSM4TGWGGLQ . You are receiving this because you commented.Message ID: @.***>

Zahras17 commented 1 year ago

Couldn't find Poco

I've tried to follow the installation steps on windows (https://www.franka.cn/FCI/installation_windows.html). When I installed Poco I received the successful installation message:

Computing installation plan... The following packages are already installed: poco[core]:x86-windows -> 1.12.4#4 poco:x86-windows is already installed

However, when I opened the CmakLists in VS, I got this error and could not generate the CMakeSettings.json:

Severity Code Description Project File Line Suppression State Error CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Poco (missing: Poco_INCLUDE_DIR Poco_LIBRARIES Net Foundation) C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake 230

I tried to use the Developer Command Prompt for VS to build libfranka as well but I got this error:

`-- The CXX compiler identification is MSVC 19.35.32216.1 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx86/x86/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Poco (missing: Poco_INCLUDE_DIR Poco_LIBRARIES Net Foundation) Call Stack (most recent call first): C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) cmake/FindPoco.cmake:27 (find_package_handle_standard_args) CMakeLists.txt:28 (find_package)

-- Configuring incomplete, errors occurred! See also "C:/Users/zsafa/Desktop/Zahra/vcpkg/libfranka/build/CMakeFiles/CMakeOutput.log"`

Any help is appreciated!

avadhutmali999 commented 1 year ago

Try following these steps once and let me know if it solves the issue. https://github.com/frankaemika/libfranka/issues/102#issuecomment-1492554875

If it doesn't, try deleting vcpkg folder completely, freshly clone vcpkg and while installing poco and eigen3, use the commands 'vcpkg install eigen3:x64-windows' & 'vcpkg install poco:x64-windows' to avoid clashes with x86 based packages as other versions are not necessary if you have x64 based OS.

Zahras17 commented 1 year ago

Many thanks for your response. I tried the steps in the link and also installed again the vcpkg, Eigen3, and Poco as you mentioned. Now I receive this error:

CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Poco (missing: Poco_INCLUDE_DIR Poco_LIBRARIES Net Foundation)

I would be grateful for any support you can provide.

avadhutmali999 commented 1 year ago

Check whether there are any folders visible in following directory = path to vcpkg\installed\x64-windows\share A dedicated folder for POCO should be visible. If not, there is issue with your internet connection, i.e., you don't have full access to internet. Try using a different system once.

Zahras17 commented 1 year ago

Thanks for your fast reply. There is a folder for Poco and I entered exactly this directory in the code line: cmake -DPoco_DIR=/Path/To/Poco/CMake/Config -DEigen3_DIR=/Path/To/Eigen/CMake/Config -G Ninja ..

image

avadhutmali999 commented 1 year ago

Is the issue resolved now? also build in release mode as follows cmake -DPoco_DIR=/Path/To/Poco/CMake/Config -DEigen3_DIR=/Path/To/Eigen/CMake/Config -DCMAKE_BUILD_TYPE=Release -G Ninja ..

It will prevent any latency issues and errors in robot motion while running control loops.