Win10系统兼容ROS1和ROS2,目标是全功能支持,2020年2月已经支持大部分主流功能。完全满足入门学习需求哦~
博客已经发布Ubuntu+Arduino+ROS1+ROS2+SLAM学习镜像,Linux下教程基本针对ROS2展开。
近期有大量留言和反馈提出希望补充ROS1教程,如windows下的,其实大部分教程与Linux几乎一致,只是系统换了。
还有一些小伙伴反馈我博客翻译或者搬运过程有缺失,为了防止误导,尽力避免此类情况出现:
- 更加仔细核查博文
- 以原文链接为主
其实所有搬运博文都附有引用的链接。

Gazebo在windows的安装参考如下链接:
- http://gazebosim.org/tutorials?tut=install_on_windows&cat=install
- win10直接支持V-Rep(CoppeliaSim)和Webots安装,也可选用哦~
这里重点介绍一下,它在ROS1Melodic中的使用~
为了确保ROS1Melodic能够使用Gazebo,需具备如下功能包:

使用如下命令开启Gazebo:
- roslaunch gazebo_ros empty_world.launch
其中,empty_world.launch,可用如下替换为其他环境。
- roslaunch gazebo_ros elevator_world.launch
- roslaunch gazebo_ros mud_world.launch
- roslaunch gazebo_ros range_world.launch
- roslaunch gazebo_ros rubble_world.launch
- roslaunch gazebo_ros shapes_world.launch
- roslaunch gazebo_ros willowgarage_world.launch
为啥?看如下文件夹就明白啦~

gazebo_ros核心节点如下:

以roslaunch gazebo_ros shapes_world.launch为例:
<?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参考如下链接:
如果需要使用此案例,需确保:
- choco upgrade ros-melodic-desktop_full -y
- choco upgrade ros-melodic-cartographer_ros -y
- C:\ros_ws\turtlebot3
如上过程安装或者catkin_make不能出错哦。

使用如下命令启动带有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:

gazebo:

cmd:

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