Skip to content

Instantly share code, notes, and snippets.

@EricCousineau-TRI
Last active August 29, 2022 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EricCousineau-TRI/8f4a65edee3479f4ef8e6bb9d9cee639 to your computer and use it in GitHub Desktop.
Save EricCousineau-TRI/8f4a65edee3479f4ef8e6bb9d9cee639 to your computer and use it in GitHub Desktop.

Setup

python3 -m venv ./venv
source ./venv/bin/activate
pip install -U pip wheel
pip install -r ./requirements.txt
pip freeze > ./requirements.freeze.txt

Running

source ./venv/bin/activate
python ./repro.py 2>&1 | tee ./repro.output.txt
<class 'open3d.cuda.pybind.utility.Vector2iVector'>
good
<class 'numpy.ndarray'>
type error :(
compute_rmse(): incompatible function arguments. The following argument types are supported:
1. (self: open3d.cuda.pybind.pipelines.registration.TransformationEstimation, source: open3d.cuda.pybind.geometry.PointCloud, target: open3d.cuda.pybind.geometry.PointCloud, corres: open3d.cuda.pybind.utility.Vector2iVector) -> float
Invoked with: TransformationEstimationPointToPlane, PointCloud with 198835 points., PointCloud with 137833 points., array([[182266, 127085],
[182267, 127085],
<class 'open3d.cuda.pybind.core.Tensor'>
type error :(
compute_rmse(): incompatible function arguments. The following argument types are supported:
1. (self: open3d.cuda.pybind.pipelines.registration.TransformationEstimation, source: open3d.cuda.pybind.geometry.PointCloud, target: open3d.cuda.pybind.geometry.PointCloud, corres: open3d.cuda.pybind.utility.Vector2iVector) -> float
Invoked with: TransformationEstimationPointToPlane, PointCloud with 198835 points., PointCloud with 137833 points., [[182266 127085],
[182267 127085],
import numpy as np
import open3d as o3d
from open3d.cuda.pybind.pipelines.registration import (
TransformationEstimationPointToPlane,
registration_icp,
)
import open3d.core as o3c
demo_icp_pcds = o3d.data.DemoICPPointClouds()
source = o3d.io.read_point_cloud(demo_icp_pcds.paths[0])
target = o3d.io.read_point_cloud(demo_icp_pcds.paths[1])
trans_init = np.asarray([[0.862, 0.011, -0.507, 0.5],
[-0.139, 0.967, -0.215, 0.7],
[0.487, 0.255, 0.835, -1.4], [0.0, 0.0, 0.0, 1.0]])
threshold = 0.02
p2l = TransformationEstimationPointToPlane()
reg_p2l = registration_icp(source, target, threshold, trans_init, p2l)
def trunc(s):
lines = s.splitlines()
return "\n".join(lines[:5])
def try_thing(x):
print()
print(type(x))
try:
out = p2l.compute_rmse(source, target, x)
print("good")
except TypeError as e:
print("type error :(")
print(trunc(str(e)))
x = reg_p2l.correspondence_set
try_thing(x)
try_thing(np.asarray(x))
try_thing(o3c.Tensor(np.asarray(x)))
addict==2.4.0
anyio==3.6.1
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
asttokens==2.0.8
attrs==22.1.0
Babel==2.10.3
backcall==0.2.0
beautifulsoup4==4.11.1
bleach==5.0.1
certifi==2022.6.15
cffi==1.15.1
charset-normalizer==2.1.1
cycler==0.11.0
debugpy==1.6.3
decorator==5.1.1
defusedxml==0.7.1
deprecation==2.1.0
entrypoints==0.4
executing==1.0.0
fastjsonschema==2.16.1
fonttools==4.37.1
idna==3.3
importlib-metadata==4.12.0
importlib-resources==5.9.0
ipykernel==6.15.2
ipython==8.4.0
ipython-genutils==0.2.0
ipywidgets==8.0.1
jedi==0.18.1
Jinja2==3.1.2
joblib==1.1.0
json5==0.9.10
jsonschema==4.14.0
jupyter-core==4.11.1
jupyter-server==1.18.1
jupyter_client==7.3.5
jupyter_packaging==0.12.3
jupyterlab==3.4.5
jupyterlab-pygments==0.2.2
jupyterlab-widgets==3.0.2
jupyterlab_server==2.15.1
kiwisolver==1.4.4
lxml==4.9.1
MarkupSafe==2.1.1
matplotlib==3.5.3
matplotlib-inline==0.1.6
mistune==2.0.4
nbclassic==0.4.3
nbclient==0.6.7
nbconvert==7.0.0
nbformat==5.4.0
nest-asyncio==1.5.5
notebook==6.4.12
notebook-shim==0.1.0
numpy==1.23.2
open3d==0.15.2
packaging==21.3
pandas==1.4.3
pandocfilters==1.5.0
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.2.0
pkg_resources==0.0.0
pkgutil_resolve_name==1.3.10
prometheus-client==0.14.1
prompt-toolkit==3.0.30
psutil==5.9.1
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.21
Pygments==2.13.0
pyparsing==3.0.9
pyquaternion==0.9.9
pyrsistent==0.18.1
python-dateutil==2.8.2
pytz==2022.2.1
PyYAML==6.0
pyzmq==23.2.1
requests==2.28.1
scikit-learn==1.1.2
scipy==1.9.1
Send2Trash==1.8.0
six==1.16.0
sniffio==1.2.0
soupsieve==2.3.2.post1
stack-data==0.5.0
terminado==0.15.0
threadpoolctl==3.1.0
tinycss2==1.1.1
tomlkit==0.11.4
tornado==6.2
tqdm==4.64.0
traitlets==5.3.0
urllib3==1.26.12
wcwidth==0.2.5
webencodings==0.5.1
websocket-client==1.4.0
widgetsnbextension==4.0.2
zipp==3.8.1
open3d == 0.15.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment