Colcon build resulted in following error:
`-- Found std_srvs: 4.9.1 (/opt/ros/humble/share/std_srvs/cmake)
CMake Error at CMakeLists.txt:25 (find_package):
By not providing "Findydlidar_sdk.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"ydlidar_sdk", but CMake did not find one.
Could not find a package configuration file provided by "ydlidar_sdk" with
any of the following names:
ydlidar_sdkConfig.cmake
ydlidar_sdk-config.cmake
Add the installation prefix of "ydlidar_sdk" to CMAKE_PREFIX_PATH or set
"ydlidar_sdk_DIR" to a directory containing one of the above files. If
"ydlidar_sdk" provides a separate development package or SDK, be sure it
has been installed.`
To fix these following lines were added to package.xml
--- a/src/tortoisebot/ydlidar_ros2_driver/package.xml
+++ b/src/tortoisebot/ydlidar_ros2_driver/package.xml
@@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>ydlidar_ros2_driver</name>
<version>1.0.1</version>
<description>
The ROS2 device driver for YDLIDAR LIDARS
</description>
<maintainer email="support@ydlidar.com">Tony</maintainer>
<license>MIT</license>
<buildtool_depend>ament_cmake</buildtool_depend>
<build_depend>rclcpp</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>visualization_msgs</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>std_srvs</build_depend>
+ <build_depend>ydlidar_sdk</build_depend>
<exec_depend>rclcpp</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>visualization_msgs</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>std_srvs</exec_depend>
+ <exec_depend>ydlidar_sdk</exec_depend>
<test_depend>ament_cmake_gtest</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<export>
<build_type>ament_cmake</build_type>
</export>
</package>
--- /dev/null
+++ b/src/tortoisebot/YDLidar-SDK/package.xml
@@
+<?xml version="1.0"?>
+<package format="3">
+ <name>ydlidar_sdk</name>
+ <version>1.2.6</version>
+ <description>YDLIDAR SDK library</description>
+ <maintainer email="support@ydlidar.com">Tony</maintainer>
+ <license>MIT</license>
+
+ <buildtool_depend>cmake</buildtool_depend>
+
+ <export>
+ <build_type>cmake</build_type>
+ </export>
+</package>
Colcon build resulted in following error:
`-- Found std_srvs: 4.9.1 (/opt/ros/humble/share/std_srvs/cmake)
CMake Error at CMakeLists.txt:25 (find_package):
By not providing "Findydlidar_sdk.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"ydlidar_sdk", but CMake did not find one.
Could not find a package configuration file provided by "ydlidar_sdk" with
any of the following names:
Add the installation prefix of "ydlidar_sdk" to CMAKE_PREFIX_PATH or set
"ydlidar_sdk_DIR" to a directory containing one of the above files. If
"ydlidar_sdk" provides a separate development package or SDK, be sure it
has been installed.`
To fix these following lines were added to package.xml