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

What is the motion anchor? What's the relationship between thsese anchors and the Planning result? #216

Open
Rango-T10000 opened this issue Jan 11, 2025 · 2 comments

Comments

@Rango-T10000
Copy link

Hello, I am a freshman in this antomuous driving model field. I am tryting to understand your code by debugging. However, I have the following questions about anchor and route in your code:

  1. What does the anchor infos mean?
    88ebed8ae21b8d062c9098ad67ce658d
    I open this .pkl file and I found the following informations:
    90ee740268fa40e502c87f5b6714b1b4
    Accroding to your paper, do you mean to use a k-means algorithm to cluster all the trajectories in the Nuscene dataset.
    My question is that you get this by convert all trajectories to offsets to the current global position and then cluster these offsets into 6 categories? So the anchor is consist of a series offsets (delta x, delta y)?
    But why there are four groups anchors in “anchors_all” in this motion_anchor_infos_mode6.pkl?

  2. In fact, I don't understand why do you need this anchor infos?

image In your code, the Planner head outputs the final sdc's route prediction. What's the relationship between thsese anchors and the Planning result?
  1. According to your paper and demo, your model not only predicts the sdc's future planning (the ego car), but also predicts all other agent's future planning. I can find that there are groundtruth for both sdc's future traj and all agents' future traj. But the Planner head only output's the sdc's future planning, which part provide the prediction for other agents?
@Rango-T10000
Copy link
Author

Rango-T10000 commented Jan 11, 2025

After finding a paper: https://arxiv.org/abs/1910.05449, I think I have a basic understanding for the concept of "anchor".

Because motion forecasting is inherently stochastic, which might have many outcomes. Hence, the trajctory forecasting in the future is a multi-modal problems. In the academic view of this paper, the proposed model regards the trajectory forecasting has multiple outcomes and their likelihoods, which is so called Gaussian mixture model.

To tackel these kind of multi-modal problems, they adopt a the concept of predefined anchors, which have a rich history in
machine learning. The steps are:

They using k-means cluster algorithm to obtain several typical trajctories, which is so called "anchor"! At inference, the proposed model predicts a discrete distribution over theese predefined anchors and, for each anchor, regresses offsets from anchor waypoints along with uncertainties, yielding a Gaussian mixture at each time step.

image

As for how to get these anchors?

image

In the dataset, the trajectory is given by some waypoints (x,y) in the global coordinates. At first, these trajectories are converted to agent-centric coordinate frame. Then, using k-means algorithm to cluster these trajectories. In this way, the extracted anchors include typical motion modes which are rotation-invariant and translation-invariant.

image

@Rango-T10000
Copy link
Author

why there are four groups anchors in “anchors_all” in this motion_anchor_infos_mode6.pkl? @hli2020 @Yihanhu

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

1 participant