Viewer.init is not showing

hi there,
I have been trying to bulid a custom setector with wall detection, but when I tried to view it I got this erro:

Initialized Camera
Traceback (most recent call last):
File “detector.py”, line 299, in
main()
File “detector.py”, line 201, in main
viewer.init(camera_infos.camera_configuration.calibration_parameters.left_cam, has_imu, obj_param.enable_tracking)
File “/home/cute/cutezed2i/ogl_viewer/viewer.py”, line 488, in init
self.point_cloud.init(res)
File “/home/cute/cutezed2i/ogl_viewer/viewer.py”, line 328, in init
self.elementbufferSize = res.width * res.height
AttributeError: ‘bool’ object has no attribute ‘width’

please any idea! I went too much but no avail

File “detector.py”, line 274, in main
viewer2.update_view(image_left, cam_w_pose.pose_data(), tracking_state)
File “/home/cute/cutezed2i/ogl_viewer2/viewer2.py”, line 382, in update_view
self.image_handler.push_new_image(_image)
File “/home/cute/cutezed2i/ogl_viewer2/viewer2.py”, line 253, in push_new_image
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, _zed_mat.get_width(), _zed_mat.get_height(), GL_RGBA, GL_UNSIGNED_BYTE, ctypes.c_void_p(_zed_mat.get_pointer()))
File “/home/cute/archiconda3/envs/zed/lib/python3.8/site-packages/OpenGL/latebind.py”, line 47, in call
return self._finalCall( *args, **named )
File “/home/cute/archiconda3/envs/zed/lib/python3.8/site-packages/OpenGL/wrapper.py”, line 889, in wrapperCall
raise err
File “/home/cute/archiconda3/envs/zed/lib/python3.8/site-packages/OpenGL/wrapper.py”, line 882, in wrapperCall
result = wrappedOperation( *cArguments )
File “/home/cute/archiconda3/envs/zed/lib/python3.8/site-packages/OpenGL/platform/baseplatform.py”, line 415, in call
return self( *args, **named )
File “/home/cute/archiconda3/envs/zed/lib/python3.8/site-packages/OpenGL/error.py”, line 230, in glCheckError
raise self._errorClass(
OpenGL.error.GLError: GLError(
err = 1281,
description = b’invalid value’,
baseOperation = glTexSubImage2D,
pyArgs = (
GL_TEXTURE_2D,
0,
0,
0,
1280,
720,
GL_RGBA,
GL_UNSIGNED_BYTE,
c_void_p(367339551904),
),
cArgs = (
GL_TEXTURE_2D,
0,
0,
0,
1280,
720,
GL_RGBA,
GL_UNSIGNED_BYTE,
c_void_p(367339551904),
),
cArguments = (
GL_TEXTURE_2D,
0,
0,
0,
1280,
720,
GL_RGBA,
GL_UNSIGNED_BYTE,
c_void_p(367339551904),
)

Hello,
Can you attach your code, so that I can check where could the issue be ?

Antoine

Hi @alassagne
what exactly I am doing is that i combined the custom detector with plane detections. and I am sending the results of detections via UDP. I could manage to do so with the custom detector only. But now I need to make ROI in the center of the image as the system might face a wall or rock in its way!

any suggestions, please?

Hello,

You code states that your errors are not related to ROIs, but more basic OpenGL and python errors. Especially in the file viewer.py which I assume you took from our tutorials and samples. What are the modifications you made ?