Comments (14)
Hi guys,
I've started some initial work for a PyPI package for the new SDK.
Python packaging is new to me but I'm hoping that what I have so far is a good start.
I would appreciate comments and suggestions on the go (this is not a top priority task but I would love to make it work). This is a PR I created on my fork to start using the CI system for creating a wheel.
Hope to get some feedbacks :)
Oh and Happy New year !! 😃 🎉
from pyrealsense.
Glad you got going on this! I'll give some feedback asap.
from pyrealsense.
Understanding their bindings is kinda difficult since it is very low level. I will have to take a bit more time to read into their code to understand where they are going with it.
from pyrealsense.
Thanks for pointing this out.
I think it would be good for this project to support the new release, but I am not sure yet how much work that implies as it looks like quite a big change from v1.x.
About the new python wrapper provided, it is based on pybind11 - which might make it very close to the C++ code. (by opposition pyrealsense is based on ctypes)
from pyrealsense.
Maybe we can help impact the development of the 2.0 python wrapper? The intel developers have been very responsive and helpful to me so far.
from pyrealsense.
This should definitely be a long term goal.
from pyrealsense.
Hi there!
I'm working with the RealSense SDK team on the new librealsense library.
I would be happy to assist with whatever I can to help bring this project up to speed with SDK 2.0
Feel free to contact me, or open a new discussion on our GitHub page :)
from pyrealsense.
Hey @zivsha
Great to hear from you! I have multiple questions regarding SDK 2.0:
- Will SDK 2.0 be backwards compatible (hardware-wise) with all previous devices (especially the R200)?
- I saw that the new SDK includes its own Python bindings. What is your plan for those? Are these meant as low level bindings or are you planning on a more pythonic API in the future?
- Could you point us to a document that includes the most important API changes?
- Where do you usually announce new upcoming releases? I had difficulties finding information when I saw your development branch towards SDK 2.0.
from pyrealsense.
Hey @papr ,
Would it be possible to move this discussion to our GitHub so that maybe more individuals could participate, share ideas and also maybe share other python helpers such as your repo?
- Currently no, SDK 2.0 only supports the D400 series and the SR300 (see our Overview).
- The bindings are meant as low level binding, but expose regular python API (with some additional stuff like the
__repr__
functions). I'm not sure what you mean by "more pythonic" since it is a broad concept, but we can discuss that in the discussion I mentioned above. - See our Wiki for API Changes and API How To for that.
- Releases are under the Releases tab
from pyrealsense.
Hello @zivsha, thanks for reaching out.
The issue you linked refer to a user expecting to install python bindings to librealsense v2 through pip
. Issue #62 was the same problem.
To limit confusion, we could try to improve the error and warning messages raised at install from pyrealsense
, like here for example:
pyrealsense/pyrealsense/extlib.py
Line 26 in 1b32791
Maybe you have some other suggestions?
You are also asking to move the discussion to your Github. Please feel free to do so. Hopefully this will motivate individuals to get involved? As you can see from the list of contributors, this wrapper has been developed by relatively few people. You might need to be explicit on your github about what you are looking for.
I am also still using the SR300 and do not plan to move to D400 in the coming months. So developing another wrapper is not on top of my priorities right now. @papr, are you using R200 only?
Regarding point 2 from @papr, more pythonic
would mean using Python data structures and idioms to interact with the underlying API. That could be using context managers, properties, Python's own naming guidelines and maybe more importantly Python's own package manager pip
(and conda
if you want to please everybody : ) ).
from pyrealsense.
@zivsha, I have been looking quickly at the PR. Seems like you have been automating the building of the wrapper (appveyor + travis)?
And there is a setup.py too, which a user should execute to get the wrapper?
I am not sure what kind of feedback you would like though.
In term of pushing version to PyPI, I used to do it manually. Not sure it is possible to automate that process with every new releases.
from pyrealsense.
@toinsson, first of all thanks for the effort.
The purpose of adding steps to the CI was the same as adding tests to a project-it is just for making sure no one breaks anything and that a package can be created whenever new PRs come in.
Uploading the wheel to PyPI will be automated probably on our release automation which is not public.
As I'm not a python expert, I would like to know what are the best methods for creating these packages, and if what I have is the way to go.
I'm actually on hold with this one currently, since I'm not sure how to upload multiple builds types of the same version (I want to put a 32 bit and x64 versions for both Windows, Linux and MacOS) and also a python2 and python3 version for each build type.
from pyrealsense.
It seems like you will not be able to build the bindings without having access to the sources, due to pybind11 ways of working (correct?).
In pyrealsense
case, we use ctypes
to bind directly to binaries and parse the headers which let users build their bindings during pip install.
These two ways are quite different. And I am not personally an expert in cross-platform compilation. But it seems that is what you will have to do if you want to provide a "one-clic" install.
from pyrealsense.
It seems like you will not be able to build the bindings without having access to the sources, due to pybind11 ways of working (correct?).
Correct, I intend to build all variations of the SDK with Python on our build machines and take the wheel will contain a binary only version of the library. (Build machine will compile and each .so
or .pyd
file will be packaged into the wheel). pip install will just unpack the wheel and place the binaries in the right place.
from pyrealsense.
Related Issues (20)
- switch between two IR cameras HOT 2
- How to get the focal length? How to get the sensor height? HOT 2
- Can't import rs_option
- I am unable to perform import pyrealsense in Windows 7 64-bit with Python 2.7 in Anaconda (Similar to issue #31) HOT 2
- problem with loading calibration data by pyrealsense
- install pyrealsense error HOT 1
- Cant measure distances with PyRealSense HOT 1
- Trying to install under Arch Linux x86_64 HOT 7
- ValueError: '<P' is not a valid PEP 3118 buffer format string HOT 11
- Issue with LRS 1.12.1 and PRS 2, R200 & F200 devices not detected on UP2 HOT 9
- Problems installing pyrealsense via pip3 and manually using setup.py
- add numpy as requirement
- pyrealsense Error:'NoneType' object has no attribute 'deproject_pixel_to_point'
- installing pyrealsense HOT 1
- depth measurement
- Installation Problem HOT 4
- Install librealsense-1.12.1 and pyrealsense on Raspberry Pi4 for F200 HOT 1
- pip install keeps failing HOT 1
- Install issues HOT 1
- generate point cloud data of human
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyrealsense.