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

Failed to split propagation(running on custom dataset) #6

Closed
cmakelabs opened this issue Jun 12, 2024 · 5 comments
Closed

Failed to split propagation(running on custom dataset) #6

cmakelabs opened this issue Jun 12, 2024 · 5 comments

Comments

@cmakelabs
Copy link

cmakelabs commented Jun 12, 2024

Thank you for your efforts, I am facing this issue while trying to run it on my custom dataset:
[ WARN] [1718225318.764554291]: Last IMU time: 1695304207.518885182 [ WARN] [1718225318.864593672]: Failed to split propagation, skipping CFAR detections.
What could be the cause of this issue?
You guidance is sincerely appreciated

@cmakelabs cmakelabs changed the title Running on custom dataset Failed to split propagation(running on custom dataset) Jun 12, 2024
@rikba
Copy link
Collaborator

rikba commented Jun 21, 2024

This happens when the timestamp of the arriving radar message is more recent than the last IMU time stamp. This happened in our experiments in the following cases.

  1. Heavy CPU load causing ROS message transport scramble. The message is spammed quite often then (critical!)
  2. Occasional ROS message transport scramble (not critical, can be ignored)

I can also imagine this happening if you replay a bag with sorted time stamps, but I'm not so sure. In general, it should not happen because the radar has a much longer processing time than the IMU and should always arrive a bit delayed. Possibly you can correct the radar time stamp by the chirp / CFAR duration. Or you would need to change the code to buffer radar messages and process them again once the current IMU arrives.

The warning is called here: https://github.com/ethz-asl/rio/blob/main/src/rio.cpp#L264-L270

@cmakelabs
Copy link
Author

Thanks, I cannot determine the exact reason, but I would really appreciate it, if you could elaborate more on how to correct the radar time stamp by the CFAR duration or making a temporary buffer for radar messages, for the buffer it seems to be a simple solution but I cannot determine the particular mechanism to do it so that they get processed at the arrival of the IMU

@rikba
Copy link
Collaborator

rikba commented Jun 25, 2024

At the moment, the CFAR detections are handled immediately in the radar callback function. If they don't meet the acceptance criteria, i.e., the current IMU message has not been processed yet, the radar message gets rejected. What you could do instead is

  1. Create a buffer member for radar messages, e.g., a queue. It is important to handle them FIFO as the other case is not implemented in the optimization at the moment.
  2. fill the buffer in the radar callback
  3. In the radar callback, instead of handling a single radar message, work yourself through the buffer. Remove messages older than `propagation_.getFirstState().imu->header()
    (optional; you could also process the buffer at the end of the IMU callback)

@cmakelabs
Copy link
Author

Thank you very much

@rikba
Copy link
Collaborator

rikba commented Jul 3, 2024

No problem. If you implement this, I will be happy to review a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants