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

sudo apt-get install ros-kinetic-turtlebot-*

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

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

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指向文件

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

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

roslaunch turtlebot_gazebo turtlebot_world.launch

使用gmapping进行激光建图

roslaunch turtlebot_gazebo gmapping_demo.launch

打开rviz,查看建图进程

roslaunch turtlebot_rviz_launchers view_navigation.launch

通过键盘控制机器人运动

roslaunch turtlebot_teleop keyboard_teleop.launch

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

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

然后

roslaunch turtlebot_gazebo amcl_demo.launch
roslaunch turtlebot_rviz_launchers view_navigation.launch

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

相关文章:

  • 2021-12-04
  • 2021-09-10
  • 2021-08-02
  • 2021-07-05
  • 2021-03-31
  • 2021-06-23
  • 2021-06-28
  • 2021-04-26
猜你喜欢
  • 2021-12-05
  • 2021-06-04
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
  • 2022-01-01
相关资源
相似解决方案