MISTLab / Swarm-SLAM

Sparse Decentralized Collaborative Simultaneous Localization and Mapping Framework for Multi-Robot Systems
https://lajoiepy.github.io/cslam_documentation/html/index.html
MIT License
391 stars 40 forks source link

Issue for executing KITTI bag files. #3

Closed minje-KIM closed 1 year ago

minje-KIM commented 1 year ago

hello! i have an issue when executing KITTI open-datasets.

Do you have any advice for these errors?

[pose_graph_manager-5] [INFO] [1679576950.931437450] [r0.cslam_pose_graph_manager]: Visualization enabled.
[pose_graph_manager-5] [INFO] [1679576950.938801026] [r0.cslam_pose_graph_manager]: Simulated rendezvous schedule of robot 0,3500,10800
[pose_graph_manager-5] [INFO] [1679576950.938833371] [r0.cslam_pose_graph_manager]: Initialization done.
[map_manager-4] [INFO] [1679576951.113992534] [r0.cslam_map_manager]: Initialization done.
[loop_closure_detection_node.py-3] [INFO] [1679576952.702047141] [r0.cslam_loop_closure_detection]: Using CosPlace. (default)
[loop_closure_detection_node.py-3] [INFO] [1679576953.389402179] [r0.cslam_loop_closure_detection]: loading checkpoint '/home/user/Swarm-SLAM/install/cslam/share/cslam/models/resnet101_512.pth'
[loop_closure_detection_node.py-3] /home/user/.local/lib/python3.8/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
[loop_closure_detection_node.py-3]   warnings.warn(
[loop_closure_detection_node.py-3] /home/user/.local/lib/python3.8/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=ResNet101_Weights.IMAGENET1K_V1`. You can also use `weights=ResNet101_Weights.DEFAULT` to get the most up-to-date weights.
[loop_closure_detection_node.py-3]   warnings.warn(msg)
[loop_closure_detection_node.py-3] /home/user/.local/lib/python3.8/site-packages/torchvision/transforms/transforms.py:329: UserWarning: Argument 'interpolation' of type int is deprecated since 0.13 and will be removed in 0.15. Please use InterpolationMode enum.
[loop_closure_detection_node.py-3]   warnings.warn(
[loop_closure_detection_node.py-3] Traceback (most recent call last):
[loop_closure_detection_node.py-3]   File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_generator_py/import_type_support_impl.py", line 46, in import_type_support
[loop_closure_detection_node.py-3]     return importlib.import_module(module_name, package=pkg_name)
[loop_closure_detection_node.py-3]   File "/home/user/anaconda3/envs/cslam2/lib/python3.8/importlib/__init__.py", line 127, in import_module
[loop_closure_detection_node.py-3]     return _bootstrap._gcd_import(name[level:], package, level)
[loop_closure_detection_node.py-3]   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
[loop_closure_detection_node.py-3]   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
[loop_closure_detection_node.py-3]   File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
[loop_closure_detection_node.py-3] ModuleNotFoundError: No module named 'cslam_common_interfaces.cslam_common_interfaces_s__rosidl_typesupport_c'
[loop_closure_detection_node.py-3]
[loop_closure_detection_node.py-3] During handling of the above exception, another exception occurred:
[loop_closure_detection_node.py-3]
[loop_closure_detection_node.py-3] Traceback (most recent call last):
[loop_closure_detection_node.py-3]   File "/home/user/Swarm-SLAM/install/cslam/lib/cslam/loop_closure_detection_node.py", line 107, in <module>
[loop_closure_detection_node.py-3]     lcd = LoopClosureDetection()
[loop_closure_detection_node.py-3]   File "/home/user/Swarm-SLAM/install/cslam/lib/cslam/loop_closure_detection_node.py", line 97, in __init__
[loop_closure_detection_node.py-3]     self.glcd = GlobalDescriptorLoopClosureDetection(
[loop_closure_detection_node.py-3]   File "/home/user/Swarm-SLAM/install/cslam/lib/python3.9/site-packages/cslam/global_descriptor_loop_closure_detection.py", line 66, in __init__
[loop_closure_detection_node.py-3]     self.global_descriptor_publisher = self.node.create_publisher(
[loop_closure_detection_node.py-3]   File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/node.py", line 1144, in create_publisher
[loop_closure_detection_node.py-3]     check_for_type_support(msg_type)
[loop_closure_detection_node.py-3]   File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/type_support.py", line 29, in check_for_type_support
[loop_closure_detection_node.py-3]     msg_type.__class__.__import_type_support__()
[loop_closure_detection_node.py-3]   File "/home/user/Swarm-SLAM/install/cslam_common_interfaces/lib/python3.9/site-packages/cslam_common_interfaces/msg/_global_descriptors.py", line 27, in __import_type_support__
[loop_closure_detection_node.py-3]     module = import_type_support('cslam_common_interfaces')
[loop_closure_detection_node.py-3]   File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_generator_py/import_type_support_impl.py", line 48, in import_type_support
[loop_closure_detection_node.py-3]     raise UnsupportedTypeSupport(pkg_name)
[loop_closure_detection_node.py-3] rosidl_generator_py.import_type_support_impl.UnsupportedTypeSupport: Could not import 'rosidl_typesupport_c' for package 'cslam_common_interfaces'
[ERROR] [loop_closure_detection_node.py-3]: process has died [pid 2343015, exit code 1, cmd '/home/user/Swarm-SLAM/install/cslam/lib/cslam/loop_closure_detection_node.py --ros-args -r __node:=cslam_loop_closure_detection -r __ns:=/r0 --params-file /home/user/Swarm-SLAM/install/cslam_experiments/share/cslam_experiments/config/kitti_stereo.yaml --params-file /tmp/launch_params_2d376iss'].
[INFO] [bag-7]: process started with pid [2343315]
[bag-7] [ERROR] [1679576976.225999835] [rosbag2_storage]: Could not open '/home/user/Swarm-SLAM/install/cslam_experiments/share/cslam_experiments/data/KITTI360-09_5robots/KITTI360-09-0/kitti_2011_09_26_drive_0009_synced.bag' with 'sqlite3'. Error: Failed to setup storage. Error: Error when processing SQL statement. SQLite error (26): file is not a database
[bag-7] [ERROR] [1679576976.226025581] [rosbag2_storage]: Could not load/open plugin with storage id 'sqlite3'.
[bag-7] [ERROR] [1679576976.226039745] [rosbag2_transport]: Failed to play: No storage could be initialized. Abort
[INFO] [bag-7]: process has finished cleanly [pid 2343315]
lajoiepy commented 1 year ago

It seems that the cslam_common_interfaces package is not found.

  1. Make sure the cslam_common_interfaces package is in your src folder
  2. Try rm -r build install log and rebuild.
  3. Make sure to source your workspace before launching : source install/setup.bash

As for the bag error, it seems that you are running a ROS 1 bag instead of a ROS 2 one. So you either need to convert it from ROS 1 to ROS 2 or run the ros1_bridge in parallel