Skip to content

Commit

Permalink
Merge branch 'kinetic-devel' into scan_to_cloud_nodelet
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbinney authored Jun 19, 2021
2 parents 3fb957d + 353392e commit 761d069
Show file tree
Hide file tree
Showing 49 changed files with 2,184 additions and 169 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ros1_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build and run ROS tests

on:
push:
branches: [ kinetic-devel ]
pull_request:
branches: [ kinetic-devel ]

jobs:
build:
runs-on: ubuntu-latest

container:
# The perception docker images includes laser_geometry, which we need.
image: ros:noetic-perception

steps:
- uses: actions/checkout@v2

- name: Build and run tests
run: . /opt/ros/noetic/setup.sh && ./ci.sh

10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This config file for Travis CI utilizes ros-industrial/industrial_ci package.
# For more info for the package, see https://github.com/ros-industrial/industrial_ci/blob/master/README.rst
sudo: required
dist: trusty
dist: xenial
language: generic
compiler:
- gcc
Expand All @@ -11,10 +11,10 @@ notifications:
on_failure: always
env:
matrix:
- USE_DEB=true ROS_DISTRO="indigo" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
- USE_DEB=true ROS_DISTRO="indigo" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
- USE_DEB=true ROS_DISTRO="jade" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
- USE_DEB=true ROS_DISTRO="jade" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
- USE_DEB=true ROS_DISTRO="kinetic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
- USE_DEB=true ROS_DISTRO="kinetic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
- USE_DEB=true ROS_DISTRO="lunar" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
- USE_DEB=true ROS_DISTRO="lunar" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
install:
- git clone https://github.com/ros-industrial/industrial_ci.git .ci_config
script:
Expand Down
67 changes: 67 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,73 @@
Changelog for package laser_filters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.8.11 (2020-06-03)
-------------------
* Merge pull request `#97 <https://github.com/ros-perception/laser_filters/issues/97>`_ from eurogroep/feat/speckle-filter-for-noise-removal
* Merge pull request `#96 <https://github.com/ros-perception/laser_filters/issues/96>`_ from eurogroep/feat/intensity-filter-dynamic-reconfigure-and-optionally-override-intensity-values
feat(IntensityFilter): Dynamic reconfigure and optionally override intensity
* Merge pull request `#3 <https://github.com/ros-perception/laser_filters/issues/3>`_ from nlimpert/nlimpert/speckle-filter-radius-outlier-merge
Merge distance based speckle filter with RadiusOutlier removal
* Contributors: Jonathan Binney, Nicolas Limpert, Rein Appeldoorn

1.8.10 (2020-04-07)
-------------------
* radius_outlier_filter: new filter for radius based outlier removal
Add a new filter to remove measurements that do not have a number of
neighbors within a certain range.
* Contributors: Jonathan Binney, Nicolas Limpert

1.8.9 (2020-04-05)
------------------
* Bump CMake version to avoid CMP0048 warning
* Polygon filter
* Add dynamic reconfigure for scan shadows filter
* Parameter to remove shadow start point in scan shadows filter
* Contributors: Jonathan Binney, Rein Appeldoorn, Yannick_de_Hoop, ahcorde

1.8.8 (2019-11-07)
------------------
* Merge pull request `#83 <https://github.com/ros-perception/laser_filters/issues/83>`_ from remco-r/indigo-devel
[fix] when high fidelity true added laser_max_range\_ to projection
* [fix] when high fidelity true added laser_max_range\_ to projection
* Merge pull request `#79 <https://github.com/ros-perception/laser_filters/issues/79>`_ from Jailander/indigo-devel
Adding invert filter parameter to BOX filter
* Merge pull request `#80 <https://github.com/ros-perception/laser_filters/issues/80>`_ from k-okada/indigo-devel
Add scan blob filters
* add scan blob filters
* Merge pull request `#72 <https://github.com/ros-perception/laser_filters/issues/72>`_ from ms-iot/windows_port_tests_fix
[Windows][indigo] Use ${GTEST_LIBRARIES} for more portable gtest library linkage.
* Adding invert filter parameter to BOX filter
* Remove extra changes.
* windows bring up
* Contributors: Jonathan Binney, Kei Okada, Remco, Sean Yen, jailander

1.8.7 (2019-06-13)
------------------
* Merge pull request `#77 <https://github.com/ros-perception/laser_filters/issues/77>`_ from bionade24/indigo-devel
Removed boost signals from CMakeLists.txt
* Removed boost signals from CMakeLists.txt
With boost=>1.69 there `signals` isn't available anymore. As it's not necessary, it should be removed to be compatible to all boost versions.
* Merge pull request `#76 <https://github.com/ros-perception/laser_filters/issues/76>`_ from peci1/fix_travis
Fix Travis and move on to Kinetic and Lunar.
* Fix Travis and move on to Kinetic and Lunar.
* Merge pull request `#73 <https://github.com/ros-perception/laser_filters/issues/73>`_ from peci1/patch-1
Added error message when the filter chain failed.
* Added error message when the filter chain failed.
* Merge pull request `#62 <https://github.com/ros-perception/laser_filters/issues/62>`_ from at-wat/optimize-shadows-filter
Reduce computation cost of ScanShadowsFilter
* Merge pull request `#63 <https://github.com/ros-perception/laser_filters/issues/63>`_ from procopiostein/indigo-devel
set values for variables that could be used uninitialized
* Add some comments to ScanShadowDetector
* set values for variables that could be used uninitialized
* Reduce computation cost of ScanShadowsFilter
ScanShadowsFilter required a lot of CPU power mainly due to atan2.
This commit reduces computation cost of the filter.
* Remove atan2 and directly compare tangent values
* Add a test to check geometric calculation
* Apply ROS recommended indent style to ScanShadowsFilter
* Contributors: Atsushi Watanabe, Jonathan Binney, Martin Pecka, Oskar Roesler, Procópio Stein

1.8.6 (2018-04-11)
------------------
* Updated deprecated pluginlib macros to avoid warning messages
Expand Down
35 changes: 30 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.0.2)
project(laser_filters)

set(CMAKE_CXX_STANDARD 11)

##############################################################################
# Find dependencies
##############################################################################

set(THIS_PACKAGE_ROS_DEPS sensor_msgs roscpp tf filters message_filters
laser_geometry pluginlib angles nodelet)
laser_geometry pluginlib angles dynamic_reconfigure nodelet)

find_package(catkin REQUIRED COMPONENTS ${THIS_PACKAGE_ROS_DEPS})
find_package(Boost REQUIRED COMPONENTS system signals)
find_package(Boost REQUIRED COMPONENTS system)
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})

##############################################################################
# Define package
##############################################################################

# dynamic reconfigure
generate_dynamic_reconfigure_options(
cfg/IntensityFilter.cfg
cfg/PolygonFilter.cfg
cfg/RangeFilter.cfg
cfg/ScanShadowsFilter.cfg
cfg/SpeckleFilter.cfg
cfg/SectorFilter.cfg
)

catkin_package(
INCLUDE_DIRS include
LIBRARIES pointcloud_filters laser_scan_filters
Expand All @@ -30,7 +42,16 @@ catkin_package(
add_library(pointcloud_filters src/pointcloud_filters.cpp)
target_link_libraries(pointcloud_filters ${catkin_LIBRARIES})

add_library(laser_scan_filters src/laser_scan_filters.cpp src/median_filter.cpp src/array_filter.cpp src/box_filter.cpp)
add_library(laser_scan_filters
src/laser_scan_filters.cpp
src/median_filter.cpp
src/array_filter.cpp
src/box_filter.cpp
src/polygon_filter.cpp
src/speckle_filter.cpp
src/intensity_filter.cpp
src/sector_filter.cpp
)
target_link_libraries(laser_scan_filters ${catkin_LIBRARIES} ${Boost_LIBRARIES})

add_executable(scan_to_cloud_filter_chain src/scan_to_cloud_filter_chain.cpp)
Expand All @@ -46,13 +67,17 @@ target_link_libraries(scan_to_scan_filter_chain ${catkin_LIBRARIES} ${Boost_LIBR
add_executable(generic_laser_filter_node src/generic_laser_filter_node.cpp)
target_link_libraries(generic_laser_filter_node ${catkin_LIBRARIES} ${Boost_LIBRARIES})

add_dependencies(laser_scan_filters ${PROJECT_NAME}_gencfg)

if (CATKIN_ENABLE_TESTING)
find_package(rostest)
add_executable(test_scan_filter_chain test/test_scan_filter_chain.cpp)
target_link_libraries(test_scan_filter_chain laser_scan_filters ${rostest_LIBRARIES} gtest)
target_link_libraries(test_scan_filter_chain laser_scan_filters ${rostest_LIBRARIES} ${GTEST_LIBRARIES})
add_dependencies(test_scan_filter_chain gtest)

add_rostest(test/test_scan_filter_chain.launch)
add_rostest(test/test_polygon_filter.launch)
add_rostest(test/test_speckle_filter.launch)

catkin_add_gtest(test_shadow_detector test/test_shadow_detector.cpp)
target_link_libraries(test_shadow_detector ${catkin_LIBRARIES} ${rostest_LIBRARIES})
Expand Down
54 changes: 54 additions & 0 deletions cfg/IntensityFilter.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env python
#
# Software License Agreement (BSD License)
#
# Copyright (c) 2020, Eurotec, Netherlands
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the TNO IVS nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# \author Rein Appeldoorn

from dynamic_reconfigure.parameter_generator_catkin import *

PACKAGE = "laser_filters"

gen = ParameterGenerator()

gen.add("lower_threshold", double_t, 0,
"Intensity values lower than this value will be filtered", 8000.0, 0, 100000.0)
gen.add("upper_threshold", double_t, 0,
"Intensity values greater than this value will be filtered", 100000.0, 0, 100000.0)
gen.add("invert", bool_t, 0, "A Boolean to invert the filter", False)

gen.add("filter_override_range", bool_t, 0,
"Whether to set the filtered laser beam ranges to NaN", True)
gen.add("filter_override_intensity", bool_t, 0,
"Whether to set the filtered and non-filtered laser beam intensities to 0.0 and 1.0 respectively", False)

exit(gen.generate(PACKAGE, "laser_filters", "IntensityFilter"))
48 changes: 48 additions & 0 deletions cfg/PolygonFilter.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env python
#
# Software License Agreement (BSD License)
#
# Copyright (c) 2020, Eurotec, Netherlands
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the TNO IVS nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# \author Yannick de Hoop, Rein Appeldoorn

from dynamic_reconfigure.parameter_generator_catkin import *

PACKAGE = "laser_filters"

gen = ParameterGenerator()

gen.add("polygon", str_t, 0,
"A list of coordinates that represents a polygon in the format [ [x1, y1], [x2, y2], ..., [xn, yn] ]", "[]")
gen.add("polygon_padding", double_t, 0, "Polygon padding in meters", 0, 0, 100.)
gen.add("invert", bool_t, 0, "A Boolean to invert the filter", False)

exit(gen.generate(PACKAGE, "laser_filters", "PolygonFilter"))
55 changes: 55 additions & 0 deletions cfg/RangeFilter.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env python
#
# Software License Agreement (BSD License)
#
# Copyright (c) 2020, Eurotec, Netherlands
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the TNO IVS nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# \author Rein Appeldoorn

from dynamic_reconfigure.parameter_generator_catkin import *

PACKAGE = "laser_filters"

gen = ParameterGenerator()

gen.add("lower_threshold", double_t, 0,
"Range values lower than this value will be filtered", 0.0, 0.0, 100000.0)
gen.add("upper_threshold", double_t, 0,
"Range values greater than this value will be filtered", 100000.0, 0.0, 100000.0)
gen.add("use_message_range_limits", bool_t, 0, "Use the range_min and range_max values from the laserscan message as threshold. Defaults to false", False)

gen.add("lower_replacement_value", double_t, 0,
"Use this value for all measurements <lower_threshold. Default: NaN", 0, 0.0, 100000.0)

gen.add("upper_replacement_value", double_t, 0,
"Use this value for all measurements >upper_threshold. Default: NaN", 100000.0, 0.0, 100000.0)

exit(gen.generate(PACKAGE, "laser_filters", "RangeFilter"))
Loading

0 comments on commit 761d069

Please sign in to comment.