터틀봇3버거 slam 에러가 발생합니다

안녕하세요.
터틀봇3버거를 이용해서 SLAM기능을 사용하고자 하는데 계속 에러가 발생해서 문의 드립니다.
e-Manual에 Quick Start Guide의 ubuntu 22.04와 ros2 humble 버전 사용해서 설명 그대로 다 입력했습니다.
e-Manual 4.1의 '$ ros2 launch turtlebot3_bringup robot.launch.py’를 입력하면 다음과 같이 에러가 발생합니다.

[ERROR] [cartographer_node-1]: process has died [pid 11792, exit code -6, cmd ‘/opt/ros/humble/lib/cartographer_ros/cartographer_node -configuration_directory /home/kim/turtlebot3_ws/install/turtlebot3_cartographer/share/turtlebot3_cartographer/config -configuration_basename turtlebot3_lds_2d.lua --ros-args -r __node:=cartographer_node --params-file /tmp/launch_params_prasogvn’].

혹시나해서 remote pc와 라즈베리파이를 초기화하고 처음부터 다시 시작해서 했는데도 같은 에러가 발생해서 문의드립니다.

안녕하세요.

로그를 보니 Cartographer 실행 중 설정 파일(turtlebot3_lds_2d.lua)을 찾지 못하거나, Cartographer 패키지가 제대로 설치되지 않은 것이 원인일 가능성이 큽니다.

이 문제를 해결하기 위해 아래 단계를 따라 진행해 주세요.

:pushpin: Cartographer 패키지 및 설정 파일 확인 방법

:one: Cartographer 패키지가 설치되어 있는지 확인하세요.

ros2 pkg list | grep cartographer

:point_right: 만약 설치되지 않았다면, 아래 명령어로 패키지를 설치해 주세요.

sudo apt install ros-humble-cartographer ros-humble-cartographer-ros

:two: Cartographer 설정 파일(turtlebot3_lds_2d.lua)이 있는지 확인하세요.

ls ~/turtlebot3_ws/install/turtlebot3_cartographer/share/turtlebot3_cartographer/config/

:point_right: 해당 파일이 없다면, 아래 명령어를 실행하여 turtlebot3_cartographer 패키지를 다시 빌드해 주세요.

cd ~/turtlebot3_ws
colcon build --packages-select turtlebot3_cartographer --symlink-install
source install/setup.bash

:pushpin: Check Cartographer Package and Configuration Files

:one: Verify that the Cartographer package is installed.

ros2 pkg list | grep cartographer

:point_right: If the package is not installed, run the following command to install it:

sudo apt install ros-humble-cartographer ros-humble-cartographer-ros

:two: Check if the Cartographer configuration file (turtlebot3_lds_2d.lua) exists.

ls ~/turtlebot3_ws/install/turtlebot3_cartographer/share/turtlebot3_cartographer/config/

:point_right: If the file is missing, rebuild the turtlebot3_cartographer package using:

cd ~/turtlebot3_ws
colcon build --packages-select turtlebot3_cartographer --symlink-install
source install/setup.bash

ros2 pkg list | grep cartographer → cartographer_ros
cartographer_ros_msgs
turtlebot3_cartographer

ls ~/turtlebot3_ws/install/turtlebot3_cartographer/share/turtlebot3_cartographer/config/

turtlebot3_lds_2d.lua

이렇게 출력되면 정상적으로 설치된거 맞지 않나요?

안녕하세요.
정상적으로 설치 된 것 같습니다.

먼저 https://youtu.be/_-bv8VPwkZs?feature=shared 해당 동영상을 따라 하신다면 문제 없이 진행되어야 합니다.

혹시 SBC에서 bringup 이후 Remote PC에서 다음 커맨드를 통해 Keyboard 에서 정상 작동을 확인하셨나요??

또 자세한 확인을 위해 TurtleBot3 SBC에서 $ ros2 launch turtlebot3_bringup robot.launch.py 을 입력했을 때의 전체 커맨드 창과 스크린 샷을 첨부해 주실 수 있나요?
감사합니다.

추가로, ros2 launch turtlebot3_cartographer cartographer.launch.py 실행하면
우분투 경고 창과 함께
프로그램 cartographer_node이(가) 예상치 않게 끝났습니다. 가 나옵니다

키보드 waxd로 움직이는거와 s로 멈추는거는 동작됩니다.
신규 유저는 사진 등록이 안 된다하여 커맨드 창 복사+붙여넣기로 알려드리겠습니다.

ubuntu@ubuntu:~$ ros2 launch turtlebot3_bringup robot.launch.py
[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2025-03-04-07-53-42-235739-ubuntu-1300
[INFO] [launch]: Default logging verbosity is set to INFO
urdf_file_name : turtlebot3_burger.urdf
[INFO] [robot_state_publisher-1]: process started with pid [1301]
[INFO] [ld08_driver-2]: process started with pid [1303]
[INFO] [turtlebot3_ros-3]: process started with pid [1305]
[turtlebot3_ros-3] [INFO] [1741074822.607686072] [turtlebot3_node]: Init TurtleBot3 Node Main
[turtlebot3_ros-3] [INFO] [1741074822.609663200] [turtlebot3_node]: Init DynamixelSDKWrapper
[turtlebot3_ros-3] [INFO] [1741074822.612877370] [DynamixelSDKWrapper]: Succeeded to open the port(/dev/ttyACM0)!
[turtlebot3_ros-3] [INFO] [1741074822.620636732] [DynamixelSDKWrapper]: Succeeded to change the baudrate!
[robot_state_publisher-1] [INFO] [1741074822.629681636] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-1] [INFO] [1741074822.630098496] [robot_state_publisher]: got segment base_link
[robot_state_publisher-1] [INFO] [1741074822.630159756] [robot_state_publisher]: got segment base_scan
[robot_state_publisher-1] [INFO] [1741074822.630192090] [robot_state_publisher]: got segment caster_back_link
[robot_state_publisher-1] [INFO] [1741074822.630221961] [robot_state_publisher]: got segment imu_link
[robot_state_publisher-1] [INFO] [1741074822.630248350] [robot_state_publisher]: got segment wheel_left_link
[robot_state_publisher-1] [INFO] [1741074822.630273628] [robot_state_publisher]: got segment wheel_right_link
[turtlebot3_ros-3] [INFO] [1741074822.661699882] [turtlebot3_node]: Start Calibration of Gyro
[ld08_driver-2] /dev/ttyUSB0 CP2102 USB to UART Bridge Controller
[ld08_driver-2] /dev/ttyACM0 OpenCR Virtual ComPort in FS Mode
[ld08_driver-2] FOUND LDS-02
[ld08_driver-2] LDS-02 started successfully
[turtlebot3_ros-3] [INFO] [1741074827.661926203] [turtlebot3_node]: Calibration End
[turtlebot3_ros-3] [INFO] [1741074827.662054575] [turtlebot3_node]: Add Motors
[turtlebot3_ros-3] [INFO] [1741074827.662602639] [turtlebot3_node]: Add Wheels
[turtlebot3_ros-3] [INFO] [1741074827.662972792] [turtlebot3_node]: Add Sensors
[turtlebot3_ros-3] [INFO] [1741074827.668327871] [turtlebot3_node]: Succeeded to create battery state publisher
[turtlebot3_ros-3] [INFO] [1741074827.673119145] [turtlebot3_node]: Succeeded to create imu publisher
[turtlebot3_ros-3] [INFO] [1741074827.676607585] [turtlebot3_node]: Succeeded to create sensor state publisher
[turtlebot3_ros-3] [INFO] [1741074827.680288491] [turtlebot3_node]: Succeeded to create joint state publisher
[turtlebot3_ros-3] [INFO] [1741074827.680405085] [turtlebot3_node]: Add Devices
[turtlebot3_ros-3] [INFO] [1741074827.680448030] [turtlebot3_node]: Succeeded to create motor power server
[turtlebot3_ros-3] [INFO] [1741074827.682992586] [turtlebot3_node]: Succeeded to create reset server
[turtlebot3_ros-3] [INFO] [1741074827.684999356] [turtlebot3_node]: Succeeded to create sound server
[turtlebot3_ros-3] [INFO] [1741074827.687006997] [turtlebot3_node]: Run!
[turtlebot3_ros-3] [INFO] [1741074827.721300351] [diff_drive_controller]: Init Odometry
[turtlebot3_ros-3] [INFO] [1741074827.732369402] [diff_drive_controller]: Run!

해당 커맨드 로그에 문제가 없고 키보드 조작에 문제가 없다 하셨으니 bringup 은 문제 없어 보입니다.

처음에

이렇게 말씀하셨는데

이 로그는 remote PC에서 $ ros2 launch turtlebot3_cartographer cartographer.launch.py 입력했을 때 나오는 건가요?

해당 로그가 나오는 커맨드창 복사 붙여넣기 부탁드립니다.

이 말씀으론 Remote PC의 성능 문제일 수 있을것 같습니다. 해당 문제일 가능성이 있는지 확인해주세요.

해당 링크에 사진을 첨부해 등록해주셔도 됩니다!

네 remote PC에서 입력했을 때 나오는 문제입니다.

[INFO] [launch]: All log files can be found below /home/kim/.ros/log/2025-03-04-18-01-45-884286-kim-VivoBook-ASUSLaptop-X403JA-X403JA-11274
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [cartographer_node-1]: process started with pid [11275]
[INFO] [cartographer_occupancy_grid_node-2]: process started with pid [11277]
[INFO] [rviz2-3]: process started with pid [11279]
[rviz2-3] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[cartographer_node-1] [INFO] [1741078905.985851686] [cartographer logger]: I0304 18:01:45.000000 11275 configuration_file_resolver.cc:41] Found ‘/home/kim/turtlebot3_ws/install/turtlebot3_cartographer/share/turtlebot3_cartographer/config/turtlebot3_lds_2d.lua’ for ‘turtlebot3_lds_2d.lua’.
[cartographer_node-1] [INFO] [1741078905.986144196] [cartographer logger]: I0304 18:01:45.000000 11275 configuration_file_resolver.cc:41] Found ‘/opt/ros/humble/share/cartographer/configuration_files/map_builder.lua’ for ‘map_builder.lua’.
[cartographer_node-1] [INFO] [1741078905.986166673] [cartographer logger]: I0304 18:01:45.000000 11275 configuration_file_resolver.cc:41] Found ‘/opt/ros/humble/share/cartographer/configuration_files/map_builder.lua’ for ‘map_builder.lua’.
[cartographer_node-1] [INFO] [1741078905.986210212] [cartographer logger]: I0304 18:01:45.000000 11275 configuration_file_resolver.cc:41] Found ‘/opt/ros/humble/share/cartographer/configuration_files/pose_graph.lua’ for ‘pose_graph.lua’.
[cartographer_node-1] [INFO] [1741078905.986241419] [cartographer logger]: I0304 18:01:45.000000 11275 configuration_file_resolver.cc:41] Found ‘/opt/ros/humble/share/cartographer/configuration_files/pose_graph.lua’ for ‘pose_graph.lua’.
[cartographer_node-1] [INFO] [1741078905.986356075] [cartographer logger]: I0304 18:01:45.000000 11275 configuration_file_resolver.cc:41] Found ‘/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder.lua’ for ‘trajectory_builder.lua’.
[cartographer_node-1] [INFO] [1741078905.986371456] [cartographer logger]: I0304 18:01:45.000000 11275 configuration_file_resolver.cc:41] Found ‘/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder.lua’ for ‘trajectory_builder.lua’.
[cartographer_node-1] [INFO] [1741078905.986399571] [cartographer logger]: I0304 18:01:45.000000 11275 configuration_file_resolver.cc:41] Found ‘/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder_2d.lua’ for ‘trajectory_builder_2d.lua’.
[cartographer_node-1] [INFO] [1741078905.986411929] [cartographer logger]: I0304 18:01:45.000000 11275 configuration_file_resolver.cc:41] Found ‘/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder_2d.lua’ for ‘trajectory_builder_2d.lua’.
[cartographer_node-1] [INFO] [1741078905.986504320] [cartographer logger]: I0304 18:01:45.000000 11275 configuration_file_resolver.cc:41] Found ‘/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder_3d.lua’ for ‘trajectory_builder_3d.lua’.
[cartographer_node-1] [INFO] [1741078905.986517918] [cartographer logger]: I0304 18:01:45.000000 11275 configuration_file_resolver.cc:41] Found ‘/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder_3d.lua’ for ‘trajectory_builder_3d.lua’.
[cartographer_node-1] [INFO] [1741078905.998973353] [cartographer logger]: I0304 18:01:45.000000 11275 map_builder_bridge.cpp:136] Added trajectory with ID ‘0’.
[cartographer_node-1] F0304 18:01:46.033547 11275 sensor_bridge.cpp:33] Check failed: frame_id[0] != ‘/’ (‘/’ vs. ‘/’) The frame_id /base_footprint should not start with a /. See 1.7 in tf2/Migration - ROS Wiki.
[cartographer_node-1] [FATAL] [1741078906.033895458] [cartographer logger]: F0304 18:01:46.000000 11275 sensor_bridge.cpp:33] Check failed: frame_id[0] != ‘/’ (‘/’ vs. ‘/’) The frame_id /base_footprint should not start with a /. See 1.7 in tf2/Migration - ROS Wiki.
[rviz2-3] [INFO] [1741078906.572663893] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-3] [INFO] [1741078906.572795080] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-3] [INFO] [1741078906.590103604] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-3] [WARN] [1741078906.731736338] [rviz2]: New publisher discovered on topic ‘/scan’, offering incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY
[cartographer_node-1] *** Check failure stack trace: ***
[cartographer_node-1] @ 0x7776c1ffab03 google::LogMessage::Fail()
[cartographer_node-1] @ 0x7776c20029d1 google::LogMessage::SendToLog()
[cartographer_node-1] @ 0x7776c1ffa7c2 google::LogMessage::Flush()
[cartographer_node-1] @ 0x7776c1ffc78f google::LogMessageFatal::~LogMessageFatal()
[cartographer_node-1] @ 0x62895b61a7e2 (unknown)
[cartographer_node-1] @ 0x62895b61d08e (unknown)
[cartographer_node-1] @ 0x62895b597606 (unknown)
[cartographer_node-1] @ 0x62895b5c454f (unknown)
[cartographer_node-1] @ 0x62895b60ad5f (unknown)
[cartographer_node-1] @ 0x62895b5ffb0c (unknown)
[cartographer_node-1] @ 0x7776c22f482c rclcpp::Executor::execute_subscription()
[cartographer_node-1] @ 0x7776c22f502f rclcpp::Executor::execute_any_executable()
[cartographer_node-1] @ 0x7776c22fc9f0 rclcpp::executors::SingleThreadedExecutor::spin()
[cartographer_node-1] @ 0x7776c22fcc63 rclcpp::spin()
[cartographer_node-1] @ 0x7776c22fcdbf rclcpp::spin()
[cartographer_node-1] @ 0x62895b588704 (unknown)
[cartographer_node-1] @ 0x7776c0e29d90 (unknown)
[cartographer_node-1] @ 0x7776c0e29e40 __libc_start_main
[cartographer_node-1] @ 0x62895b58b7f5 (unknown)
[ERROR] [cartographer_node-1]: process has died [pid 11275, exit code -6, cmd ‘/opt/ros/humble/lib/cartographer_ros/cartographer_node -configuration_directory /home/kim/turtlebot3_ws/install/turtlebot3_cartographer/share/turtlebot3_cartographer/config -configuration_basename turtlebot3_lds_2d.lua --ros-args -r __node:=cartographer_node --params-file /tmp/launch_params_1txr4n7k’].

추가로 remote PC 성능 문제일 수도 있다하셨는데, 실행하기 위한 권장 사양이 있나요?

Remote PC를 라즈베리파이 같은 SBC로 설정하면 원활하게 동작하지 않을 수 있습니다.
하지만 Vivobook 정도의 성능이라면 충분히 실행 가능해야 하므로, 세팅이 잘못되었을 가능성이 큽니다.


:white_check_mark: 1. TurtleBot3 패키지 삭제 및 다시 클론

먼저, 기존의 TurtleBot3 레포지토리를 삭제하고, 최신 버전(main 브랜치)을 다시 다운로드하세요.

cd ~/turtlebot3_ws/src
rm -rf turtlebot3
git clone -b main https://github.com/ROBOTIS-GIT/turtlebot3.git

:white_check_mark: 2. Remote PC의 설정을 다시 진행

먼저 매뉴얼을 참고하여 Remote PC의 세팅을 다시 한번 확인해 주세요.


:white_check_mark: 3. 워크스페이스 정리 및 빌드

이후 아래 명령어를 실행하여 워크스페이스를 정리하고 다시 빌드한 뒤 실행해 보시기 바랍니다.

cd ~/turtlebot3_ws
rm -rf build install log
colcon build --symlink-install
source install/local_setup.bash

:white_check_mark: 4. Cartographer 실행

다시 Cartographer를 실행하여 문제가 해결되었는지 확인해 주세요.

ros2 launch turtlebot3_cartographer cartographer.launch.py

이 단계를 진행한 후에도 문제가 지속된다면, 오류 로그를 공유해 주세요.

혹시 리눅스를 직접 설치해서 쓰시나요 아님 가상 머신을 쓰고 계신가요??

가상 머신을 쓸 경우 안되는 것들이 많아 저희는 추천드리지 않습니다.

이후에도 같은 문제가 발생한다면 Docker를 활용하여 실행하는 방법을 시도해보겠습니다.


:white_check_mark: 1. Docker 설치

먼저, 공식 홈페이지의 가이드를 참고하여 Docker를 설치해 주세요.
:point_right: Docker 설치 가이드


:white_check_mark: 2. 새로운 작업공간 생성 및 TurtleBot3 패키지 다운로드

다음 명령어를 실행하여 새로운 폴더를 만들고, TurtleBot3 패키지를 클론합니다.

mkdir ~/tmp_ws && cd ~/tmp_ws
git clone https://github.com/ROBOTIS-GIT/turtlebot3.git

:white_check_mark: 3. Docker 환경에서 실행

:one: TurtleBot3 폴더로 이동

cd ~/tmp_ws/turtlebot3

:two: Docker에서 GUI 접근 권한 부여

xhost +local:docker

:three: Docker 컨테이너 실행

docker compose up -d

:four: Docker 컨테이너 내부로 접근

docker compose exec ros2 bash

:white_check_mark: 4. ROS2 환경 설정 후 실행

:one: ROS2 통신을 위해 ROS_DOMAIN_ID 설정

echo "export ROS_DOMAIN_ID=30" >> ~/.bashrc
source ~/.bashrc

:two: Cartographer 실행 테스트

ros2 launch turtlebot3_cartographer cartographer.launch.py

이 과정을 따라 진행한 후 정상적으로 실행되는지 확인해 주세요.

colcon build --symlink-install 입력했을 때

ros2 launch turtlebot3_cartographer cartographer.launch.py 입력했을 때

가상 머신은 안 쓰고 있고, 윈도우와 우분투 듀얼부팅으로 사용하고있습니다.

안녕하세요.
담당자 분에게 확인 해보니 turtlebot3 저장소의 humble 버전에서 나타나는 결과인것 같습니다.
혹시 올려주신 터미널 이미지들이 위의 안내(터틀봇3버거 slam 에러가 발생합니다 - #10 by YunWonho)를 따라 하신 결과인가요??

만약 안하셨더라면 다음을 따라 주세요.

1. TurtleBot3 패키지 삭제 및 다시 클론

먼저, 기존의 TurtleBot3 레포지토리를 삭제하고, 최신 버전(main 브랜치)을 다시 다운로드하세요.

cd ~/turtlebot3_ws/src
rm -rf turtlebot3
git clone -b main https://github.com/ROBOTIS-GIT/turtlebot3.git

2. 워크스페이스 정리 및 빌드

이후 아래 명령어를 실행하여 워크스페이스를 정리하고 다시 빌드한 뒤 실행해 보시기 바랍니다.

cd ~/turtlebot3_ws
rm -rf build install log
colcon build --symlink-install
source install/local_setup.bash

main 버전의 브렌치로 clone 해주시고 문제가 다시 발생한다면 알려주세요.
감사합니다.

네, 위 내용은 말씀해주신 부분 다시 해보고서 실행한 결과입니다.

안녕하세요. 답변이 늦어 죄송합니다.

먼저 매뉴얼을 참고하여 처음부터 다시 한번 설치 및 설정을 진행해 주세요.
:point_right: TurtleBot3 매뉴얼

만약 매뉴얼을 따라 다시 진행했음에도 같은 문제가 발생한다면, 이슈가 쉽게 해결되지 않는 문제일 수 있습니다.
이 경우, 개발자들과 공유하고 문제를 추적 및 관리하기 위해 GitHub 이슈 탭에 내용을 작성해 주세요.

:link: GitHub 이슈 작성 링크:
:point_right: TurtleBot3 GitHub Issues

이슈를 작성할 때는 issue 탬플릿발생한 오류 로그, 실행 환경(OS, ROS 버전 등), 시도해본 해결 방법을 포함해 주시면 보다 정확한 대응이 가능합니다.

감사합니다.

혹시 전선에 문제가 있는 걸까요?
설명서에는 빨-파-초-노이고 ridar 부분도 빨파초노인데
3층 연결 선은 빨초파노로 되어있어요.

전선 배열은 저희 터틀봇과 똑같습니다.
라이다부분은 빨-파-초-노, 3층에는 0-빨-초-0-파-0-노-0 로 되어있습니다.