文章目录
- 一、slam仿真
- 1、安装环境依赖
- 2、创建Turtlebot3目录并下载安装
- 3、配置Turtlebot3环境
- 4、运行slam仿真
一、slam仿真
1、安装环境依赖
sudo apt install ros-noetic-cartographer ros-noetic-cartographer-ros
2、创建Turtlebot3目录并下载安装
mkdir -p catkin_turtlebot3/src
cd catkin_turtlebot3/src
git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
git clone https://github.com/ROBOTIS-GIT/turtlebot3.git
git clone https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
cd ..
rosdep install --from-paths src -i -y
catkin_make
3、配置Turtlebot3环境
echo "export TURTLEBOT3_MODEL=waffle" >> ~/.bashrc
echo "source ~/catkin_turtlebot3/devel/setup.bash" >> ~/.bashrc
测试是否安装成功:
重新打开终端,运行如下指令
echo $ROS_PACKAGE_PATH
4、运行slam仿真
终端一:
cd catkin_turtlebot3
roscore
终端二:
roslaunch turtlebot3_gazebo turtlebot3_world.launch
最终效果如下: