一.路径规划---二维路径规划仿真实现-gmapping+amcl+map_server+move_base

参考http://www.autolabor.com.cn/book/ROSTutorials/chapter1.html

1.首先实现仿真平台在rviz和gazebo的实现:

编写rviz环境下的xacro:

car.urdf.xacro

lidar.urdf.xacro

camera.urdf.xacro

all_component.urdf.xacro (将分component 集成起来)

编写gazebo环境的xacro:

仿真机器人物体:

camera_gazebo.urdf.xacro

car_gazebo.urdf.xacro

lidar_gazebo.urdf.xacro

封装机器人惯性矩阵:

head.urdf.xacro

仿真传感器:

sensor_kinect_gazebo.urdf.xacro

sensor_camera_gazebo.urdf.xacro

sensor_lidar_gazebo.urdf.xacro

仿真小车运动:

move_gazebo.urdf.xacro

集成所有xacro:

all_component_gazebo.urdf.xacro

如下图:

一.路径规划---二维路径规划仿真实现-gmapping+amcl+map_server+move_base_第1张图片

2.编写launch文件:

仿真功能:

car_play.launch :只显示在rviz上的

car_play_gazebo.launch :同时在rviz和gazebbo中显示,并运行了仿真环境

基础功能:

amcl.launch 调用amcl包

path_planning.launch 调用move_base包

2DSLAM建图功能:

运行:car_play_gazebo.launch 和 car_mapping.launch

地图服务功能:

保存地图:

先进行建图:car_play_gazebo.launch 和 car_mapping.launch

再进行保存:map_save.launch

读取地图:map_read.launch

amcl定位演示:car_play_gazebo.launch 和 amcl_car_play.launch

路径规划:

全局路径规划:car_play_gazebo.launch 和 global_navigation.launch

局部路径规划:car_play_gazebo.launch 和 local_navigation.launch

3.其他

nav.pgm和 nav.yaml为保存的地图文件

box_house.world 为仿真环境世界文件

这个仿真功能包的目录结构:

├── CMakeLists.txt
├── config
│   ├── arbotix_car_play.yaml
│   ├── base_local_planner_params.yaml
│   ├── costmap_common_params.yaml
│   ├── global_costmap_params.yaml
│   ├── local_costmap_params.yaml
│   ├── robot_mapping.rviz
│   └── robot_play.rviz
├── launch
│   ├── amcl_car_play.launch
│   ├── amcl.launch
│   ├── car_mapping.launch
│   ├── car_play_gazebo.launch
│   ├── car_play.launch
│   ├── global_navigation.launch
│   ├── local_navigation.launch
│   ├── map_read.launch
│   ├── map_save.launch
│   └── path_planning.launch
├── map
│   ├── nav.pgm 
│   └── nav.yaml
├── meshes
├── package.xml
├── urdf
│   ├── urdf
│   └── xacro
│       ├── all_component_gazebo.urdf.xacro
│       ├── all_component.urdf.xacro
│       ├── camera_gazebo.urdf.xacro
│       ├── camera.urdf.xacro
│       ├── car_gazebo.urdf.xacro
│       ├── car.urdf.xacro
│       ├── head.urdf.xacro
│       ├── lidar_gazebo.urdf.xacro
│       ├── lidar.urdf.xacro
│       ├── move_gazebo.urdf.xacro
│       ├── sensor_camera_gazebo.urdf.xacro
│       ├── sensor_kinect_gazebo.urdf.xacro
│       └── sensor_lidar_gazebo.urdf.xacro
└── worlds
    └── box_house.world

整个项目工程代码:

链接:https://pan.baidu.com/s/1zFbXqdjy_6wtbRf_4bkpog

提取码:fksa

仿真效果:

一.路径规划---二维路径规划仿真实现-gmapping+amcl+map_server+move_base_第2张图片

你可能感兴趣的:(多传感器融合SLAM,导航研究和学习,自动驾驶,人工智能,路径规划)