zivid / zivid-python

Official Python package for Zivid 3D cameras
BSD 3-Clause "New" or "Revised" License
40 stars 14 forks source link

Break and Trace Error #282

Closed hai-h-nguyen closed 1 month ago

hai-h-nguyen commented 1 month ago

Hi,

I got this error whenever calling the transform function to transform the point cloud to another coordinate. I tried to use different sdk versions but still the same error. Mine is Ubuntu 22.04.

johningve commented 1 month ago

Hi!

Would you be able to provide more detail on the error that you got?

hai-h-nguyen commented 1 month ago

Hi,

Here is the code I tried:

import zivid
import numpy as np

app = zivid.Application()
zivid_cam = app.connect_camera()
capture_setting = zivid.Settings(
    acquisitions=[zivid.Settings.Acquisition()]
)

mm_to_m = np.array(
    [[0.001, 0, 0, 0], [0, 0.001, 0, 0], [0, 0, 0.001, 0], [0, 0, 0, 1]]
)

frame = zivid_cam.capture(capture_setting)
point_cloud = frame.point_cloud()
point_cloud.transform(mm_to_m)

It throws the error: [Trace/breakpoint trap] whenever the final transform function is reached. I tried the following configurations, none work:

hai-h-nguyen commented 1 month ago

Never mind, somehow it works today. Perhaps, I needed to restart my computer.

johningve commented 1 month ago

I'm happy to hear that it works for you now. Let us know if this issue comes up again in the future!