Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install on Windows #3

Open
danielsjf opened this issue Oct 6, 2019 · 1 comment
Open

Install on Windows #3

danielsjf opened this issue Oct 6, 2019 · 1 comment

Comments

@danielsjf
Copy link

@JeroenDM, what are the requirements for the swig branch. Specifically this line does not work well in the imports. I've installed swig, but it is unclear how I should set the path/references.

Traceback (most recent call last):
  File "C:/data/workspace/acrobotics/examples/getting_started.py", line 11, in <module>
    from acrobotics.robot_examples import Kuka
  File "C:\data\workspace\acrobotics\src\acrobotics\robot_examples.py", line 3, in <module>
    from .robot import Robot, Tool
  File "C:\data\workspace\acrobotics\src\acrobotics\robot.py", line 7, in <module>
    from acrobotics.geometry import ShapeSoup
  File "C:\data\workspace\acrobotics\src\acrobotics\geometry.py", line 3, in <module>
    from acrobotics.shapes import Shape, Box, Polyhedron
  File "C:\data\workspace\acrobotics\src\acrobotics\shapes.py", line 6, in <module>
    from .cpp.geometry import Box as CppBox
  File "C:\data\workspace\acrobotics\src\acrobotics\cpp\geometry.py", line 17, in <module>
    _geometry = swig_import_helper()
  File "C:\data\workspace\acrobotics\src\acrobotics\cpp\geometry.py", line 16, in swig_import_helper
    return importlib.import_module('_geometry')
  File "C:\***\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_geometry'
@JeroenDM
Copy link
Owner

JeroenDM commented Oct 15, 2019

For future reference when I have a Windows pc to investigate the problem, some suggestions.

Try to build the swig bindings from source, on ubuntu I have done this in the past like this:

swig -c++ -python geometry.i

And then compile them using either some version of g++ on windows:

g++ -std=c++11 -O2 -fPIC -c src/geometry.cc geometry_wrap.cxx -I /<path_to_python_installation>/python3.6m -I include -I /usr/include/eigen3
g++ -std=c++11 -O2 -shared geometry.o geometry_wrap.o -o _geometry.so

Or using Visual Studio and it's C++ compiler.

(In the meantime, WSL for the win :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants