# General Procedure
1. Change the algorithm parameters in ros/launch/room_segmentation_action_server_params.yaml in ros/launch to the wanted algorithms and settings.
* room_segmentation_algorithm: Choose which segmentation algorithm should be used.
* display_segmented_map: Specify if you want a window to pop up after the given map has been segmented, showing the results. To continue the program press any button in the window.
* train_semantic, train_vrf: Booleans that show, if the semantic or voronoi random field segmentation should be trained. For details of this training method see the further document.
* Every algorithm has its own specific range of **allowed room areas**. Segments that are out of this range will not be drawn and are going to be filled by the surrounding valid rooms. **Remark:** The upper border in the semantic segmentation method has a different meaning. If found segments are too big they become separated by randomly putting centers in the segment and splitting it by using a wavefront algorithm. It's better to turn this off by setting the allowed maximal area very high.
* Some algorithms have specific parameters that change some functionalities of it, which is described in detail in the .yaml file.
2. Start the action server using the file /ros/launch/room_segmentation_action_server.launch, which executes the /ros/src/room_segmentation_server.cpp file. If the server crashes for some reason (e.g. no valid map given by the client) it respawns with a little delay.
3. Start an action client, which sends a goal to the segmentation action server, corresponding to the MapSegmentation.action message, which lies in ipa_building_msgs/action. The goal consists of the following parts
* input_map: The map that should be segmented, as sensor_msgs/Image. **Has to be a 8-Bit single channel image, with 0 as occupied space and 255 as free space**.
* map_resolution: The resolution the map has been sampled with [meter/cell].
* map_origin: The origin of the map in [meter] to bring the provided map coordinates in absolute coordinates, if wanted.
* return_format_in_pixel: Boolean to indicate if the results should be returned in pixel-coordinates.
* return_format_in_meter: Boolean to indicate if the results should be returned in absolute coordinates.
* robot_radius: The radius of your robot. If this is set to a value greater than 0 the room centers are chosen at locally reachable areas.
4. The action server returns a result, that has the following parts
* segmented_map: The map with the N found segments drawn in. The value of a pixel indicates its ID, which can be used to find pixels belonging to one room. The IDs start at 1 and go up to N, the **return format is 32-Bit single channel**.
* RoomInformation: For each found room the min/max x/y coordinate of points belonging to this room and the center is provided. See ipa_building_msgs/msg/RoomInformation.msg for details. This can be in pixel coordinates or absolute coordinates, depending on the booleans defined above.
* doorway_points: The fifth algorithm (voronoi random field segmentation) is capable of predicting doorways. If this algorithm is chosen, central points on a computed voronoi graph are returned that were labeled as doorways.
A Client also can change the parameters of the server by using dynamic_reconfigure. This can be done using the dynamic_reconfigure_client.h file that provides a client for this purpose. With client.setConfig("param_name", value) one specific parameter can be changed from the client, see ros/src/room_segmentation_client.cpp for an example. Of course rqt_reconfigure can also be used to change specific parameters.
The algorithms are implemented in common/src, using the headers in common/include/ipa_room_segmentation. Each algorithm has its own class, so if you want to use it alone you have to include the header for the algorithm you want to use and make a new object. Then you have to execute the segmentMap() function, which segments the map.
For large maps the algorithms can take a few minutes to complete the segmentation, especially the semantic and voronoi random field segmentation. If you want fast results, the morphological and distance segmentation are the fastest, but they might return not the best results if you have wide open spaces. To see results on different maps, see [http://wiki.ros.org/ipa_room_segmentation](http://wiki.ros.org/ipa_room_segmentation).
# Available algorithms
1. Morphological segmentation: Given the map as binary image, a binary erosion is iteratively applied. After each step, the algorithm searches for separate regions that have an area in the defined range. If it finds one, this region is saved and drawn black such that it doesn't need to be looked at any further. After all white regions are black, the algorithm stops and draws the segments in an image, then applies a wavefront algorithm to fill remaining white spaces.
2. Distance segmentation: Out of the given image a distance-map is computed that stores for each white pixel its distance to the nearest black pixel. On this distance-map a threshold operator is applied iteratively that makes every pixel above a certain threshold black and everything beneath it white. After each step the algorithm searches for segments in the given area range and stores them, then increases the threshold. After all possible thresholds have been looked at, the algorithm chooses the segmentation with the most valid segments as segmentation. After that it also draws the segments in an image and applies a wavefront algorithm.
3. Voronoi segmentation: For the given map a pruned voronoi graph is computed. The points belonging to this graph are then separated into different neighborhoods and searching in this neighborhood for the point with the smallest distance to the black pixels, called a critical point. This critical point is connected with the two closest black pixels, creating a separation of two segments. This algorithm was programmed after Thrun and Bücken [1].
4. Semantic segmentation: For each white pixel a 360 degree laserscan is simulated, resulting in different distances to obstacles around this point. These laserscans are then used to compute different features, which are put into two AdaBoost algorithms. These compute the probability that the current point is a room or hallway. Depending on the probabilities a label is given to that point. The same procedure is then repeated for each white pixel in the given map, resulting in different separated regions for rooms/hallways that are treated as segments. This algorithm was programmed after Mozos [2].
5. Voronoi Random Field Segmentation: First a pruned voronoi graph is computed for the given map, on that a neighborhood gets concentrated into one central point. After all points are found, neighboring relations are obtained, meaning which node is next to another depending on the voronoi graph. This gives several cliques, resulting in a conditional random field. The features for this CRF are then the weak responses of the AdaBoost classifiers for rooms, doorways and hallways. These AdaBoost classifiers use the same features as the semantic segmentation. On this CRF then a loopy belief propagation is done, resulting in several intersected segments. This algorithm was programmed after Friedman et al. [3].
# Training
In this package two algorithms are implemented that use machine-learning techniques, which of course need pre-labeled examples for training. These algorithms are the semantic segmentation and the voronoi random field segmentation. The training procedure starts as soon, as you start the action server.
**Important**: The algorithms assume that the maps are given as 8-Bit single channel image, with 0 as occupied space and 255 as free space.
1. The semantic segmentation uses two AdaBoost classifiers, one to detect hallways and one to detect r
没有合适的资源?快使用搜索试试~ 我知道了~
全覆盖规划算法学习例程,ubuntu18/20
共1807个文件
make:514个
cmake:393个
png:155个
1 下载量 35 浏览量
2024-01-29
14:07:43
上传
评论
收藏 29.69MB ZIP 举报
温馨提示
全覆盖规划算法学习例程,ubuntu18/20
资源推荐
资源详情
资源评论
收起资源包目录
全覆盖规划算法学习例程,ubuntu18/20 (1807个子文件)
libipa_room_exploration.a 5.87MB
libipa_building_navigation.a 1.27MB
MapSegmentation.action 3KB
RoomExploration.action 3KB
FindRoomSequenceWithCheckpoints.action 1KB
ipa_building_msgs-msg.asd 4KB
ipa_building_msgs-srv.asd 505B
local_setup.bash 283B
local_setup.bash 283B
local_setup.bash 283B
setup.bash 260B
setup.bash 260B
setup.bash 260B
feature_tests.bin 12KB
CMakeDetermineCompilerABI_CXX.bin 8KB
CMakeDetermineCompilerABI_C.bin 8KB
.built_by 11B
.built_by 11B
CMakeCCompilerId.c 18KB
feature_tests.c 688B
catkin_make.cache 381B
.catkin 47B
CATKIN_IGNORE 0B
.catkin_workspace 98B
RoomExploration.cfg 8KB
RoomSegmentation.cfg 5KB
BuildingNavigation.cfg 3KB
CoverageMonitor.cfg 1KB
cmake.check_cache 85B
ipa_building_msgs-genmsg.cmake 145KB
Makefile.cmake 41KB
ipa_room_explorationConfig.cmake 13KB
ipa_building_navigationConfig.cmake 13KB
ipa_room_explorationConfig.cmake 12KB
ipa_building_navigationConfig.cmake 12KB
ipa_building_msgsConfig.cmake 10KB
ipa_building_msgsConfig.cmake 9KB
cmake_install.cmake 9KB
cmake_install.cmake 9KB
cmake_install.cmake 8KB
cmake_install.cmake 7KB
CMakeCXXCompiler.cmake 5KB
DependInfo.cmake 5KB
cmake_clean.cmake 4KB
cmake_clean.cmake 3KB
cmake_clean.cmake 3KB
cmake_clean.cmake 3KB
DependInfo.cmake 3KB
DependInfo.cmake 3KB
cmake_clean.cmake 3KB
ipa_building_msgs-msg-extras.cmake 3KB
DependInfo.cmake 3KB
DependInfo.cmake 3KB
package.cmake 3KB
DependInfo.cmake 3KB
DependInfo.cmake 2KB
DependInfo.cmake 2KB
CMakeCCompiler.cmake 2KB
DependInfo.cmake 2KB
DependInfo.cmake 2KB
DependInfo.cmake 2KB
FindGUROBI.cmake 2KB
DependInfo.cmake 2KB
package.cmake 2KB
package.cmake 2KB
DependInfo.cmake 1KB
cmake_clean.cmake 1KB
DependInfo.cmake 1KB
cmake_install.cmake 1KB
DependInfo.cmake 1KB
cmake_install.cmake 1KB
DependInfo.cmake 1KB
cmake_install.cmake 1KB
order_packages.cmake 1KB
DependInfo.cmake 1KB
package.cmake 1KB
package.cmake 1KB
cmake_clean.cmake 1001B
ipa_building_msgs-msg-extras.cmake 978B
DependInfo.cmake 944B
cmake_clean.cmake 857B
DependInfo.cmake 822B
cmake_clean.cmake 703B
CMakeDirectoryInformation.cmake 672B
CMakeDirectoryInformation.cmake 672B
CMakeDirectoryInformation.cmake 672B
CMakeDirectoryInformation.cmake 672B
CMakeDirectoryInformation.cmake 644B
CMakeDirectoryInformation.cmake 644B
CMakeDirectoryInformation.cmake 644B
cmake_clean.cmake 643B
cmake_clean.cmake 611B
cmake_clean.cmake 584B
cmake_clean.cmake 567B
cmake_clean.cmake 526B
cmake_clean.cmake 526B
cmake_clean.cmake 490B
CTestTestfile.cmake 488B
cmake_clean.cmake 483B
cmake_clean.cmake 478B
共 1807 条
- 1
- 2
- 3
- 4
- 5
- 6
- 19
资源评论
大风吹~~~~~
- 粉丝: 187
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功