공부중
[터틀봇] CMake Error at CMakeLists.txt:18 (find_package): 본문
728x90
우분투 22.04
ros : humble
문제 :
mkdir -p ~/turtlebot3_ws/src/
git clone -b humble-devel https://github.com/ROBOTIS-GIT/DynamixelSDK.git
cd ~/turtlebot3_ws
colcon build --symlink-install
echo 'source ~/turtlebot3_ws/install/setup.bash' >> ~/.bashrc
source ~/.bashrc
과정에서 CMake Error at CMakeLists.txt:18 (find_package): 문제 발생
:~/turtlebot3_ws$ colcon build --symlink-install
Starting >>> dynamixel_sdk
Starting >>> dynamixel_sdk_custom_interfaces
--- stderr: dynamixel_sdk
CMake Error at CMakeLists.txt:18 (find_package):
By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"ament_cmake", but CMake did not find one.
Could not find a package configuration file provided by "ament_cmake" with
any of the following names:
ament_cmakeConfig.cmake
ament_cmake-config.cmake
Add the installation prefix of "ament_cmake" to CMAKE_PREFIX_PATH or set
"ament_cmake_DIR" to a directory containing one of the above files. If
"ament_cmake" provides a separate development package or SDK, be sure it
has been installed.
아래 방법으로 해결
ROS 2 Humble 작업 환경 설정 확인
setup.bash 파일을 소스하여 환경 설정을 해보세요:
source /opt/ros/humble/setup.bash
CMAKE_PREFIX_PATH 설정
ament_cmake 패키지가 설치된 위치를 CMake가 찾을 수 있도록 CMAKE_PREFIX_PATH 환경 변수를 설정합니다:
export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/opt/ros/humble
728x90
'인공지능...? > 터틀봇 프로젝트' 카테고리의 다른 글
[터틀봇3] error 해결 [spawn_entity]: Spawn service failed. Exiting. (0) | 2024.10.10 |
---|---|
[터틀봇] tf error: Invalid frame ID "odom" (0) | 2024.10.05 |
[터틀봇 프로젝트] 기본환경 세팅 (0) | 2024.10.01 |
아르곤 M.2 라즈베리파이 연결 (2) SSD 마운트 (1) | 2024.09.21 |
아르곤 M.2 라즈베리파이 연결 (2) | 2024.09.17 |