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

fix(autoware_radar_static_pointcloud_filter): lookup timestamp and er… #10350

Merged

Conversation

mebasoglu
Copy link
Contributor

…ror handling

Description

This PR fixes the lookup transform timestamp and error handling.

The node tries to get transform at map frame's timestamp, but it should use radar message's timestamp.

Sometimes, tf cannot find a match and get_transform returns an empty pointer.

Instead of checking if the pointer is empty or not, the current code checks an exception. Since the exception is handled inside the utility function, the returned pointer should be checked here for an error.

The empty pointer causes a segmentation fault.

Related links

Parent Issue:

How was this PR tested?

Tested with a bag file which includes ARS 548 RadarScan data via the following launch:

<?xml version="1.0"?>
<launch>
    <!-- Parameters -->
    <arg name="container_name" default="radar_scan_filter" />
    <arg name="radar_threshold_filter_param_path" default="$(find-pkg-share autoware_radar_threshold_filter)/config/radar_threshold_filter.param.yaml" />
    <arg name="radar_scan_to_pointcloud2_param_path" default="$(find-pkg-share autoware_radar_scan_to_pointcloud2)/config/radar_scan_to_pointcloud2.param.yaml" />

    <!-- External interfaces -->
    <arg name="input/radar_scan" default="/sensing/radar/front/scan_raw" />

    <!-- Radar scan filter pipeline -->
    <group>
        <push-ros-namespace namespace="scan" />
        <node_container pkg="rclcpp_components" exec="component_container_mt" name="$(var container_name)" namespace="">
            <composable_node pkg="autoware_radar_threshold_filter" plugin="autoware::radar_threshold_filter::RadarThresholdFilterNode" name="radar_threshold_filter" namespace="">
                <remap from="~/input/radar" to="$(var input/radar_scan)" />
                <remap from="~/output/radar" to="output/threshold_filtered_scan" />
                <param from="$(var radar_threshold_filter_param_path)" />
            </composable_node>

            <composable_node pkg="autoware_radar_static_pointcloud_filter" plugin="autoware::radar_static_pointcloud_filter::RadarStaticPointcloudFilterNode" name="radar_static_pointcloud_filter"
                             namespace="">
                <remap from="~/input/radar" to="output/threshold_filtered_scan" />
                <remap from="~/input/odometry" to="/localization/kinematic_state" />
                <remap from="~/output/static_radar_scan" to="output/static_radar_scan" />
                <remap from="~/output/dynamic_radar_scan" to="output/dynamic_radar_scan" />
                <param name="doppler_velocity_sd" value="4.0" />
                <param name="max_queue_size" value="5" />
            </composable_node>

            <composable_node pkg="autoware_radar_scan_to_pointcloud2" plugin="autoware::radar_scan_to_pointcloud2::RadarScanToPointcloud2Node" name="radar_scan_to_pointcloud2" namespace="">
                <remap from="~/input/radar" to="output/static_radar_scan" />
                <remap from="~/output/amplitude_pointcloud" to="output/amplitude_pointcloud" />
                <remap from="~/output/doppler_pointcloud" to="output/doppler_pointcloud" />
                <param from="$(var radar_scan_to_pointcloud2_param_path)" />
            </composable_node>

        </node_container>
    </group>
</launch>

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

…ror handling

Signed-off-by: Mehmet Emin BAŞOĞLU <mehmeteminbasoglu@hotmail.com>
@github-actions github-actions bot added the component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned) label Mar 26, 2025
Copy link

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@mebasoglu mebasoglu added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 26, 2025
@mebasoglu mebasoglu linked an issue Mar 26, 2025 that may be closed by this pull request
3 tasks
Copy link

codecov bot commented Mar 26, 2025

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 25.64%. Comparing base (8796045) to head (cd459f6).
Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
...filter/src/radar_static_pointcloud_filter_node.cpp 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10350      +/-   ##
==========================================
- Coverage   25.66%   25.64%   -0.03%     
==========================================
  Files        1360     1362       +2     
  Lines      104688   104714      +26     
  Branches    39823    39827       +4     
==========================================
- Hits        26872    26854      -18     
- Misses      75209    75253      +44     
  Partials     2607     2607              
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
differential-cuda 0.00% <0.00%> (?)
total 25.65% <ø> (-0.02%) ⬇️ Carriedforward from ec13b8e

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@technolojin technolojin self-assigned this Mar 28, 2025
Copy link
Contributor

@technolojin technolojin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@technolojin
Copy link
Contributor

Thank you for your contribution!

@technolojin technolojin merged commit 1de1753 into autowarefoundation:main Mar 28, 2025
48 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

autoware_radar_static_pointcloud_filter sometimes dies
2 participants