Page 1 of 1

Setting up Visual Studio projects

Posted: Sun Mar 06, 2022 8:36 am
by sagg7
I am working with HEBI examples to learn. I am not able to build projects with numpy dependencies.
Error: "fatal error C1083: Cannot open include file: 'numpy/arrayobject.h': No such file or directory"
During cmake build, it was able to find PythonLibs and successfully generate build files. I followed following steps:
1. clone github repo
2. use cmake to generate build files
3. open solution file in visual studio and build projects.

Software versions: Visual Studdio 2019, Python 3.10.2, HEBI examples git cloned yesterday

Re: Setting up Visual Studio projects

Posted: Mon Mar 07, 2022 12:31 am
by matt_tesch
Sorry for the trouble here; I will get a fix for this ASAP and ensure this is tested better in the future.

The numpy dependency is not strictly necessary for the examples, and is only used for plotting data in the examples. I can also create a cmake flag that allows the build to occur without the python dependency for simpler builds.

Best,
Matt

Re: Setting up Visual Studio projects

Posted: Fri Mar 11, 2022 10:49 am
by sagg7
Thanks Matt. Is there a way I can still compile NumPy libraries for the plots?

Re: Setting up Visual Studio projects

Posted: Wed Mar 16, 2022 11:55 am
by matt_tesch
Sorry for the delay -- I found the issue here; it looks like CMake wasn't setting include paths for numpy properly. I've added a PR for this that should allow you to compile and run with plots -- you just need to have python >= 3.6 and numpy installed (pip3 install numpy).

Let me know if this works for you, and I will merge in the PR:
https://github.com/HebiRobotics/hebi-cp ... es/pull/76

Best,
Matt