-
Notifications
You must be signed in to change notification settings - Fork 286
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
ViSP Python wrapper #1265
Merged
Merged
ViSP Python wrapper #1265
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…hose that are private
…ined code through static headers
…ation location to global doc folder
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes an automatic tool to generate Pybind11-based bindings for ViSP. After install, ViSP can now be used from python and most functions should be available.
The PR introduces a new folder,
modules/python
containing:generator
: the Python code to generate pybind11 C++ code, which can then be compiled;bindings
: the recipe for building the Pybind code, as well as handcrafted binding functions (e.g. numpy conversions). It may also contain pure python code, that can be added on top of the generated bindings.config
: a folder containing the modules (core, io, mbt etc.) configuration;stubs
: A way to build "stubs" after compiling the pybind extension and installing the ViSP module. Stubs provide type information and allow for autocompletion in IDE (tested in visual code);docs
: Sphinx-based documentation sources for the Python version of ViSP.A lot more testing is required to ensure that everything works properly.
To build the python bindings:
brew install pybind11
)python -m pip
BUILD_PYTHON_BINDINGS
is onvisp_python_bindings
make visp_python_bindings_docs
Known issues can be seen in
modules/python/docs/todos.rst
Howto build on macOS
Install
virtualenv
To get access to
virtualenv
, add its installation directory in yourPATH
Setup
virtualenv
for vispIf you want your
virtualenv
to also inherit globally installed packages run:These commands create a
venv/
directory in your project where all dependencies are installed. You need to activate it first though (in every terminal instance where you are working on your project):Build python documentation
Note that documentation is available in
$VISP_WS/visp-build/doc/python/index.html
Test python bindings
Launch python mbt example
Launch visual-servoing examples