Skip to content

demo_markertracker.py not working #35

@mazenabosalem95

Description

@mazenabosalem95

Hello, I get this error when running this file:
"C:\Users\PC\Desktop\Dissertation Practical work\GelSight.venv1\Scripts\python.exe" "C:\Users\PC\Desktop\Dissertation Practical work\GelSight\demo_markertracker.py"
[INFO ] [Logger ] Record log in C:\Users\PC.kivy\logs\kivy_26-05-12_16.txt
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.4.0
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.3.1
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.8.0
[INFO ] [Kivy ] v2.3.1
[INFO ] [Kivy ] Installed at "C:\Users\PC\Desktop\Dissertation Practical work\GelSight.venv1\Lib\site-packages\kivy_init_.py"
[INFO ] [Python ] v3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Users\PC\Desktop\Dissertation Practical work\GelSight.venv1\Scripts\python.exe"
[INFO ] [Logger ] Purge log fired. Processing...
[INFO ] [Logger ] Purge finished!
[INFO ] [Factory ] 195 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] GLEW initialization succeeded
[INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version <b'4.6.0 - Build 32.0.101.7080'>
[INFO ] [GL ] OpenGL vendor <b'Intel'>
[INFO ] [GL ] OpenGL renderer <b'Intel(R) UHD Graphics'>
[INFO ] [GL ] OpenGL parsed version: 4, 6
[INFO ] [GL ] Shading version <b'4.60 - Build 32.0.101.7080'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <32>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
DEMO_MARKERTRACKER.PY >> Didn't provide custom config path.
DEMO_MARKERTRACKER.PY >> Using default config path './default_config.json' if such file exists.
DEMO_MARKERTRACKER.PY >> Using default_config variable from 'config.py' if './default_config.json' is not available
CONFIG.PY >> Loaded config data from file: C:\Users\PC\Desktop\Dissertation Practical work\GelSight\default_config.json.
[ERROR:0@2.950] global obsensor_uvc_stream_channel.cpp:158 cv::obsensor::getStreamChannelGroup Camera index out of range
[ERROR:0@2.983] global obsensor_uvc_stream_channel.cpp:158 cv::obsensor::getStreamChannelGroup Camera index out of range
[ERROR:0@3.021] global obsensor_uvc_stream_channel.cpp:158 cv::obsensor::getStreamChannelGroup Camera index out of range
[ERROR:0@3.064] global obsensor_uvc_stream_channel.cpp:158 cv::obsensor::getStreamChannelGroup Camera index out of range
[INFO ] [Base ] Start application main loop
[INFO ] [GL ] NPOT texture support is available
GELSIGHTMINI.PY >> Camera opened successfully with resolution 3280.0x2464.0!
C:\Users\PC\Desktop\Dissertation Practical work\GelSight.venv1\Lib\site-packages\numpy_core\fromnumeric.py:3860: RuntimeWarning: Mean of empty slice.
return _methods._mean(a, axis=axis, dtype=dtype,
C:\Users\PC\Desktop\Dissertation Practical work\GelSight.venv1\Lib\site-packages\numpy_core_methods.py:145: RuntimeWarning: invalid value encountered in scalar divide
ret = ret.dtype.type(ret / rcount)
[INFO ] [Base ] Leaving application in progress...
Traceback (most recent call last):
File "C:\Users\PC\Desktop\Dissertation Practical work\GelSight\demo_markertracker.py", line 348, in
GelsightMini(config=gs_config.config).run()
File "C:\Users\PC\Desktop\Dissertation Practical work\GelSight.venv1\Lib\site-packages\kivy\app.py", line 956, in run
runTouchApp()
File "C:\Users\PC\Desktop\Dissertation Practical work\GelSight.venv1\Lib\site-packages\kivy\base.py", line 574, in runTouchApp
EventLoop.mainloop()
File "C:\Users\PC\Desktop\Dissertation Practical work\GelSight.venv1\Lib\site-packages\kivy\base.py", line 339, in mainloop
self.idle()
File "C:\Users\PC\Desktop\Dissertation Practical work\GelSight.venv1\Lib\site-packages\kivy\base.py", line 379, in idle
Clock.tick()
File "C:\Users\PC\Desktop\Dissertation Practical work\GelSight.venv1\Lib\site-packages\kivy\clock.py", line 733, in tick
self.post_idle(ts, self.idle())
File "C:\Users\PC\Desktop\Dissertation Practical work\GelSight.venv1\Lib\site-packages\kivy\clock.py", line 776, in post_idle
self._process_events()
File "kivy\_clock.pyx", line 620, in kivy._clock.CyClockBase._process_events
File "kivy\_clock.pyx", line 653, in kivy._clock.CyClockBase._process_events
File "kivy\_clock.pyx", line 649, in kivy._clock.CyClockBase._process_events
File "kivy\_clock.pyx", line 218, in kivy._clock.ClockEvent.tick
File "C:\Users\PC\Desktop\Dissertation Practical work\GelSight\demo_markertracker.py", line 215, in update
self.initialize(frame=frame)
File "C:\Users\PC\Desktop\Dissertation Practical work\GelSight\demo_markertracker.py", line 180, in initialize
self.markertracker = MarkerTracker(img)
^^^^^^^^^^^^^^^^^^
File "C:\Users\PC\Desktop\Dissertation Practical work\GelSight\utilities\marker_tracker.py", line 127, in init
grid_points, grid_weights = fit_grid(new_centers, grid_spacing_est)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PC\Desktop\Dissertation Practical work\GelSight\utilities\fit_grid.py", line 153, in fit_grid
central_point = find_central_point(points=points, spacing=spacing)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PC\Desktop\Dissertation Practical work\GelSight\utilities\fit_grid.py", line 123, in find_central_point
raise ValueError("Did not find a central point with valid neighbors.")
ValueError: Did not find a central point with valid neighbors.

Process finished with exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions