ifm3d: Cannot Capture with O3R

Hi ! I am using ifm VPU and O3R camera. I wrote a simple algorithm.

from ifm3dpy import O3RCamera, ImageBuffer, FrameGrabber

Initialize the objects

o3r = O3RCamera('192.168.0.69')
port='port2'
fg = FrameGrabber(o3r, pcic_port=50012)
im = ImageBuffer()

# Get a frame

if fg.wait_for_frame(im, 500)==False:
    raise ValueError #Exception('fg-timeout on ' + port + ' reached')

# Read the distance image and display a pixel in the center
dist = im.distance_image()
(width, height) = dist.shape
print(dist[width//2,height//2])

When i turn on the VPU, the leds on port 0 and 2 don’t turn on. Moreover, i cannot take a simple capture. The algorithm stops at :

if fg.wait_for_frame(im, 500)==False:
    raise ValueError #Exception('fg-timeout on ' + port + ' reached')

Can you please help me ?

I also check the configuration and with :

print(json.dumps(config,indent=4))

I see that i have 2D camera on port 0 and 3D camera on port 2.

about the state of each port, i see : CONF

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 25 (12 by maintainers)

Most upvoted comments

Hey @UserFLO you also have to turn port0 into RUN mode:

{ "ports": {"port0": {"state":"RUN"}}}