-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix VoxelGrid.voxels bug #1535 #1688
Conversation
Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR. Travis is failing because of the style check. Please see http://www.open3d.org/docs/release/contribute.html#automated-style-checker and run make apply-style
.
Reviewed 3 of 3 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @kosuke55)
src/Open3D/Geometry/VoxelGrid.h, line 240 at r1 (raw file):
const Eigen::Vector3d &max_bound); std::vector<Voxel> Voxels();
GetVoxels
instead ofVoxels
would be more consistent with the naming scheme.- Please add documentation. For an example see the method
CreateFromTriangleMeshWithinBounds
above. - Can we make this method
const
src/Python/open3d_pybind/geometry/voxelgrid.cpp, line 89 at r1 (raw file):
.def(py::self += py::self) .def("voxels", &geometry::VoxelGrid::Voxels, "List of ``Voxel``: Voxels contained in voxel grid")
I think it would be good to mention that changes to the voxels returned from this method are not reflected in the voxel grid.
@griegler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r2.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @kosuke55)
src/Open3D/Geometry/VoxelGrid.h, line 242 at r2 (raw file):
// Returns List of ``Voxel``: Voxels contained in voxel grid. // Changes to the voxels returned from this method // are not reflected in the voxel grid.
The doc is already better, but could you please format it in the style of the example below:
/// Creates a VoxelGrid from a given TriangleMesh. No color information is
/// converted. The bounds of the created VoxelGrid are defined by the given
/// parameters..
///
/// \param input The input TriangleMesh.
/// \param voxel_size Voxel size of of the VoxelGrid construction.
/// \param min_bound Minimum boundary point for the VoxelGrid to create.
/// \param max_bound Maximum boundary point for the VoxelGrid to create.
@griegler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r3.
Reviewable status:complete! all files reviewed, all discussions resolved
Hi, I have pulled the latest version of the master branch and I'm still having this error when trying to use np.asarray(vox_grid.voxels)) or vox_grid.voxels Any suggestions? |
@amisaw
|
Thanks for the response! However when I try voxel_grid.get_voxels(), I get this error: Note: I have pulled the latest version of Master. I also tried checking out the c513cd0 commit but I'm still getting the above error. Any suggestions? |
Is it possible you didn’t rebuild the library and python package, or maybe
you did but didn’t reinstall the new python package?
…On Tue, Jun 2, 2020 at 8:14 AM amisaw ***@***.***> wrote:
Thanks for the response! However when I try voxel_grid.get_voxels(), I get
this error:
*** AttributeError: 'open3d.open3d.geometry.VoxelGrid' object has no
attribute 'get_voxels'
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1688 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4RXS23Z4QNVTUCZ45FDGDRUUJNFANCNFSM4MDHB5RQ>
.
|
Hello- thanks for the response. I'm actually using open3d version 0.9.0
because when I try to use 0.10.0 I get the following error and am unable to
import open3D:
"from open3d.open3d_pybind import camera
ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not
found (required by
/home/test2/envs/testo3d/lib/python3.6/site-packages/open3d/
open3d_pybind.cpython-36m-x86_64-linux-gnu.so)"
Any help would be really appreciated!
…On Tue, Jun 2, 2020 at 12:35 PM Noah Stier ***@***.***> wrote:
Is it possible you didn’t rebuild the library and python package, or maybe
you did but didn’t reinstall the new python package?
On Tue, Jun 2, 2020 at 8:14 AM amisaw ***@***.***> wrote:
> Thanks for the response! However when I try voxel_grid.get_voxels(), I
get
> this error:
> *** AttributeError: 'open3d.open3d.geometry.VoxelGrid' object has no
> attribute 'get_voxels'
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#1688 (comment)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AB4RXS23Z4QNVTUCZ45FDGDRUUJNFANCNFSM4MDHB5RQ
>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1688 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANIE3DEBIGTHBMVNLALWOLDRUUS4HANCNFSM4MDHB5RQ>
.
|
Ok, thank you for the help!
…On Tue, Jun 2, 2020 at 1:44 PM Kosuke Takeuchi ***@***.***> wrote:
@amisaw <https://github.com/amisaw>
This is another issue, version 0.10.0 does not support ubuntu16.04 like
#1898 <#1898>
To use get_voxels() on a branch of 16.04, go back to the past commit or
use my branch <https://github.com/kosuke55/Open3D/tree/hotfix/voxels>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1688 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANIE3DDOPIJMVZIQZBALLK3RUU253ANCNFSM4MDHB5RQ>
.
|
I found a bug that can't use open3d.geometry.VoxelGrid.voxels same as #1535 .
Thanks to @noahstier, I changed to get voxels of unordered_map by function.
Without this PR
With this PR
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)