ros2与windows入门教程-ROS2 导航Navigation2
说明:
- 介绍如何在windows上使用ROS2 导航Navigation2
步骤:
- 新建一个cmd命令提示符,执行以下命令,下载预生成的地图
curl -o c:\nav2_ws\map.pgm https://raw.githubusercontent.com/ROBOTIS-GIT/turtlebot3/master/turtlebot3_navigation/maps/map.pgm
curl -o c:\nav2_ws\map.yaml https://raw.githubusercontent.com/ROBOTIS-GIT/turtlebot3/master/turtlebot3_navigation/maps/map.yaml
下载Gazebo模型,解压后,将modeles目录移到C:\Users\windows\.gazebo目录里面
新建一个cmd命令提示符,执行以下命令,加载ROS2环境,启动模拟环境
call C:\opt\ros\foxy\x64\local_setup.bat
call c:\opt\ros\foxy\x64\share\gazebo\setup.bat
call C:\nav2_ws\install\local_setup.bat
set "SDF_PATH=c:\opt\ros\foxy\x64\share\sdformat\1.6"
set GAZEBO_MODEL_PATH=C:\nav2_ws\install\turtlebot3_gazebo\share\turtlebot3_gazebo\models
set TURTLEBOT3_MODEL=waffle
ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
Gazebo Simulation 环境第一次加载需要几分钟
新建一个cmd命令提示符,执行以下命令,加载ROS2环境,启动导航
call C:\opt\ros\foxy\x64\local_setup.bat
call c:\opt\ros\foxy\x64\share\gazebo\setup.bat
call C:\nav2_ws\install\local_setup.bat
set TURTLEBOT3_MODEL=waffle
ros2 launch turtlebot3_navigation2 navigation2.launch.py map:=c:\nav2_ws\map.yaml
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号