작업환경 : Ubuntu 20.04 LTS, ROS Foxy, Gazebo11
기본 세팅
- SLAM 라이브러리 설치
sudo apt install ros-foxy-cartographer
sudo apt install ros-foxy-cartographer-ros
- 내비게이션2 설치
sudo apt install ros-foxy-navigation2
sudo apt install ros-foxy-nav2-bringup
- TurtleBot3 패키지 설치
source ~/.bashrc
sudo apt install ros-foxy-dynamixel-sdk
sudo apt install ros-foxy-turtlebot3-msgs
sudo apt install ros-foxy-turtlebot3
- 환경 구성
echo 'export ROS_DOMAIN_ID=30 #TURTLEBOT3' >> ~/.bashrc
echo 'export TURTLEBOT3_MODEL=burger' >> ~/.bashrc
source ~/.bashrc
- 워크스페이스 세팅
mkdir turtlebot3_ws/src
cd turtlebot3_ws/src
git clone -b foxy-devel <https://github.com/ROBOTIS-GIT/turtlebot3.git>
git clone -b foxy-devel <https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git>
git clone -b foxy-devel <https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git>
colcon build --symlink-install
Gazebo 구동
- 빈 세계
ros2 launch turtlebot3_gazebo empty_world.launch.py
- TurtleBot3 월드
ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
Gazebo 구동
- 빈 세계
ros2 launch turtlebot3_gazebo empty_world.launch.py


- TurtleBot3 월드
ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py

- TurtleBot3 조작 노드
ros2 run turtlebot3_teleop teleop_keyboard

- 매핑
# Terminal 1
ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py # gazebo world
# Terminal 2
ros2 launch turtlebot3_cartographer cartographer.launch.py use_sim_time:=True

- 맵 저장
ros2 run nav2_map_server map_saver_cli -f ~/map
728x90
'ROS' 카테고리의 다른 글
TurtleBot3 실습-2 (0) | 2024.10.02 |
---|---|
ROS foxy install (0) | 2024.10.02 |