如果按照下面方案也无法成功解决,可以进入我淘宝咨询,可进行远程辅助解决。
lee_ws
mkdir -p ~/lee_ws/src
cd ~/lee_ws/src/
catkin_init_workspace
cd ~/lee_ws/
catkin_make
echo "source ~/lee_ws/devel/setup.bash" >> ~/.bashrc
source devel/setup.bash
TurtleBot3 Simulation
cd ~/lee_ws/src/
git clone https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
cd ~/lee_ws
catkin_make
TurtleBot3
cd ~/lee_ws/src/
git clone https://github.com/ROBOTIS-GIT/turtlebot3.git
cd ~/lee_ws
catkin_make
sudo apt-get install ros-noetic-turtlebot3-bringup -y
sudo apt-get install ros-noetic-turtlebot3-msgs -y
sudo apt-get install ros-noetic-gazebo-ros -y
sudo apt install ros-noetic-gazebo-ros-pkgs -y
sudo apt install ros-noetic-gazebo-ros-control -y
sudo apt-get install ros-noetic-rviz -y
sudo apt-get install ros-noetic-map-server -y
sudo apt install ros-noetic-gmapping -y
sudo apt install ros-noetic-navigation -y
sudo apt install ros-noetic-move-base -y
sudo apt install ros-noetic-navigation -y
该开源项目一共有两个机器人模型,分别为:burger
和 waffle
在实验中,任意选择一个模型即可,效果一样。
echo "export TURTLEBOT3_MODEL=waffle" >> ~/.bashrc
roslaunch turtlebot3_gazebo turtlebot3_world.launch
roslaunch turtlebot3_slam turtlebot3_slam.launch
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
利用键盘控制,将地图搭建完成,效果如下:
rosrun map_server map_saver -f ~/map
roslaunch turtlebot3_gazebo turtlebot3_world.launch
roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/map.yaml
校准地图,鼠标左键点击1,然后点击2,箭头朝向与2同向。
鼠标左键点击1,然后点击2,箭头朝向为机器人最终停止的朝向。