facebookresearch / facebookresearch/foundpose
issue) python scripts/gen_templates.py --opts-path configs/gen_templates/lmo.json
- Dominant language
- Python
- Stars
- 139
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Thank you for sharing your great research.
I have noticed the following issues. I would appreciate it if you could provide a solution.
(foundpose_gpu) kys@robot:~/workspace/code/thrid_party/6dof/foundpose$ python scripts/gen_templates.py --opts-path configs/gen_templates/lmo.json
I1014 06:46:14.317 84749 gen_templates.py:100] Bop camera details are read
Object lids: [1, 5, 6, 8, 9, 10, 11, 12]
camera model created
I1014 06:46:14.332 84749 acceleratesupport.py:13] OpenGL_accelerate module loaded
I1014 06:46:14.334 84749 arraydatatype.py:270] Using accelerated ArrayDatatype
I1014 06:46:14.491 84749 gen_templates.py:164] Sampled points on the sphere: 57
I1014 06:46:14.501 84749 gen_templates.py:183] Number of views: 798
I1014 06:46:14.501 84749 misc.py:42] Time for setting up the stage: 0.18315s
I1014 06:46:14.501 84749 logging.py:118] --------------------------------------------------------------------------------
I1014 06:46:14.501 84749 logging.py:119] Object 1 from lmo
I1014 06:46:14.501 84749 logging.py:120] --------------------------------------------------------------------------------
output_dir: /path/to/output/folder
I1014 06:46:14.501 84749 gen_templates.py:207] Output will be saved to: /path/to/output/folder/templates/v1/lmo/1
I1014 06:46:14.529 84749 misc.py:42] Time for preparing object data: 0.02835s
I1014 06:46:14.529 84749 gen_templates.py:238] Rendering object 1 from lmo, view 0/798...
Traceback (most recent call last):
File "/home/kys/workspace/code/thrid_party/6dof/foundpose/scripts/gen_templates.py", line 492, in
main()
File "/home/kys/workspace/code/thrid_party/6dof/foundpose/scripts/gen_templates.py", line 488, in main
synthesize_templates(opts)
File "/home/kys/workspace/code/thrid_party/6dof/foundpose/scripts/gen_templates.py", line 266, in synthesize_templates
output = renderer.render_object_model(
File "/home/kys/workspace/code/thrid_party/6dof/foundpose/utils/renderer.py", line 154, in render_object_model
return self._render_scene(
File "/home/kys/workspace/code/thrid_party/6dof/foundpose/utils/renderer.py", line 226, in _render_scene
self.renderer = pyrender.OffscreenRenderer(self.im_size[0], self.im_size[1])
File "/home/kys/anaconda3/envs/foundpose_gpu/lib/python3.9/site-packages/pyrender/offscreen.py", line 31, in __init__
self._create()
File "/home/kys/anaconda3/envs/foundpose_gpu/lib/python3.9/site-packages/pyrender/offscreen.py", line 149, in _create
self._platform.init_context()
File "/home/kys/anaconda3/envs/foundpose_gpu/lib/python3.9/site-packages/pyrender/platforms/pyglet_platform.py", line 50, in init_context
self._window = pyglet.window.Window(config=conf, visible=False,
File "/home/kys/anaconda3/envs/foundpose_gpu/lib/python3.9/site-packages/pyglet/window/xlib/__init__.py", line 167, in __init__
super().__init__(*args, **kwargs)
File "/home/kys/anaconda3/envs/foundpose_gpu/lib/python3.9/site-packages/pyglet/window/__init__.py", line 508, in __init__
display = pyglet.display.get_display()
File "/home/kys/anaconda3/envs/foundpose_gpu/lib/python3.9/site-packages/pyglet/display/__init__.py", line 77, in get_display
return Display()
File "/home/kys/anaconda3/envs/foundpose_gpu/lib/python3.9/site-packages/pyglet/display/xlib.py", line 102, in __init__
raise NoSuchDisplayException(f'Cannot connect to "{name}"')
pyglet.display.xlib.NoSuchDisplayException: Cannot connect to "None"
Contributor guide
Research direction
Reproduce the command `python scripts/gen_templates.py --opts-path configs/gen_templates/lmo.json` and trace the failure from `scripts/gen_templates.py` into `utils/renderer.py`, especially the `pyrender.OffscreenRenderer` call. Confirm the rendering setup can initialize in the intended environment and that template generation completes without the displayed display-connection error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100