kinetic安装turtlebot3仿真功能包

第一步到工作目录catkin_ws下载相应的功能包并编译


$ cd ~/catkin_ws/src 
$ git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git 
$ git clone https://github.com/ROBOTIS-GIT/turtlebot3.git
$ cd .. 
$ rosdep install --from-paths src -i -y $ catkin_make

第二步安装TurtleBot3 Simulation

cd ~/catkin_ws/src/git clone https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
cd ~/catkin_ws && catkin_make


第三步启动gazebo仿真
mkdir -p ~/.gazebo/models/
cp -r ~/catkin_ws/src/turtlebot3_simulations/turtlebot3_gazebo/models/turtlebot3_XXX ~/.gazebo/models/

首先要将模型文件拷贝到gazebo中,上述代码的XXX请填入自己要仿真的模型名称:

burger||waffle


接着,设置机器人的型号参数:

export TURTLEBOT3_MODEL=burger


启动的环境可以有几种不同的选择。

2.1 启动空的世界地图

roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch


 如果出现


[turtlebot3_world.launch] is neither a launch file in package [turtlebot3_gazebo] nor is [turtlebot3_gazebo] a launch file name
The traceback for the exception was written to the log file
说明没有source进行下面的步骤

如果出现

Invalid <arg> tag: environment variable 'TURTLEBOT3_MODEL' is not set.


Arg xml is <arg default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]" name="model"/>
The traceback for the exception was written to the log file
则按照下面图片的步骤搞

启动空的世界地图

roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch


启动复杂地图:

roslaunch turtlebot3_gazebo turtlebot3_world.launch


gazebo加载比较慢 我的神船已经压不住他的热量了,开了三个窗口卡成ppt

启动家庭环境地图:

roslaunch turtlebot3_gazebo turtlebot3_house.launch


通过键盘控制turtlebot:

roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch

在打开的Terminal中通过w/a/d/x控制方向,s来停止移动。
©️2020 CSDN 皮肤主题: 大白 设计师: CSDN官方博客 返回首页
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值