Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5

2D camera issues on Mac OS

#11
(02-03-2025, 01:30 PM)Albert Wrote: OK, the download of the installer should be correct now. 

Try to download again for Mac OS and you should see this:
Code:
md5 Install-RoboDK.dmg 
MD5 (Install-RoboDK.dmg) = 9bd2316c4fc1f510778ecf7f88e2adc6
Thx for responce, Albert

Ok, md5 for my installer is the same, release date: 2025-02-03
But, I can still reproduce the problem with cropping the image in depth mode, for example (screenshots)

I have checked all the issues from the first post, they are all actual 😟

if you take a picture immediately after adding the camera (without applying the settings manually), the size of the picture will correspond to the FOV (I mean area that gets to the camera, not camera setting “FOV”) with which the camera was added.

This video showed how the FOV changes when adding and after manually applying the settings.
I changed the python script a bit so that it doesn't close the camera.




Attached Files Thumbnail(s)
Screenshot color mode.png    Screenshot depth mode.png   

.py   robodkIssue.py (Size: 4.56 KB / Downloads: 113)
#12
Thank you for such detailed description of the issue. I was able to reproduce this on a Mac with the M1 chip. For some reason this issue is specific to Mac and it is related to how OpenGL is handled on Mac vs Windows. We'll investigate further but it does not have a quick fix for now.

Other issues such as being able to dock the Window or prevent crashing have been fixed.

For the time being, if you need proper depth simulation I recommend you to use RoboDK Desktop on Windows.
#13
(02-05-2025, 10:15 AM)Albert Wrote: Thank you for such detailed description of the issue. I was able to reproduce this on a Mac with the M1 chip. For some reason this issue is specific to Mac and it is related to how OpenGL is handled on Mac vs Windows. We'll investigate further but it does not have a quick fix for now.

Other issues such as being able to dock the Window or prevent crashing have been fixed.

For the time being, if you need proper depth simulation I recommend you to use RoboDK Desktop on Windows.

Hello Albert,

I have updated to the latest version of RoboDK, despite the fact that the md5 of the installer remains the same, DOCKED mode does work, but:

1) if I open the camera in DOCKED mode, then UNDOCK it, it opens in a separate window (as it should be), but if I close this window by pressing X, it causes the RoboDK to crash scr1.png    scr2.png   

2) 
By:
Code:
cam_item = self.RDK.Cam2D_Add(camera_frames, 'DEPTH FOCAL_LENGTH=6 FOV=30 FAR_LENGTH=5000 SIZE=960x540')

Not all camera settings will actually be set, until you open the camera settings in the GUI and click OK.
But in this case it helps if you do this:
Code:
cam_item = RDK.Cam2D_Add(camera_frames, 'DEPTH')
params = ["FOCAL_LENGTH=6", "FOV=30", "FAR_LENGTH=5000", "SIZE=960x540"]
for param in params:
    self.RDK.Cam2D_SetParams(param, cam_item)
after such consistent application of the parameters, the window size, FOV, etc. become what they should be.


Some observations about getting an image in DEPTH mode: I tried to get it from a socket and from a file, and then visualizing it. 
Like this:
Code:
td = TemporaryDirectory(prefix='robodk_')
tf = td.name + '/temp.grey32'
if self.RDK.Cam2D_Snapshot(tf, cam_item) == 1:
    grey32 = np.fromfile(tf, dtype='>u4')
    w, h = grey32[:2]
    grey32 = np.flipud(np.reshape(grey32[2:], (h, w)))
else:
    raise

#----------------------------------------------
# Display
grey32[grey32 == 0] = 2**32 - 1  # This is for display purposes only! Values of 0 do not have any measurements.
plt.imshow(grey32, 'gray')
plt.show()

In both cases, the visualization matched what I see in the camera window in RoboDK (cropped image), but if I save the PNG in DEPTH mode, it doesn't look cropped🤔.
from_socket_or_file.png    depth_brick.png   
  




Users browsing this thread:
1 Guest(s)