Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: list index out of range [Only when running with ros2] #124

Open
AjinJayan opened this issue Sep 9, 2024 · 1 comment
Open

Comments

@AjinJayan
Copy link

AjinJayan commented Sep 9, 2024

@wangg12 @shanice-l @Rainbowend @tzsombor95 need your help.

The inference script runs successfully without any errors when executed as a standalone Python script. By when running with ros2, ie., calling script inside ros2 node, the following error occurs. This error is happening at the pose refinement stage.

The error occurs at the line "used_program.draw("triangles", model.index_buffer)" inside renderer.py.
I also tried changing app backends and gl backends, but same error


WARNING: OpenGL version could not be determined, which might be a sign that OpenGL is not loaded correctly.
2024-09-09 14:01:55,310 - WARNING - OpenGL version could not be determined, which might be a sign that OpenGL is not loaded correctly.
Traceback (most recent call last):
File "/home/rack/Workspace/projects/xrm/install/xrm_perception_iris/lib/xrm_perception_iris/perception.server.v2.py", line 283, in
main()
File "/home/rack/Workspace/projects/xrm/install/xrm_perception_iris/lib/xrm_perception_iris/perception.server.v2.py", line 273, in main
executor.spin()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 294, in spin
self.spin_once()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 794, in spin_once
self._spin_once_impl(timeout_sec)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 791, in _spin_once_impl
future.result()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py", line 94, in result
raise self.exception()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py", line 239, in call
self._handler.send(None)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 437, in handler
await call_coroutine(entity, arg)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 391, in _execute_service
response = await await_or_execute(srv.callback, request, srv.srv_type.Response())
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 107, in await_or_execute
return callback(*args)
File "/home/rack/Workspace/projects/xrm/install/xrm_perception_iris/lib/xrm_perception_iris/perception.server.v2.py", line 239, in srv_task_callback
self.perception.inference_call(request)
File "/home/rack/Workspace/projects/xrm/install/xrm_perception_iris/local/lib/python3.10/dist-packages/xrm_perception_iris/pipeline/pipeline_v2/init.py", line 85, in inference_call
self.pipeline.inference_call()
File "/home/rack/Workspace/projects/xrm/install/xrm_perception_iris/local/lib/python3.10/dist-packages/xrm_perception_iris/pipeline/pipeline_v2/pipeline.py", line 139, in inference_call
self.gdrnpp1.inference(self.data.color.copy(), self.data.depth.copy(), target_obj )
File "/home/rack/Workspace/projects/xrm/install/xrm_perception_modules/local/lib/python3.10/dist-packages/xrm_perception_modules/models/gdrnpp/get6dpose.py", line 64, in inference
poses = self.gdrn_predictor.postprocessing(data_dict, out_dict)
File "/home/rack/Workspace/projects/xrm/install/xrm_perception_modules/local/lib/python3.10/dist-packages/xrm_perception_modules/models/gdrnpp/predictor_gdrn.py", line 216, in postprocessing
self.process_depth_refine(data_dict, out_dict)
File "/home/rack/Workspace/projects/xrm/install/xrm_perception_modules/local/lib/python3.10/dist-packages/xrm_perception_modules/models/gdrnpp/predictor_gdrn.py", line 281, in process_depth_refine
self.ren.draw_model(
File "/home/rack/Workspace/projects/3rdparty/gdrnpp_ws/gdrnpp/lib/render_vispy/renderer.py", line 407, in draw_model
used_program.draw("triangles", model.index_buffer)
File "/home/rack/.pyenv/versions/gdrnpp/lib/python3.10/site-packages/vispy/gloo/program.py", line 543, in draw
canvas.context.flush_commands()
File "/home/rack/.pyenv/versions/gdrnpp/lib/python3.10/site-packages/vispy/gloo/context.py", line 172, in flush_commands
self.glir.flush(self.shared.parser)
File "/home/rack/.pyenv/versions/gdrnpp/lib/python3.10/site-packages/vispy/gloo/glir.py", line 584, in flush
self._shared.flush(parser)
File "/home/rack/.pyenv/versions/gdrnpp/lib/python3.10/site-packages/vispy/gloo/glir.py", line 506, in flush
parser.parse(self._filter(self.clear(), parser))
File "/home/rack/.pyenv/versions/gdrnpp/lib/python3.10/site-packages/vispy/gloo/glir.py", line 824, in parse
self._parse(command)
File "/home/rack/.pyenv/versions/gdrnpp/lib/python3.10/site-packages/vispy/gloo/glir.py", line 798, in _parse
ob.attach(*args)
File "/home/rack/.pyenv/versions/gdrnpp/lib/python3.10/site-packages/vispy/gloo/glir.py", line 1803, in attach
self.deactivate()
File "/home/rack/.pyenv/versions/gdrnpp/lib/python3.10/site-packages/vispy/gloo/glir.py", line 1774, in deactivate
gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, stack[-1])
IndexError: list index out of range
The following exception was never retrieved: cannot use Destroyable because destruction was requested
[ros2run]: Process exited with failure 1

@AjinJayan
Copy link
Author

@wangg12 @shanice-l @Rainbowend @tzsombor95 need your support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant