Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add pointcloud packages #39

Merged
Show file tree
Hide file tree
Changes from 101 commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
83739f9
release v0.4.0
mitsudome-r Sep 18, 2020
d1bf1d9
add convertToXYZCloud (#706)
Jul 21, 2020
050f2a9
Fix/concat mutex bug (#711)
YamatoAndo Jul 28, 2020
ca48196
bug fix and reduce calc cost (#708)
yukkysaito Jul 28, 2020
3c728e3
Revert "bug fix and reduce calc cost (#708)" (#719)
yukkysaito Jul 30, 2020
c54aac8
Avoid setting CMAKE_BUILD_TYPE=Release in each CMakeLists.txt (#720)
harihitode Aug 2, 2020
ad29fcc
ring_outlier_filter: fix bug, and check azimuth (#727)
YamatoAndo Aug 4, 2020
7f8bf69
Fix/ring outlier filter bug (#762)
yukkysaito Aug 12, 2020
6ffd07a
remove ROS1 packages temporarily
mitsudome-r Sep 29, 2020
ac55ff5
Revert "remove ROS1 packages temporarily"
mitsudome-r Oct 8, 2020
3586b1e
add COLCON_IGNORE to ros1 packages
mitsudome-r Oct 8, 2020
8c7da1c
Rename launch files to launch.xml (#28)
nnmm Oct 15, 2020
d3fae8a
Port points preprocessor (#114)
TakaHoribe Nov 25, 2020
30c7343
add preprocessor.launch.xml launch (#123)
TakaHoribe Nov 30, 2020
557f589
[pointcloud-preprocessor] Link missing opencv libraries (#133)
fred-apex-ai Dec 1, 2020
64260e2
Rename h files to hpp (#142)
nnmm Dec 3, 2020
0237cc2
Adjust copyright notice on 532 out of 699 source files (#143)
nnmm Dec 3, 2020
69ba66f
Use quotes for includes where appropriate (#144)
nnmm Dec 7, 2020
c58385d
Run uncrustify on the entire Pilot.Auto codebase (#151)
nnmm Dec 8, 2020
f01b5ed
ROS2 Linting: pointcloud_preprocessor (#180)
jilaada Dec 14, 2020
3363130
[ray_ground_filter] overwrite frame_id of output_msg with base_frame_…
mitsudome-r Dec 21, 2020
76d61b9
fix tf (#232)
mitsudome-r Dec 21, 2020
126746f
apply env_var to use_sim_time (#222)
k0suke-murakami Dec 23, 2020
40c74ce
Ros2 v0.8.0 pointcloud preprocessor (#293)
wep21 Feb 10, 2021
70f1ebf
fix height threshold bug (#1102) (#371)
mitsudome-r Feb 26, 2021
c2bb58b
Add livox_tag_filter (#368)
mitsudome-r Mar 1, 2021
59903bd
Add tier4_pcl_extensions (#1162) (#377)
mitsudome-r Mar 1, 2021
5b93ad2
Sync with Ros2 v0.8.0 beta (#393)
kenji-miyake Mar 1, 2021
167766e
Add approximate voxel grid filter (#1144) (#378)
mitsudome-r Mar 2, 2021
e55a572
Fix concatenate data (#396)
wep21 Mar 3, 2021
280b031
Sensor data qos (#407)
wep21 Mar 11, 2021
4a518eb
Fix topic name in pointcloud preprocessor (#422)
wep21 Mar 11, 2021
cad7c0f
Fix typo in sensing module (#436)
kmiya Mar 16, 2021
f1c7707
Import v0.9.1 (#431)
kenji-miyake Mar 17, 2021
ce84a53
add use_sim-time option (#454)
tkimura4 Mar 26, 2021
b332151
Format launch files (#1219)
kenji-miyake Mar 30, 2021
5ba1bca
Fix for rolling (#1226)
kenji-miyake Apr 8, 2021
bc29a99
Use unique ptr publish in filters (#1240)
wep21 Apr 12, 2021
afd90d4
Remove invalid warning of concatenate data (#1245)
wep21 Apr 13, 2021
ac83be4
Unify Apache-2.0 license name (#1242)
kmiya Apr 15, 2021
13447dc
Refine BSD license name (#1244)
kmiya Apr 15, 2021
d1330b9
Fix issues in downsample filter (#1253)
kmiya Apr 16, 2021
9ada518
change clock of tf_buffer to RCL_ROS_TIME from RCL_SYSTEM_TIME (#1261)
s-azumi Apr 23, 2021
e006747
Remove use_sim_time for set_parameter (#1260)
wep21 Apr 26, 2021
88aba93
Porting small fix (#1288)
KeisukeShima Apr 28, 2021
5e53e8e
Fix lint errors (#1378)
kenji-miyake May 25, 2021
fe8a03e
Use transient_local sub for compare_map_filter (#1437)
kosuke55 Jun 10, 2021
a08fda8
Remove pointcloud_to_laserscan (#1508)
wep21 Jun 29, 2021
780736c
Feature/compare elevation map (#1488)
kosuke55 Jul 26, 2021
601da95
suppress warnings for sensing packages (#1729)
h-ohta Jul 29, 2021
ca48064
Fix dependency type of rosidl_default_generators (#1801)
kenji-miyake Aug 5, 2021
7dd08a8
Add concatenate_date diagnostic (#1808)
kosuke55 Aug 10, 2021
7507ae9
Fix -Wunused-parameter (#1836)
kenji-miyake Aug 14, 2021
53aafa5
Fix compiler warnings (#1837)
kenji-miyake Aug 15, 2021
152897a
Fix vector_map_filter downsample (#1847)
kosuke55 Aug 16, 2021
8dd9a88
Fix spellcheck fail for some packages (#1842)
h-ohta Aug 16, 2021
9bcfd22
fix some typos (#1941)
h-ohta Aug 25, 2021
68e02b9
Invoke code formatter at pre-commit (#1935)
IshitaTakeshi Sep 1, 2021
cb19a83
add sort-package-xml hook in pre-commit (#1881)
KeisukeShima Sep 9, 2021
3a6839c
Port filter subscribe and unsbscribe (#2048)
kosuke55 Sep 13, 2021
c88f29e
Use filter unsubscribe for compare_elevation_map (#2049)
kosuke55 Sep 13, 2021
e2867b9
Add missing dependencies of diagnostic_updater (#2242)
kenji-miyake Oct 18, 2021
870a3e6
Feature/porting occupancy grid (#1621)
wep21 Oct 21, 2021
2eed6fd
Feature/porting occupancy grid filter (#1721)
wep21 Oct 21, 2021
cdc937d
Add a new ground filter node (#1509) (#1691)
wep21 Oct 21, 2021
d255336
Fix build warning (#1745)
wep21 Oct 21, 2021
493a318
Feature/porting occlusion spot (#1740)
wep21 Oct 21, 2021
96ad999
Fix out of range because of float cast (#1753)
wep21 Oct 21, 2021
11867c0
catch exception at look up transform and fix index ROS2 (#1761)
taikitanaka3 Oct 21, 2021
51dffc8
Fix compile warnings (#1852)
Oct 21, 2021
fb1c540
Feature/distortion corrector (#1782)
wep21 Oct 21, 2021
9c70e6c
Fix/preprocessor format (#1921)
wep21 Oct 21, 2021
c3c4483
Feature/left intensity (#1912)
0x126 Oct 21, 2021
63a16f9
Update occ grid docs (#1991)
yukkysaito Aug 31, 2021
77152e8
update readme (#1992)
yukkysaito Aug 31, 2021
078f2ed
Apply format (#1999)
Sep 1, 2021
55b75bb
Fix/ground filter classification algorithm (#2038)
miursh Sep 10, 2021
06e7b97
Fix package.xml (#2056)
Sep 10, 2021
becbef4
Feature/port dual return filter (#2020)
taikitanaka3 Sep 15, 2021
734615a
add key value (#2209)
taikitanaka3 Oct 12, 2021
a2f5a26
Change formatter to clang-format and black (#2332)
kenji-miyake Nov 2, 2021
5d15b01
Add COLCON_IGNORE (#500)
kenji-miyake Nov 4, 2021
e0c0eba
port vector map filter (#507)
satoshi-ota Nov 5, 2021
7196c0c
remove COLCON_IGNORE (#515)
satoshi-ota Nov 5, 2021
ff25fe9
port ground/compare map filter for perception as segmentation stack (…
satoshi-ota Nov 5, 2021
f749ec5
[ polar grid ] add readme polar grid remove colcon ignore (#559)
taikitanaka3 Nov 10, 2021
2ea4f59
[vehicle_info_util] add readme (#560)
taikitanaka3 Nov 10, 2021
2e2e81b
doc livox tag filter (#594)
satoshi-ota Nov 11, 2021
f3e4dab
doc tier4 pcl extensions (#598)
satoshi-ota Nov 11, 2021
920f623
use velocity report (#596)
takayuki5168 Nov 11, 2021
b895f34
Remove template comments from node documents (#608)
satoshi-ota Nov 12, 2021
036541e
Auto/document pointclound preprocessor (#607)
satoshi-ota Nov 15, 2021
097a264
fix wrong input topic (#647)
yukkysaito Nov 15, 2021
eeecbb0
update to support velocity report header (#655)
TakaHoribe Nov 15, 2021
37e907b
adapt to actuation cmd/status as control msg (#646)
taikitanaka3 Nov 16, 2021
d636eca
initialize pointer (#660)
tkimura4 Nov 16, 2021
39cf362
add tf2_geometry_msgs include to distorction_filter (#664)
Nov 16, 2021
419a426
Sync .auto branch with the latest branch in internal repository (#691)
wep21 Nov 18, 2021
2157408
Merge branch 'tier4/proposal' into 1-add-pointcloud-packages
1222-takeshi Dec 2, 2021
b922e32
Merge branch 'tier4/proposal' into 1-add-pointcloud-packages
1222-takeshi Dec 2, 2021
e810a9a
Merge branch 'tier4/proposal' into 1-add-pointcloud-packages
tkimura4 Dec 2, 2021
591fe45
Merge branch 'tier4/proposal' into 1-add-pointcloud-packages
1222-takeshi Dec 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions sensing/laserscan_to_occupancy_grid_map/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
cmake_minimum_required(VERSION 3.5)
project(laserscan_to_occupancy_grid_map)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

find_package(ament_cmake_auto REQUIRED)
find_package(eigen3_cmake_module REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(PCL REQUIRED)
ament_auto_find_build_dependencies()

ament_auto_add_library(laserscan_to_occupancy_grid_map SHARED
src/laserscan_to_occupancy_grid_map_node.cpp
src/occupancy_grid_map.cpp
src/updater/occupancy_grid_map_binary_bayes_filter_updater.cpp
)

target_link_libraries(laserscan_to_occupancy_grid_map
${PCL_LIBRARIES}
)

rclcpp_components_register_node(laserscan_to_occupancy_grid_map
PLUGIN "occupancy_grid_map::OccupancyGridMapNode"
EXECUTABLE laserscan_to_occupancy_grid_map_node
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
list(APPEND AMENT_LINT_AUTO_EXCLUDE
# To avoid conflicts between cpplint and uncrustify w.r.t. inclusion guards
ament_cmake_uncrustify
)
ament_lint_auto_find_test_dependencies()
endif()

ament_auto_package(
INSTALL_TO_SHARE
launch
)
82 changes: 82 additions & 0 deletions sensing/laserscan_to_occupancy_grid_map/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# laserscan_to_occupancy_grid_map

## Purpose

This package outputs the probability of having an obstacle as occupancy grid map.

![occupancy_grid_map_sample_image](./image/occupancy_grid_map_sample_image.png)

## Inner-workings / Algorithms

The basic idea is to take a 2D laserscan and ray trace it to create a time-series processed occupancy grid map.

1. the node take a laserscan and make an occupancy grid map with one frame. ray trace is done by Bresenham's line algorithm.
![Bresenham's line algorithm](./image/bresenham.svg)
2. Optionally, obstacle point clouds and raw point clouds can be received and reflected in the occupancy grid map. The reason is that laserscan only uses the most foreground point in the polar coordinate system, so it throws away a lot of information. As a result, the occupancy grid map is almost an UNKNOWN cell.
Therefore, the obstacle point cloud and the raw point cloud are used to reflect what is judged to be the ground and what is judged to be an obstacle in the occupancy grid map.
![Bresenham's line algorithm](./image/update_with_pointcloud.svg)
The black and red dots represent raw point clouds, and the red dots represent obstacle point clouds. In other words, the black points are determined as the ground, and the red point cloud is the points determined as obstacles. The gray cells are represented as UNKNOWN cells.

3. Using the previous occupancy grid map, update the existence probability using a binary Bayesian filter (1). Also, the unobserved cells are time-decayed like the system noise of the Kalman filter (2).

```math
\hat{P_{o}} = \frac{(P_{o} * P_{z})}{(P_{o} * P_{z} + (1 - P_{o}) * \bar{P_{z}})} \tag{1}
```

```math
\hat{P_{o}} = \frac{(P_{o} + 0.5 * \frac{1}{ratio})}{(\frac{1}{ratio} + 1)} \tag{2}
```

## Inputs / Outputs

### Input

| Name | Type | Description |
| ----------------------------- | -------------------------- | -------------------------------------------------------------- |
| `~/input/laserscan` | `sensor_msgs::LaserScan` | laserscan |
| `~/input/obstacle_pointcloud` | `sensor_msgs::PointCloud2` | obstacle pointcloud |
| `~/input/raw_pointcloud` | `sensor_msgs::PointCloud2` | The overall point cloud used to input the obstacle point cloud |

### Output

| Name | Type | Description |
| ----------------------------- | ------------------------- | ------------------ |
| `~/output/occupancy_grid_map` | `nav_msgs::OccupancyGrid` | occupancy grid map |

## Parameters

### Node Parameters

| Name | Type | Description |
| ----------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `map_frame` | string | map frame |
| `base_link_frame` | string | base_link frame |
| `input_obstacle_pointcloud` | bool | whether to use the optional obstacle point cloud? If this is true, `~/input/obstacle_pointcloud` topics will be received. |
| `input_obstacle_and_raw_pointcloud` | bool | whether to use the optional obstacle and raw point cloud? If this is true, `~/input/obstacle_pointcloud` and `~/input/raw_pointcloud` topics will be received. |
| `use_height_filter` | bool | whether to height filter for `~/input/obstacle_pointcloud` and `~/input/raw_pointcloud`? By default, the height is set to -1~2m. |
| `map_length` | double | The length of the map. -100 if it is 50~50[m] |
| `map_resolution` | double | The map cell resolution [m] |

## Assumptions / Known limits

In several places we have modified the external code written in BSD3 license.

- occupancy_grid_map.hpp
- cost_value.hpp
- occupancy_grid_map.cpp

## (Optional) Error detection and handling

## (Optional) Performance characterization

## (Optional) References/External links

Bresenham's_line_algorithm

- <https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm>
- <https://web.archive.org/web/20080528040104/http://www.research.ibm.com/journal/sj/041/ibmsjIVRIC.pdf>

## (Optional) Future extensions / Unimplemented parts

- The update probability of the binary Bayesian filter is currently hard-coded and requires a code change to be modified.
- Since there is no special support for moving objects, the probability of existence is not increased for fast objects.
3 changes: 3 additions & 0 deletions sensing/laserscan_to_occupancy_grid_map/image/bresenham.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading