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

Feature/cris 10928 2 d lidar trailing noise filter test for nav and negative obstacle #2

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 15 additions & 0 deletions configs/left_lidar_filter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
scan_filter_chain:
- name: shadows
type: laser_filters/ScanShadowsFilter
params:
min_angle: 10
max_angle: 170
neighbors: 20
window: 1

- name: intensity
type: laser_filters/LaserScanIntensityFilter
params:
lower_threshold: 10
upper_threshold: 50
disp_histogram: 1
15 changes: 15 additions & 0 deletions configs/right_lidar_filter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
scan_filter_chain:
- name: shadows
type: laser_filters/ScanShadowsFilter
params:
min_angle: 10
max_angle: 170
neighbors: 20
window: 1

- name: intensity
type: laser_filters/LaserScanIntensityFilter
params:
lower_threshold: 10
upper_threshold: 50
disp_histogram: 1
10 changes: 5 additions & 5 deletions launch/bottom_lidar.launch
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<launch>
<arg name="bottom_laser" value="0.4859 0 0.1248 3.142 0 3.142 base_link bottom_laser_link 10"/>
<arg name="bottom_laser" value="0.4859 0 0.1248 3.142 0 3.142 base_link bottom_laser_link"/>
<arg name="bottom_lidar_filter_enable" value="$(optenv BOTTOM_LIDAR_FILTER_ENABLE false)"/>

<env name="ROSCONSOLE_CONFIG_FILE" value="$(find rplidar_ros)/configs/custom_rosconsole.conf"/>

<node pkg="tf" type="static_transform_publisher" name="bottom_laser_tf" args="$(arg bottom_laser)" />
<node pkg="tf2_ros" type="static_transform_publisher" name="bottom_laser_tf" args="$(arg bottom_laser)" />

<node name="bottom_rplidar_node" pkg="rplidar_ros" type="rplidarNode" output="screen">
<param name="channel_type" type="string" value="udp"/>
Expand All @@ -18,19 +18,19 @@
</node>

<group if="$(arg bottom_lidar_filter_enable)">
<node pkg="laser_filters" type="scan_to_scan_filter_chain" name="laser_filter_right">
<node pkg="laser_filters" type="scan_to_scan_filter_chain" name="bottom_lidar_filter_right">
<rosparam command="load" file="$(find rplidar_ros)/configs/bottom_lidar_filter_right.yaml" />
<remap from="scan" to="bottom_laser_scan" />
<remap from="scan_filtered" to="bottom_laser_scan_right" />
</node>

<node pkg="laser_filters" type="scan_to_scan_filter_chain" name="laser_filter_left">
<node pkg="laser_filters" type="scan_to_scan_filter_chain" name="bottom_lidar_filter_left">
<rosparam command="load" file="$(find rplidar_ros)/configs/bottom_lidar_filter_left.yaml" />
<remap from="scan" to="bottom_laser_scan" />
<remap from="scan_filtered" to="bottom_laser_scan_left" />
</node>

<node pkg="laser_filters" type="scan_to_scan_filter_chain" name="laser_filter_right">
<node pkg="laser_filters" type="scan_to_scan_filter_chain" name="bottom_lidar_filter_back">
<rosparam command="load" file="$(find rplidar_ros)/configs/bottom_lidar_filter_back.yaml" />
<remap from="scan" to="bottom_laser_scan" />
<remap from="scan_filtered" to="bottom_laser_scan_back" />
Expand Down
21 changes: 17 additions & 4 deletions launch/side_lidar.launch
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<!-- publish tf -->
<!-- left -->
<node pkg="tf" type="static_transform_publisher" name="left_laser_tf" args="0.233070 0.149933 1.032733 1.571 1.396260 0 base_link left_laser_link 10" />
<node pkg="tf2_ros" type="static_transform_publisher" name="left_laser_tf" args="0.233070 0.149933 1.032733 1.571 1.396260 -0.1 base_link left_laser_link" />
<!-- right -->
<node pkg="tf" type="static_transform_publisher" name="right_laser_tf" args="0.233070 -0.149933 1.032733 -1.571 1.396260 0 base_link right_laser_link 10" />
<node pkg="tf2_ros" type="static_transform_publisher" name="right_laser_tf" args="0.233070 -0.149933 1.032733 -1.571 1.396260 0.0 base_link right_laser_link" />

<node name="right_rplidar_node" pkg="rplidar_ros" type="rplidarNode" output="screen">
<param name="channel_type" type="string" value="udp"/>
Expand All @@ -13,7 +13,7 @@
<param name="inverted" type="bool" value="false"/>
<param name="angle_compensate" type="bool" value="true"/>
<param name="scan_mode" type="string" value="DenseBoost"/>
<param name="scan_frequency" type="int" value="10"/>
<param name="scan_frequency" type="int" value="2"/>
<remap from="scan" to="right_laser_scan"/>
</node>

Expand All @@ -24,7 +24,20 @@
<param name="inverted" type="bool" value="false"/>
<param name="angle_compensate" type="bool" value="true"/>
<param name="scan_mode" type="string" value="DenseBoost"/>
<param name="scan_frequency" type="int" value="10"/>
<param name="scan_frequency" type="int" value="2"/>
<remap from="scan" to="left_laser_scan"/>
</node>

<node pkg="laser_filters" type="scan_to_scan_filter_chain" name="right_lidar_filter">
<rosparam command="load" file="$(find rplidar_ros)/configs/right_lidar_filter.yaml" />
<remap from="scan" to="right_laser_scan" />
<remap from="scan_filtered" to="right_laser_scan_filtered" />
</node>

<node pkg="laser_filters" type="scan_to_scan_filter_chain" name="left_lidar_filter">
<rosparam command="load" file="$(find rplidar_ros)/configs/left_lidar_filter.yaml" />
<remap from="scan" to="left_laser_scan" />
<remap from="scan_filtered" to="left_laser_scan_filtered" />
</node>

</launch>