-
Notifications
You must be signed in to change notification settings - Fork 631
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(autoware_pointcloud_preprocessor): distortion corrector node update azimuth and distance #8380
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: vividf <[email protected]>
Signed-off-by: vividf <[email protected]>
Signed-off-by: vividf <[email protected]>
Signed-off-by: vividf <[email protected]>
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
Signed-off-by: vividf <[email protected]>
…muth_and_distance
sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp
Outdated
Show resolved
Hide resolved
sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp
Outdated
Show resolved
Hide resolved
…nge to rad Signed-off-by: vividf <[email protected]>
Signed-off-by: vividf <[email protected]>
Signed-off-by: vividf <[email protected]>
Signed-off-by: vividf <[email protected]>
Signed-off-by: vividf <[email protected]>
Signed-off-by: vividf <[email protected]>
Signed-off-by: vividf <[email protected]>
Signed-off-by: vividf <[email protected]>
…tor_node_update_azimuth_and_distance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks very good now, thanks!!
I tried running it with the sample rosbag from the logging sim tutorial but am constantly getting the following error, along with a pointcloud that jumps or hangs for a frame sometimes:
[distortion_corrector_node-1] [1727355131.361596872 WARN] [distortion_corrector_node]: Twist time_stamp is too late. Could not interpolate.
Could you tell me what rosbag to use or what to do to set it up correctly?
Here's my commands:
# All in separate terminals
ros2 launch autoware_pointcloud_preprocessor distortion_corrector_node.launch.xml
ros2 bag play -l ~/autoware_map/sample-rosbag/ -s sqlite3 --remap /sensing/lidar/top/velodyne_packets:=/velodyne_packets
ros2 launch nebula_ros nebula_launch.py sensor_model:=VLS128 launch_hw:=false
ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 base_link velodyne
As for processing time, I got similar numbers to the ones you stated. My maximum was around 21ms. I guess this module would be perfect to parallelize/gpu-ize in the future.
@mojomex From your commands, it seems that you didn't run the vehicle velocity converter and the topic I could give you the rosbag that I recorded before that includes that topic on Monday :) |
…muth_and_distance
…muth_and_distance
Signed-off-by: vividf <[email protected]>
…stance' of github.com:vividf/autoware.universe into feature/distortion_corrector_node_update_azimuth_and_distance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works well for me, thanks! Below are videos to confirm (top: input, bottom: output).
In the first half, I color by distance
, in the second half by azimuth
.
dist_azi.mp4
Because I'm a noob, I first ran distortion corrector on a pointcloud not in sensor frame, in chich case it failed silently.
Please add a warning/error when a user attempts to do that 🙇
Signed-off-by: vividf <[email protected]>
Signed-off-by: vividf <[email protected]>
sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp
Outdated
Show resolved
Hide resolved
…tor/distortion_corrector.cpp Co-authored-by: Max Schmeller <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@vividf Sorry, applying suggestions through GitHub seems to have wrecked DCO: it's failing. |
Signed-off-by: vividf <[email protected]>
Description
This PR solves the issue #3896.
Note that this PR is tested with the nebula PR tier4/nebula#180
base_link
) and theupdate_azimuth_and_distance
parameter is set totrue
. The azimuth values are calculated using thecv::fastAtan2
function.cv::fastAtan2
algorithm's accuracy of about 0.3 degrees, there is a possibility of changing beam order for high azimuth resolution LiDAR.velodyne
: (x: 0 degrees, y: 270 degrees)hesai
: (x: 90 degrees, y: 0 degrees)others
: (x: 0 degrees, y: 90 degrees) and (x: 270 degrees, y: 0 degrees)More information in https://github.com/vividf/autoware.universe/blob/feature/distortion_corrector_node_update_azimuth_and_distance/sensing/autoware_pointcloud_preprocessor/docs/distortion-corrector.md.
Additionally, this PR also removes the separate sin and cos by using the sin_and_cos function which can speed up the processing time (from this #7120)
Related links
Previous closed PR: #5560
Parent Issue:
How was this PR tested?
TIER4_INTERNAL_LINK
input/pointcloud
to/sensing/lidar/top/pointcloud_raw_ex
in the launch fileupdate_azimuth_and_distance
totrue
indistortion_corrector_node.param.yaml
ros2 launch autoware_pointcloud_preprocessor distortion_corrector_node.launch.xml
andros2 topic hz /sensing/lidar/top/rectified/pointcloud_ex
Time comparison
Input topic: /sensing/lidar/top/pointcloud_raw_ex (number of points is larger than the /sensing/lidar/top/mirror_cropped/pointcloud_ex)
bag: sample rosbag
frame: 121
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.