LoginSignup
0
0

ubuntu24.04LTS, ROS2 Jazzy環境でLIVOXを使う

Posted at

はじめに

ubuntu24.04LTS, ROS2 Jazzy環境でもLiVOX-SDK2とlivox_ros_driver2使うことができたが、SDK2に一部変更が必要だったので、LiVOX-SDK2とlivox_ros_driver2インストールからrviz2で点群を確認するまでのメモです。

Livox-SDK2のインストール

git clone https://github.com/Livox-SDK/Livox-SDK2.git
cd Livox-SDK2/
mkdir build
cd build
cmake .. && make -j
sudo make install

git clone したらコードの編集
sdk_core/comm/define.hとsdk_core/logger_handler/file_manager.h に以下を追加します。

#include <cstdint>

livox_ros_driver2のインストール

mkdir  -p  livox_ws/src
cd livox_ws/src/
git clone https://github.com/Livox-SDK/livox_ros_driver2.git
cd livox_ros_driver2
./build.sh humble

PCLがないというエラーがでる。

~/livox_ws/src/livox_ros_driver2$ ./build.sh humble
Working Path: /home/mori/livox_ws/src/livox_ros_driver2
ROS version is: ROS2
Starting >>> livox_ros_driver2
--- stderr: livox_ros_driver2                         
CMake Error at /opt/ros/jazzy/share/pcl_conversions/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package):
  By not providing "FindPCL.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "PCL", but
  CMake did not find one.

  Could not find a package configuration file provided by "PCL" with any of
  the following names:

    PCLConfig.cmake
    pcl-config.cmake

  Add the installation prefix of "PCL" to CMAKE_PREFIX_PATH or set "PCL_DIR"
  to a directory containing one of the above files.  If "PCL" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  /opt/ros/jazzy/share/pcl_conversions/cmake/pcl_conversionsConfig.cmake:41 (include)
  /opt/ros/jazzy/share/ament_cmake_auto/cmake/ament_auto_find_build_dependencies.cmake:67 (find_package)
  CMakeLists.txt:225 (ament_auto_find_build_dependencies)

PCLインストールして再度 ./build実行

sudo apt install libpcl-dev ros-jazzy-pcl-ros
./build.sh humble

参考記事

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0