luigifreda / pyslam

pySLAM is a Visual SLAM pipeline in Python for monocular, stereo and RGBD cameras. It supports many modern local and global features based on Deep Learning.
GNU General Public License v3.0
1.91k stars 338 forks source link

TypeError: 'NoneType' object is not callable #60

Closed vivisl closed 3 years ago

vivisl commented 3 years ago

I've built the environment by running the script install_all.sh and successfully run main_vo.py. But got TypeError: 'NoneType' object is not callable when running main_slam.py. Need Help! Please check the error below:

 WARNING: cannot import ORBextractor from orbslam2_features, check the file TROUBLESHOOTING.md
 WARNING: cannot import pyslam_utils
 WARNING: cannot import Orbslam2Feature2D from feature_orbslam2, check the file TROUBLESHOOTING.md
 WARNING: cannot import DiskFeature2D from feature_disk, check the file TROUBLESHOOTING.md
importing pygame
pygame 2.0.1 (SDL 2.0.14, Python 3.6.13)
Hello from the pygame community. https://www.pygame.org/contribute.html
initialising pygame
Processing Video Input
num frames:  1101
fps:  10.0
tracker_config:  {'num_features': 2000, 'num_levels': 8, 'scale_factor': 1.2, 'detector_type': <FeatureDetectorTypes.ORB2: 7>, 'descriptor_type': <FeatureDescriptorTypes.ORB2: 5>, 'match_ratio_test': 0.7, 'tracker_type': <FeatureTrackerTypes.DES_BF: 1>}
num_levels:  8
using opencv  4.5.3
Traceback (most recent call last):
  File "main_slam.py", line 81, in <module>
    feature_tracker = feature_tracker_factory(**tracker_config)
  File "/media/vivi/E/Documents/Kangyun/Projects/pyslam/feature_tracker.py", line 66, in feature_tracker_factory
    tracker_type = tracker_type)
  File "/media/vivi/E/Documents/Kangyun/Projects/pyslam/feature_tracker.py", line 201, in __init__
    descriptor_type=descriptor_type)                     
  File "/media/vivi/E/Documents/Kangyun/Projects/pyslam/feature_manager.py", line 97, in feature_manager_factory
    return FeatureManager(num_features, num_levels, scale_factor, detector_type, descriptor_type)
  File "/media/vivi/E/Documents/Kangyun/Projects/pyslam/feature_manager.py", line 291, in __init__
    self._feature_detector = Orbslam2Feature2D(self.num_features, self.scale_factor, orb2_num_levels) 
TypeError: 'NoneType' object is not callable
DavidTu21 commented 2 years ago

Hi there, may I ask how did you end up solving this issue? Really appreciate that if there is some hint/clue, thank you in advance for your time.

ochen1 commented 2 years ago

I solved it by building thirdparty/orbslam2_features