๋ฐ์ํ
๐ก ๋ณธ ๋ฌธ์๋ 'ROS Navigation: Tutorial(Ubuntu 20.04, ros noetic, Turtlebot3)'์ ๋ํด ์ ๋ฆฌํด๋์ ๊ธ์ ๋๋ค.
1. Environment Setup
1) Bringup
$ sudo apt update
$ sudo apt upgrade
$ wget https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_tools/master/install_ros_noetic.sh
$ chmod 755 ./install_ros_noetic.sh
$ bash ./install_ros_noetic.sh
$ sudo apt-get install ros-noetic-joy ros-noetic-teleop-twist-joy \
ros-noetic-teleop-twist-keyboard ros-noetic-laser-proc \
ros-noetic-rgbd-launch ros-noetic-rosserial-arduino \
ros-noetic-rosserial-python ros-noetic-rosserial-client \
ros-noetic-rosserial-msgs ros-noetic-amcl ros-noetic-map-server \
ros-noetic-move-base ros-noetic-urdf ros-noetic-xacro \
ros-noetic-compressed-image-transport ros-noetic-rqt* ros-noetic-rviz \
ros-noetic-gmapping ros-noetic-navigation ros-noetic-interactive-markers
$ sudo apt install ros-noetic-dynamixel-sdk ros-noetic-turtlebot3-msgs ros-noetic-turtlebot3โ
2) Install Simulation Package
$ cd ~/catkin_ws/src/
$ git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
$ cd ~/catkin_ws && catkin_make
2. SLAM
turtlebot model setting
$ nano ~/.bashrc
...
export TURTLEBOT3_MODEL=waffle
$ source ~/.bashrc
Run roscore from Remote PC.
$ roscoreโ
Simulation environments are prepared for TurtleBot3.
$ roslaunch turtlebot3_gazebo turtlebot3_world.launch
launch the SLAM node. The Gmapping is used as a default SLAM method.
$ roslaunch turtlebot3_slam turtlebot3_slam.launch
Open a new terminal and run the teleoperation node from the Remote PC.
$ roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
Control Your TurtleBot3!
---------------------------
Moving around:
w
a s d
x
w/x : increase/decrease linear velocity
a/d : increase/decrease angular velocity
space key, s : force stop
CTRL-C to quit
Launch the map_saver node in the map_server package to create map files.
$ rosrun map_server map_saver -f ~/map/turtlebot_20230925
3. Navigation
Run roscore from Remote PC.
$ roscoreโ
Simulation environments are prepared for TurtleBot3.
$ roslaunch turtlebot3_gazebo turtlebot3_world.launch
Launch the Navigation using previous mapping file(~/map/turtlebot_20230925)
$ roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/map/turtlebot_20230925.yaml
Estimate Initial Pose
- Click the 2D Pose Estimate button in the RViz menu.
- Click on the map where the actual robot is located and drag the large green arrow toward the direction where the robot is facing.
- Repeat step 1 and 2 until the LDS sensor data is overlayed on the saved map.
Launch keyboard teleoperation node to precisely locate the robot on the map.
$ roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
์ฐธ๊ณ
- [Robotis] Turtlebot e-manual - pc-setup: https://emanual.robotis.com/docs/en/platform/turtlebot3/quick-start/#pc-setup
- [Robotis] Turtlebot e-manual - gazebo simulation: https://emanual.robotis.com/docs/en/platform/turtlebot3/simulation/#gazebo-simulation
- [Robotis] Turtlebot e-manual - slam: https://emanual.robotis.com/docs/en/platform/turtlebot3/slam/#run-slam-node
- [Robotis] Turtlebot e-manual - navigation: https://emanual.robotis.com/docs/en/platform/turtlebot3/navigation/#run-navigation-nodes
๋ฐ์ํ