YDLIDAR / YDLidar-SDK

Driver for receiving YD LiDAR data and more...
Other
134 stars 243 forks source link

Trouble running tof_test.py and plot_tof_test.py in how_to_build_and_install.md #43

Open eliaskrchnr opened 8 months ago

eliaskrchnr commented 8 months ago

I did the installation, could start the lidar, and it seems like I get some data. When I tried to visualize the data with tof_test.py and plot_tof_test.py following the instructions, I got some errors. Since I don't know what I'm doing, I tried using python3 tof_test.py instead of the suggested python tof_test.py. Only the type of error changed, like it is seen in the picture. I'm glad for help.

elias@elias-ThinkPad:~/YDLidar-SDK/python/examples$ python tof_test.py
Traceback (most recent call last):
  File "tof_test.py", line 2, in <module>
    import ydlidar
  File "/home/elias/YDLidar-SDK/python/examples/ydlidar.py", line 15, in <module>
    import _ydlidar
ImportError: dynamic module does not define init function (init_ydlidar)
elias@elias-ThinkPad:~/YDLidar-SDK/python/examples$ python3 tof_test.py
Traceback (most recent call last):
  File "tof_test.py", line 2, in <module>
    import ydlidar
  File "/home/elias/YDLidar-SDK/python/examples/ydlidar.py", line 15, in <module>
    import _ydlidar
ModuleNotFoundError: No module named '_ydlidar'
elias@elias-ThinkPad:~/YDLidar-SDK/python/examples$ python plot_tof_test.py
Traceback (most recent call last):
  File "plot_tof_test.py", line 2, in <module>
    import ydlidar
  File "/home/elias/YDLidar-SDK/python/examples/ydlidar.py", line 15, in <module>
    import _ydlidar
ImportError: dynamic module does not define init function (init_ydlidar)
elias@elias-ThinkPad:~/YDLidar-SDK/python/examples$ python3 plot_tof_test.py
Traceback (most recent call last):
  File "plot_tof_test.py", line 2, in <module>
    import ydlidar
  File "/home/elias/YDLidar-SDK/python/examples/ydlidar.py", line 15, in <module>
    import _ydlidar
ModuleNotFoundError: No module named '_ydlidar'
JHPHELAN commented 8 months ago

Same problem here. Find indicates that ydlidar.py exists & is located where indicated. Directory added to PATH without improvement.