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

Error in datasets_experiments #21

Closed rocker12121 closed 7 months ago

rocker12121 commented 1 year ago

Hello. When I run "ros2 launch graco_lidar.launch.py", it gives me the following error:

[INFO] [launch]: All log files can be found below /home/e/.ros/log/2023-08-23-11-20-19-430029-e-217451 [INFO] [launch]: Default logging verbosity is set to INFO Task exception was never retrieved future: <Task finished name='Task-2' coro=<LaunchService._process_one_event() done, defined at /opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py:226> exception=PackageNotFoundError("package 'cslam_experiments' not found, searching: ['/opt/ros/foxy']")> Traceback (most recent call last): File "/opt/ros/foxy/lib/python3.8/site-packages/ament_index_python/packages.py", line 50, in get_package_prefix content, package_prefix = get_resource('packages', package_name) File "/opt/ros/foxy/lib/python3.8/site-packages/ament_index_python/resources.py", line 48, in get_resource raise LookupError( LookupError: Could not find the resource 'cslam_experiments' of type 'packages'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 228, in _process_one_event await self.__process_event(next_event) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 248, in process_event visit_all_entities_and_collect_futures(entity, self.context)) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context) [Previous line repeated 1 more time] File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 38, in visit_all_entities_and_collect_futures sub_entities = entity.visit(context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/action.py", line 108, in visit return self.execute(context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/opaque_function.py", line 75, in execute return self.function(context, *self.args, **self.__kwargs) File "graco_lidar.launch.py", line 16, in launch_setup get_package_share_directory("cslam_experiments"), "config/") File "/opt/ros/foxy/lib/python3.8/site-packages/ament_index_python/packages.py", line 70, in get_package_share_directory return os.path.join(get_package_prefix(package_name), 'share', package_name) File "/opt/ros/foxy/lib/python3.8/site-packages/ament_index_python/packages.py", line 52, in get_package_prefix raise PackageNotFoundError( ament_index_python.packages.PackageNotFoundError: "package 'cslam_experiments' not found, searching: ['/opt/ros/foxy']"

Please let me know what is causing this. Thanks in advance.

lajoiepy commented 1 year ago

Hi! The cslam_experiments seems not to be in your path. Have you sourced the ROS 2 worskpace? source install/setup.bash?

rocker12121 commented 1 year ago

Hello, Thanks for your response.

Yes, I have sourced the ros2 workspace. and I am running this from /home/e/Swarm-SLAM/src/cslam_experiments/launch/dataset_experiments directory. What could be the possible reason for this problem?

HaynesLi commented 9 months ago

The same situation. Did you solve this error, bro?

rocker12121 commented 9 months ago

yes, I solved it. Do you have the same error?

HaynesLi commented 9 months ago

yes, I solved it. Do you have the same error?

How could you solve it? I found I even met worse case, after I "colcon build", I ran "colcon test" then I found I could not find this file "Cannot find file: /root/Swarm-SLAM/build/gtsam/DartConfiguration.tcl" and the later process need some files of gtsam I did not have neither.

rocker12121 commented 9 months ago

rebuild the gtsam with version 4.1.1 and after sudo make install, make sure you do "sudo ldconfig"

And for ROS 2 dependencies, execute these commands:

  1. sudo apt install python3-rosdep python3-colcon-common-extensions
  2. source /opt/ros/foxy/setup.bash
  3. sudo rosdep init
  4. sudo rosdep update --include-eol-distros
  5. sudo rosdep install --from-paths src -y --ignore-src --rosdistro foxy

and then build again.. I hope it helps

after the build is successful, you need to download Graco dataset (first 3 ground sequences). Make sure you have installed teaser as you are working with LiDAR dataset: https://teaser.readthedocs.io/en/latest/installation.html#installing-python-bindings

HaynesLi commented 9 months ago

rebuild the gtsam with version 4.1.1 and after sudo make install, make sure you do "sudo ldconfig"

And for ROS 2 dependencies, execute these commands:

1. sudo apt install python3-rosdep python3-colcon-common-extensions

2. source /opt/ros/foxy/setup.bash

3. sudo rosdep init

4. sudo rosdep update --include-eol-distros

5. sudo rosdep install --from-paths src -y --ignore-src --rosdistro foxy

and then build again.. I hope it helps

after the build is successful, you need to download Graco dataset (first 3 ground sequences). Make sure you have installed teaser as you are working with LiDAR dataset: https://teaser.readthedocs.io/en/latest/installation.html#installing-python-bindings

It seems not because of this reason. the package 'cslam_experiments' is not in the ros2 work space

lajoiepy commented 7 months ago

Sorry for the very late reply, I was on an internship and had no time for support. Few comments: