0
$\begingroup$

Im trying to use the github package for 2D LiDAR-based odometry in ROS2 humble. This is the package github Simple-2D-LiDAR-Odometry

I installed the dependencies required with

sudo apt-get install libeigen3-dev libpcl-dev

Then when try to run rosdep install -i --from-path src --rosdistro humble -y I got the following error:

ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: lidar_odometry: Cannot locate

rosdep definition for [PCL]

I tried to search everything but still no help. The package .xml file is

<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
  <name>lidar_odometry</name>
  <version>1.0.0</version>
  <description>2D LiDAR Odometry package. using GICP</description>
  <maintainer email="[email protected]">KDW</maintainer>
  <license>Apache 2.0</license>

  <buildtool_depend>ament_cmake</buildtool_depend>

  <test_depend>ament_lint_auto</test_depend>
  <test_depend>ament_lint_common</test_depend>
  
  <depend>rclcpp</depend>
  <depend>nav_msgs</depend>
  <depend>sensor_msgs</depend>
  <depend>geometry_msgs</depend>
  <depend>Eigen3</depend>
  <depend>PCL</depend>
  <depend>laser_geometry</depend>
  <depend>pcl_conversions</depend>
  <depend>tf2</depend>
  <depend>tf2_eigen</depend>

  <export>
    <build_type>ament_cmake</build_type>
  </export>
</package>

Any help?

$\endgroup$

1 Answer 1

1
$\begingroup$

I'll explain the error first and then get to further details.

ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: lidar_odometry: Cannot locate

This error is expected, mainly because the package lidar_odometry is not a system dependency, instead it is a simple ROS 2 package. When you ask the rosdep tool to find the dependencies for the packages located in src, and install them, it fails to find any dependencies for the package named lidar_odometry, since it is not yet listed in the rosdistro.

You can try to simply run the nodes from the lidar_odometry package, it should be working fine if you have the PCL library installed, as you said in your question.

You would simply need to install the libraries mentioned in the README, clone it into the src directory of your workspace, and run colcon build from the root of your workspace.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.