您的位置:首页 > 其它

Ubuntu 16.04 + ROS Kinetic 实现Turtlebot仿真,激光建图与导航

2019-05-14 15:11 2066 查看

首先,我们已经配置好了Ubuntu与ROS环境,之后安装tutlebot相关的包。

[code]sudo apt-get install ros-kinetic-turtlebot-*

如无报错,则进行下一步,有报错关于依赖项不满足的问题,请检查软件更新源与Gazebo版本问题。Gazebo7是较为适合Kinetic的。

卸载Gazebo8 安装Gazebo7请参考以下指令

[code]sudo apt-get remove gazebo8
sudo apt-get install libignition-math2 libsdformat4
sudo apt-get install libgazebo7
sudo apt-get install gazebo7
sudo apt-get install ros-kinetic-turtlebot-simulator

在Home目录下的.bashrc文件指定环境变量TURTLEBOT_GAZEBO_WORLDFILE指向文件

启动Gazebo仿真模型,加载Turtlebot机器人模型

[code]roslaunch turtlebot_gazebo turtlebot_world.launch

使用gmapping进行激光建图

[code]roslaunch turtlebot_gazebo gmapping_demo.launch

打开rviz,查看建图进程

[code]roslaunch turtlebot_rviz_launchers view_navigation.launch

通过键盘控制机器人运动

[code]roslaunch turtlebot_teleop keyboard_teleop.launch

turtlebot_gazebo里同样提供了实现导航的功能包。

现在开启了四个终端,关闭除了Gazebo外的另外三个终端。

然后

[code]roslaunch turtlebot_gazebo amcl_demo.launch
roslaunch turtlebot_rviz_launchers view_navigation.launch

点击2D Pose Estimate 选择机器人初始位置,2D Nav Gaol 选择目标点,即可自动规划。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: