前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >在Win10中使用Gazebo9+进行机器人仿真

在Win10中使用Gazebo9+进行机器人仿真

作者头像
zhangrelay
发布2020-03-18 14:24:49
3.9K0
发布2020-03-18 14:24:49
举报

还有一些小伙伴反馈我博客翻译或者搬运过程有缺失,为了防止误导,尽力避免此类情况出现:

  • 更加仔细核查博文
  • 以原文链接为主

其实所有搬运博文都附有引用的链接。

Gazebo(Win10)

Gazebo在windows的安装参考如下链接:


这里重点介绍一下,它在ROS1Melodic中的使用~

为了确保ROS1Melodic能够使用Gazebo,需具备如下功能包:

gazebo_ros功能包​

使用如下命令开启Gazebo:

  • roslaunch gazebo_ros empty_world.launch

其中,empty_world.launch,可用如下替换为其他环境。

  1. roslaunch gazebo_ros elevator_world.launch
  2. roslaunch gazebo_ros mud_world.launch
  3. roslaunch gazebo_ros range_world.launch
  4. roslaunch gazebo_ros rubble_world.launch
  5. roslaunch gazebo_ros shapes_world.launch
  6. roslaunch gazebo_ros willowgarage_world.launch

为啥?看如下文件夹就明白啦~

gazebo_world

gazebo_ros核心节点如下:

gazebo_ros节点

以roslaunch gazebo_ros shapes_world.launch为例:

代码语言:javascript
复制
<?xml version="1.0"?>
<launch>

  <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="worlds/shapes.world"/> <!-- Note: the world_name is with respect to GAZEBO_RESOURCE_PATH environmental variable -->
    <arg name="paused" value="false"/>
    <arg name="use_sim_time" value="true"/>
    <arg name="gui" value="true"/>
    <arg name="headless" value="false"/> <!-- Inert - see gazebo_ros_pkgs issue #491 -->
    <arg name="recording" value="false"/>
    <arg name="debug" value="false"/>
  </include>

</launch>

注意,这是ROS1的launch文件写法哦。

更多使用说明课程中讲解。

如果需要仿真turtlebot3参考如下链接:

如果需要使用此案例,需确保:

  1. choco upgrade ros-melodic-desktop_full -y
  2. choco upgrade ros-melodic-cartographer_ros -y
  3. C:\ros_ws\turtlebot3

如上过程安装或者catkin_make不能出错哦。

catkin_make(100%)

使用如下命令启动带有turtlebot3的gazebo和rviz示例吧:

先更新环境:

  • call c:\opt\ros\melodic\x64\setup.bat
  • call c:\ros_ws\turtlebot3\devel\setup.bat 
  • set TURTLEBOT3_MODEL=waffle 

最后,启动:

  • roslaunch turtlebot3_gazebo turtlebot3_gazebo_cartographer_demo.launch

如果正常可以看到如下:

rviz:

rviz-turtlebot3

gazebo:

gazebo-turtlebot3

cmd:

INFO

更多内容,探索实现吧~~

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-03-16 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档