代码拉取完成,页面将自动刷新
此repo用以ros-melodic在gazebo仿真中的使用,本readme可结合CSDN博客进行共同观看,有些重复的问题我就不在这里复述了:
所有的分支均来源于以下几个git-master基本都是最新版ROS2的了,所以此处当参考链接,不需要在这里 ==git clone==
git clone https://github.com/ros-planning/navigation.git
git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs
git clone https://github.com/ROBOTIS-GIT/turtlebot3.git
git clone https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
git clone https://github.com/ros-planning/navigation_msgs.git
git clone https://github.com/ros/geometry2.git
gitee clone 中国大陆使用:
git clone https://gitee.com/kin_zhang/turtlebot_simulation.git
github clone:
git clone https://github.com/Kin-Zhang/turtlebot_simulation.git
==修改一下文件夹名字 tursim_ws==,进入文件夹
cd tursim_ws
首先全新系统的话可能需要安装一下一个系统依赖:
sudo apt-get install libsdl-image1.2-dev libsdl-dev libsuitesparse-dev
然后编译:
catkin_make
然后source添加,注意bash和zsh有些许不一样,添加后source一下
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
echo "export TURTLEBOT3_MODEL=waffle" >> ~/.bashrc
source ~/.bashrc
zsh用户:
echo "source ~/tursim_ws/devel/setup.zsh" >> ~/.zshrc
echo "export TURTLEBOT3_MODEL=waffle" >> ~/.zshrc
source ~/.zshrc
下面三个launch ==选其一==
roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch
roslaunch turtlebot3_gazebo turtlebot3_world.launch
roslaunch turtlebot3_gazebo turtlebot3_house.launch
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
这一步需要给那个文件权限chmod +x
sudo chmod +x ~/tursim_ws/src/turtlebot3/turtlebot3_teleop/nodes/turtlebot3_teleop_key
实际我看看搞个视频是否ok
待写
手动的意思呢 就是需要自己控制车辆开,大致效果如下图,需要运行的command
需要开启一下gazebo和fake_node,就是假装一下有个车 和有 tf树
roslaunch turtlebot3_gazebo kinadd.launch
建图launch 本分支使用的是karto,也可gmapping 需要自行clone代码进行
roslaunch turtlebot3_slam turtlebot3_karto.launch
在建立完成后,需要进行保存操作,保存后需要自己移到navigation下,注意查看yaml文件中第一行路径是否ok
rosrun map_server map_saver map:=/map -f map_x
需要开启一下gazebo和fake_node,就是假装一下有个车 和有 tf树
roslaunch turtlebot3_gazebo kinadd.launch
注意修改map files从哪里获取的
roslaunch turtlebot3_navigation turtlebot3_navigation.launch
也就是launch中的这一行
<arg name="map_file" default="$(find turtlebot3_navigation)/maps/map_test.yaml"/>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。