# rrt_exploration
It is a ROS package that implements a multi-robot map exploration algorithm for mobile robots. It is based on the Rapidly-Exploring Random Tree (RRT) algorithm. It uses occupancy girds as a map representation.The packgae has 5 different ROS nodes:
- Global RRT frontier point detector node.
- Local RRT frontier point detector node.
- Filter node.
- Assigner node.
- opencv-based frontier detector node.
This is a [Youtube playlist](https://www.youtube.com/playlist?list=PLoGH52eUIHsc1B_xPLL6ogzYxrWy675kr) showing the package running on single/multiple robots, using real setup (Kobuki robots) and simulation (Gazebo).
Note: This package was written during my master's thesis at the American University of Sharjah. My thesis advisor is Dr. [Shayok Mukhopadhyay](https://sites.google.com/site/shayok/Home). If you are using this package in your research work, please cite this [paper](http://ieeexplore.ieee.org/document/8202319/).
## 1. Requirements
The package has been tested on both ROS Kinetic and ROS Indigo, it should work on other distributions like Jade. The following requirements are needed before installing the package:
1- You should have installed a ROS distribution (indigo or later. Recommended is either indigo or kinetic).
2- Created a workspace.
3- Installed the "gmapping" ROS package: on Ubuntu, and if you are running ROS Kinectic, you can do that by typing the following command in the terminal:
```sh
$ sudo apt-get install ros-kinetic-gmapping
```
4- Install ROS navigation stack. You can do that with the following command (assuming Ubuntu, ROS Kinetic):
```sh
$ sudo apt-get install ros-kinetic-navigation
```
5- You should have Python 2.7. (it was not tested on Python 3).
6-You should have/install the following python modules:
-OpenCV (cv2)
```sh
$ sudo apt-get install python-opencv
```
-Numpy
```sh
$ sudo apt-get install python-numpy
```
-Sklearn
```sh
$ sudo apt-get install python-scikits-learn
```
## 2. Installation
Download the package and place it inside the ```/src``` folder in your workspace. And then compile using ```catkin_make```.
## 3. Setting Up Your Robots
This package provides an exploration strategy for single or multiple robots. However, for it to work, you should have set your robots ready using the [navigation stack](http://wiki.ros.org/navigation). Additionally, the robots must be set and prepared as follows.
Note: If you want to quickly run and test the package, you can try out the [rrt_exploration_tutorials](https://github.com/hasauino/rrt_exploration_tutorials) package which provides Gazebo simulation for single and multiple robots, you can use it to directly with this package.
### 3.1. Robots Network
For the multi-robot configuration, the package doesn't require special network configuration, it simply works by having a single ROS master (can be one of the robots). So on the other robots, the ```ROS_MASTER_URI``` parameter should be pointing at the master's address.
For more information on setting up ROS on multiple machines, follow [this](http://wiki.ros.org/ROS/NetworkSetup) link.
### 3.2. Robot's frame names in ```tf```
All robot's frames should be prefixed by its name. Naming of robots starts from "/robot_1", "/robot_2", "/robot_3", .. and so on. Even if you are using the package for single robot, robot's frames should be prefixed by its name (i.e. /robot_1). So for robot_1, the frames in the ```tf``` tree should look like this:
![alt text](https://github.com/hasauino/storage/blob/master/pictures/framesTf.png "robot_1 frames")
### 3.3. Robot's node and topic names
All the nodes and topics running on a robot must also be prefixed by its name. For robot 1, node names should look like: ```/robot_1/move_base_node```, ```/robot_1/slam_gmapping```.
And topic names should be like: ```/robot_1/odom```, ```/robot_1/map```, ```/robot_1/base_scan```, ..etc.
### 3.4. Setting up the navigation stack on the robots
The ```move_base_node``` node, which brings up the navigation stack on the robot, must be running. This package (rrt_exploration) generates target exploration goals, each robot must be able to receive these points and move towards them. This is why the navigation stack is needed. Additionally, each robot must have a global and local cost maps. All of these are proivded from the ```move_base_node```.
### 3.5. A mapping node
Each robot should have a local map generated from the [gmapping](http://wiki.ros.org/gmapping) package.
### 3.6. A map merging node
For the multi-robot case, there should be a node that merges all the local maps into one global map. You can use [this](http://wiki.ros.org/multirobot_map_merge) package.
## 4. Nodes
There are 3 types of nodes; nodes for detecting frontier points in an occupancy grid map, a node for filtering the detected points, and a node for assigning the points to the robots. The following figure shows the structure:
![alt text](https://github.com/hasauino/storage/blob/master/pictures/fullSchematic.png "overview of the exploration strategy")
### 4.1. global_rrt_frontier_detector
The ```global_rrt_frontier_detector``` node takes an occupancy grid and finds frontier points (which are exploration targets) in it. It publishes the detected points so the filter node can process. In multi-robot configuration, it is intended to have only a single instance of this node running.
Running additional instances of the global frontier detector can enhance the speed of frontier points detection, if needed.
#### 4.1.1. Parameters
- ```~map_topic``` (string, default: "/robot_1/map"): This parameter defines the topic name on which the node will recieve the map.
- ```~eta``` (float, default: 0.5): This parameter controls the growth rate of the RRT that is used in the detection of frontier points, the unit is in meters. This parameter should be set according to the map size, a very large value will cause the tree to grow faster and hence detect frontier points faster, but a large growth rate also implies that the tree will be missing small corners in the map.
#### 4.1.2. Subscribed Topics
- The map (Topic name is defined by the ```~map_topic``` parameter) ([nav_msgs/OccupancyGrid](http://docs.ros.org/api/nav_msgs/html/msg/OccupancyGrid.html))
- ```clicked_point``` ([geometry_msgs/PointStamped Message](http://docs.ros.org/api/geometry_msgs/html/msg/PointStamped.html)): The ```global_rrt_frontier_detector``` node requires that the region to be explored is defined. This topic is where the node recieves five points that define the region. The first four points are four defining a square region to be explored, and the last point is the tree starting point. After publishing those five points on this topic, the RRT will start detecting frontier points. The five points are intended to be published from Rviz using ![alt text](https://github.com/hasauino/storage/blob/master/pictures/publishPointRviz_button.png "Rviz publish point button") button.
#### 4.1.3. Published Topics
- ```detected_points``` ([geometry_msgs/PointStamped Message](http://docs.ros.org/api/geometry_msgs/html/msg/PointStamped.html)): The topic on which the node publishes detected frontier points.
- ```~shapes``` ([visualization_msgs/Marker Message](http://docs.ros.org/api/visualization_msgs/html/msg/Marker.html)): On this topic, the node publishes line shapes to visualize the RRT using Rviz.
### 4.2. local_rrt_frontier_detector
This node is similar to the global_rrt_frontier_detector. However, it works differently, as the tree here keeps resetting every time a frontier point is detected. This node is intended to be run along side the global_rrt_frontier_detector node, it is responsible for fast detection of frontier points that lie in the close vicinity of the robot.
In multi-robot configuration, each robot runs an instance of the local_rrt_frontier_detector. So for a team of 3 robots, there will be 4 nodes for detecting frontier points; 3 local detectors and 1 global detect
没有合适的资源?快使用搜索试试~ 我知道了~
自主探索算法的源码解析
共225个文件
sample:35个
launch:27个
h:22个
需积分: 5 5 下载量 2 浏览量
2023-12-14
10:43:39
上传
评论
收藏 1.56MB RAR 举报
温馨提示
frontier_exploration、m_explore、rrt_exploration 三个算法的源码解析
资源推荐
资源详情
资源评论
收起资源包目录
自主探索算法的源码解析 (225个子文件)
Explore.action 463B
ExploreTask.action 338B
.clang-format 1KB
config 293B
config 274B
config 272B
explore.cpp 17KB
map_merge.cpp 13KB
frontier_search.cpp 13KB
test_merging_pipeline.cpp 11KB
exploration_server.cpp 11KB
global_rrt_detector.cpp 10KB
costmap_client.cpp 9KB
merging_pipeline.cpp 8KB
plugin_client.cpp 8KB
frontier_search.cpp 7KB
local_rrt_detector.cpp 7KB
polygon_layer.cpp 6KB
frontier_plugin.cpp 5KB
grid_compositor.cpp 3KB
grid_warper.cpp 3KB
costmap_tools_tests.cpp 3KB
functions.cpp 3KB
example_plugin.cpp 3KB
geometry_tools_tests.cpp 2KB
mtrand.cpp 2KB
exploration_server_node.cpp 777B
frontier_search_tests.cpp 300B
description 73B
description 73B
description 73B
architecture.dia 2KB
architecture.dia 1KB
exclude 240B
exclude 240B
exclude 240B
.gitignore 39B
.gitignore 24B
mtrand.h 7KB
estimation_internal.h 5KB
merging_pipeline.h 5KB
visited_points.h 5KB
testing_helpers.h 5KB
costmap_client.h 4KB
costmap_tools.h 4KB
map_merge.h 4KB
costmap_tools.h 4KB
explore.h 4KB
geometry_tools.h 3KB
exploration_server.h 3KB
frontier_plugin.h 3KB
polygon_layer.h 3KB
frontier_search.h 2KB
example_plugin.h 2KB
grid_compositor.h 2KB
grid_warper.h 2KB
frontier_search.h 2KB
base_plugin.h 2KB
plugin_client.h 1KB
functions.h 922B
HEAD 218B
HEAD 218B
HEAD 211B
HEAD 211B
HEAD 201B
HEAD 201B
HEAD 39B
HEAD 38B
HEAD 32B
HEAD 30B
HEAD 29B
HEAD 23B
pack-57c7dddd386fef02c2533f7dff89fee14a199d98.idx 48KB
pack-06ed62132e731cfefeb897e1c01fdfe5086ae14d.idx 30KB
pack-11be0ede71b51a65f850ef412b05858fadcf969c.idx 26KB
index 5KB
index 5KB
index 2KB
screenshot.jpg 29KB
multi_explore.launch 14KB
multi_explore_test.launch 13KB
two_explore_test.launch 9KB
multi_turtlebot3_move_base.launch 6KB
multi_turtlebot3_gmapping.launch 5KB
multi_turtlebot3_gazebo.launch 3KB
exploration.launch 3KB
multi_turtlebot3_explore.launch 3KB
multi_map_merge.launch 3KB
multi_turtlebot3_map_merge.launch 3KB
simple.launch 2KB
three_robots.launch 2KB
move_base.launch 2KB
two_map_merge.launch 2KB
single.launch 2KB
from_map_server.launch 2KB
multi_turtlebot3_all.launch 890B
expolre_mapping.launch 806B
explore.launch 790B
frontier_mapping.launch 734B
explore_costmap.launch 732B
共 225 条
- 1
- 2
- 3
资源评论
玳宸
- 粉丝: 7946
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功