espros / epc-tofcam-toolkit

This package provides a python interface to the espros TOFcam's. It also provides a simple GUI to visualize the data from the camera.
MIT License
3 stars 2 forks source link

issue when running toolkit #3

Open aimiliosnrobotics opened 1 month ago

aimiliosnrobotics commented 1 month ago

Hello, I'm trying to run the toolkit for the cam635 but I am getting following error, also when im trying in the virtual environment (System: Ubuntu 20.04 python3 (ros-noetic)):

/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.7) or chardet (3.0.4) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Traceback (most recent call last):
  File "/home/aimpet/.local/bin/tofcam635", line 5, in <module>
    from epc.tofCam_gui.gui_tofCam635_bridge import main
  File "/home/aimpet/.local/lib/python3.8/site-packages/epc/tofCam_gui/__init__.py", line 1, in <module>
    from .gui_tofCams import Base_GUI_TOFcam
  File "/home/aimpet/.local/lib/python3.8/site-packages/epc/tofCam_gui/gui_tofCams.py", line 6, in <module>
    from epc.tofCam_gui.widgets import VideoWidget, ToolBar, MenuBar
  File "/home/aimpet/.local/lib/python3.8/site-packages/epc/tofCam_gui/widgets/__init__.py", line 5, in <module>
    from .video_widget import *
  File "/home/aimpet/.local/lib/python3.8/site-packages/epc/tofCam_gui/widgets/video_widget.py", line 51, in <module>
    class VideoWidget(QStackedWidget):
  File "/home/aimpet/.local/lib/python3.8/site-packages/epc/tofCam_gui/widgets/video_widget.py", line 53, in VideoWidget
    DISTANCE_CMAP = getFromMatplotlib('turbo')
  File "/home/aimpet/.local/lib/python3.8/site-packages/pyqtgraph/colormap.py", line 154, in getFromMatplotlib
    col_map = mpl_plt.get_cmap(name)
  File "/usr/lib/python3/dist-packages/matplotlib/cm.py", line 181, in get_cmap
    raise ValueError(
ValueError: Colormap turbo is not recognized. Possible values are: Accent, Accent_r, Blues, Blues_r, BrBG, BrBG_r, BuGn, BuGn_r, BuPu, BuPu_r, CMRmap, CMRmap_r, Dark2, Dark2_r, GnBu, GnBu_r, Greens, Greens_r, Greys, Greys_r, OrRd, OrRd_r, Oranges, Oranges_r, PRGn, PRGn_r, Paired, Paired_r, Pastel1, Pastel1_r, Pastel2, Pastel2_r, PiYG, PiYG_r, PuBu, PuBuGn, PuBuGn_r, PuBu_r, PuOr, PuOr_r, PuRd, PuRd_r, Purples, Purples_r, RdBu, RdBu_r, RdGy, RdGy_r, RdPu, RdPu_r, RdYlBu, RdYlBu_r, RdYlGn, RdYlGn_r, Reds, Reds_r, Set1, Set1_r, Set2, Set2_r, Set3, Set3_r, Spectral, Spectral_r, Wistia, Wistia_r, YlGn, YlGnBu, YlGnBu_r, YlGn_r, YlOrBr, YlOrBr_r, YlOrRd, YlOrRd_r, afmhot, afmhot_r, autumn, autumn_r, binary, binary_r, bone, bone_r, brg, brg_r, bwr, bwr_r, cividis, cividis_r, cool, cool_r, coolwarm, coolwarm_r, copper, copper_r, cubehelix, cubehelix_r, flag, flag_r, gist_earth, gist_earth_r, gist_gray, gist_gray_r, gist_heat, gist_heat_r, gist_ncar, gist_ncar_r, gist_rainbow, gist_rainbow_r, gist_stern, gist_stern_r, gist_yarg, gist_yarg_r, gnuplot, gnuplot2, gnuplot2_r, gnuplot_r, gray, gray_r, hot, hot_r, hsv, hsv_r, inferno, inferno_r, jet, jet_r, magma, magma_r, nipy_spectral, nipy_spectral_r, ocean, ocean_r, pink, pink_r, plasma, plasma_r, prism, prism_r, rainbow, rainbow_r, seismic, seismic_r, spring, spring_r, summer, summer_r, tab10, tab10_r, tab20, tab20_r, tab20b, tab20b_r, tab20c, tab20c_r, terrain, terrain_r, twilight, twilight_r, twilight_shifted, twilight_shifted_r, viridis, viridis_r, winter, winter_r

Is there a dependency issue ? Thank you very much in advance!

epc-ake commented 1 month ago

Hi @aimiliosnrobotics

What exact python version are you using? The toolkit should be compatible with python version >= 3.10

aimiliosnrobotics commented 1 month ago

i see, im currently using Python 3.8.10

aimiliosnrobotics commented 1 month ago

hello, i built the package from source and created a virtual environment with python3.10. The app is running but i cant visualize the data as i get some errors. First this one:

2024-10-17 11:53:48,835: ERROR [root] - running function <function TofCam635Bridge._changeImageType at 0x7f6a7f0157e0> failed with exception: Python integer 65535 out of bounds for int16 (streamer.py:20)

and then when i press play this error keeps coming:

2024-10-17 11:47:59,383: ERROR [Streamer] - Failed to get frame with exception: Python integer 65535 out of bounds for int16 (streamer.py:79)

The ros-driver works well and i get the data but i still having problems running the toolkit. Thanks in advance!

epc-ake commented 1 month ago

Thanks for reporting this. There seemed to be a incompatibility with the newest numpy version. It should be fixed now. Could you git pull the latest changes and try again?