1 Star 0 Fork 0

Qingwen / turtlebot_simulation

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

此repo用以ros-melodic在gazebo仿真中的使用,本readme可结合CSDN博客进行共同观看,有些重复的问题我就不在这里复述了:

【Ubuntu 0】ubuntu与ROS安装系列

系统版本

  • ROS-Melodic
  • Ubuntu-18.04
  • Python 2.7

参考链接

所有的分支均来源于以下几个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

使用方法

1. git clone

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

2. 编译

首先全新系统的话可能需要安装一下一个系统依赖:

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

3. 运行

仿真世界模型

下面三个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

slam建图

auto run

待写

手动控制

手动的意思呢 就是需要自己控制车辆开,大致效果如下图,需要运行的command

  1. 需要开启一下gazebo和fake_node,就是假装一下有个车 和有 tf树

    roslaunch turtlebot3_gazebo kinadd.launch
  2. 建图launch 本分支使用的是karto,也可gmapping 需要自行clone代码进行

    roslaunch turtlebot3_slam turtlebot3_karto.launch

在建立完成后,需要进行保存操作,保存后需要自己移到navigation下,注意查看yaml文件中第一行路径是否ok

rosrun map_server map_saver map:=/map -f map_x
  • TODO写到launch 按键保存

建图后自主导航

  1. 需要开启一下gazebo和fake_node,就是假装一下有个车 和有 tf树

    roslaunch turtlebot3_gazebo kinadd.launch
  2. 注意修改map files从哪里获取的

    roslaunch turtlebot3_navigation turtlebot3_navigation.launch

    也就是launch中的这一行

    <arg name="map_file" default="$(find turtlebot3_navigation)/maps/map_test.yaml"/>

MIT License Copyright (c) 2021 张聪明 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

关于turtlebot仿真的所有必备package 展开 收起
C++ 等 6 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/kin-zhang/turtlebot_simulation.git
git@gitee.com:kin-zhang/turtlebot_simulation.git
kin-zhang
turtlebot_simulation
turtlebot_simulation
melodic

搜索帮助