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

Make Python API more Pythonic, and make python-only use simpler #92

Open
jackjansen opened this issue Mar 5, 2024 · 1 comment
Open
Milestone

Comments

@jackjansen
Copy link
Contributor

The main issue is the .free() paradigm, i.e. the fact that freeing the Python object doesn't free the underlying point cloud (or other object).

This needs to be reversed: default behaviour should be that the native object is freed when the Python refcount drops to zero.

As an alternative there should be a .detach() method, which will invalidate the object on which it is called without freeing the underlying native object. It will return a new Python object referring to the same underlying native object, but with a flag set that freeing the Python object should do nothing to the underlying native object.

The Python package should be made available on pypi, including the essential native dynamic libraries. It is probably a good idea if these do not include the Realsense and Kinect DLLs, but reference system-installed versions of those (and print understandable error messages when the libraries have not been installed yet).

@jackjansen
Copy link
Contributor Author

We should also rename the Python methods and objects, the use of cwpic as both the toplevel package name and the point cloud object name is bothersome. The object should probably be named Pointcloud.

Also, the wrapper modules (especially cwipc_util) have become rather heavy. I think the cwipc_util module should really only contain the wrapper code to the native objects (which would then be something like cwipc.cwipc_util_wrapper.Pointcloud_wrapper) and these should be given additional functionality at the toplevel, through a class cwipc.Pointcloud which is a subclass of the previous one, with the extra Pythonic functionality added.

@jackjansen jackjansen added this to the 8.0 release milestone Mar 5, 2024
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

1 participant