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

Concatenation Filter Analysis #6812

Open
3 tasks done
lexavtanke opened this issue Apr 15, 2024 · 9 comments
Open
3 tasks done

Concatenation Filter Analysis #6812

lexavtanke opened this issue Apr 15, 2024 · 9 comments
Assignees
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned) status:help-wanted Assistance or contributors needed. type:improvement Proposed enhancement

Comments

@lexavtanke
Copy link
Contributor

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I've agreed with the maintainers that I can plan this task.

Description

There are some latency issues with point cloud concatenation in the concatenate_data filter of the pointcloud_preprocessor. We need to investigate and measure them.

We can use three types of time information for such purpose:

  • Original unmodified point cloud header stamp
  • Modified point cloud published_time stamp
  • Rosbag stamp

We need to replace the rosbag stamp with the published_time stamp.

https://github.com/AIT-Assistive-Autonomous-Systems/ros2bag_tools this tool could be used for it.
By default, the restamp does: for all messages with headers, change the bag timestamp to their header stamp
But since the all modified point clouds share the same origin header, we need to somehow:
for published_time message types, use the published time stamps.
Then it should be perfectly visible in the rqt_bag timeline.
PublishedTime.msg

Purpose

Determine the actual timing patterns for the point cloud concatenation.

Possible approaches

Plan:

  • Play the point cloud data (from AWSIM or sample-rosbag as both of them have at least 3 lidars to concat)
  • Make sure localization works for distortion correction to work
  • Put all lidars to the same point cloud container for the test
  • Run the sensing and localization pipeline
  • Publish published_time topics from the nodes in the pipeline
  • Record them using rosbag (If possible, put rosbag under the point cloud container)
  • Use rqt_bag to visualize the timing patterns from the bag file as on the image below
    image

Definition of done

Measured timings of concatenate_data. Possible approach to speed up point cloud concatenation.

@lexavtanke lexavtanke self-assigned this Apr 15, 2024
@lexavtanke lexavtanke moved this to In Progress in Autoware Labs Apr 15, 2024
@xmfcx
Copy link
Contributor

xmfcx commented Apr 17, 2024

@idorobotics idorobotics added the type:improvement Proposed enhancement label Apr 17, 2024
@lexavtanke
Copy link
Contributor Author

lexavtanke commented Apr 23, 2024

Concatenation has processing_time_ms debug output. It takes rougthly 50 ms to concatenate 3 point clouds according to my observations on Autoware sample_rosbag.
Here is the plot of the /sensing/lidar/concatenate_data_synchronizer/debug/processing_time_ms topic.
image
Y axis is processing time and X axis is a rosbag timeline.

 Now I'm working on integration published_time to concatenation node to get more clear data as previous node (ring_outlier_filter) already has it.

@meliketanrikulu meliketanrikulu added the component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned) label May 9, 2024
@xmfcx xmfcx added the status:help-wanted Assistance or contributors needed. label May 15, 2024
@xmfcx xmfcx moved this from In Progress to Backlog in Autoware Labs May 15, 2024
@xmfcx xmfcx moved this from Backlog to In Progress in Autoware Labs May 20, 2024
@xmfcx
Copy link
Contributor

xmfcx commented Jun 11, 2024

@tomas-pinto do you have any progress in this task?

@xmfcx xmfcx added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Jun 11, 2024
@tomas-pinto
Copy link

@tomas-pinto do you have any progress in this task?

Unfortunately, I haven’t made much progress on the issue yet. However, I’m actively working on it and will provide an update by the end of this week.

@tomas-pinto tomas-pinto removed their assignment Jun 19, 2024
@palas21
Copy link

palas21 commented Jun 24, 2024

Using the sample-rosbag with the logging simulator, I recorded the left, right and top lidars before_sync topics, as well as the concatenated/pointcloud topic. I also logged the concatenated topics in the concat_filter by writing the topic names and timestamps into a .txt file, and than matched the concatenated topics with the corresponding left, right and top lidar topics. This is the result I obtained:

topics_0_2x
(In the visualization, note that same-colored topics are concatenated, except for dark blue topics, which are discarded. Also topics that share the same timestamp with the concatenated/pointcloud have a small yellow hat.)

At the 4th and 11.5-second marks, I noticed that there are no published concatenated/pointcloud topics. However, when I check the logger, left, right and top lidar topics are concatenated, suggesting there might be a problem with the recording of the concatenated topics into this bag file, although I am not sure why.

Additionally, between the 8.5 and 9-second marks, there is a problem with the algorithm. When the second right lidar topic arrives, the concat_filter should publish the concatenation of the right and left lidar topics, then clear the buffer and save the right topic into buffer as described in the algorithms documentation. Instead, it discards the previous right lidar topic, takes the new right lidar topic into the buffer, waits for the top lidar topic, and then publishes the concatenated pointcloud. This problem is also mentioned in this issue.

@palas21 palas21 removed their assignment Jul 17, 2024
@amadeuszsz
Copy link
Contributor

cc: @vividf (I think you've working on similar stuff recently)

@vividf
Copy link
Contributor

vividf commented Jul 31, 2024

@amadeuszsz
Right, several links from this page link to my previous issue.
Once I create a PR, I will mention here so people from LeoDrive can test it again

@vividf
Copy link
Contributor

vividf commented Nov 13, 2024

@xmfcx
The PR for a new design of the concatenate node is done (#8300)
Could you assign anyone to test for the previous issue?
Thanks

@xmfcx
Copy link
Contributor

xmfcx commented Nov 13, 2024

@vividf Thank you for the work you put into fixing this. I think most people who worked on this issue are not affiliated with Autoware project anymore. Would it be possible for you to test it?

If we could get a before and after with the following graph:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned) status:help-wanted Assistance or contributors needed. type:improvement Proposed enhancement
Projects
Status: Todo
Development

No branches or pull requests

8 participants