Skip to content

Conversation

@girish316
Copy link

📑 Description

Implemented multi-hypothesis pedestrian trajectory prediction in the TrajectoryPredictor.
The pedestrian model now generates behavior-aware trajectories (confident walk, hesitant/wandering, and stop) using a constant-velocity baseline with bounded uncertainty.

✅ Checklist

  • Updated comments where behavior or assumptions are non-obvious
  • No existing tests were broken

📝 Notes for reviewers

  • Replaced the placeholder constant-velocity pedestrian model with behavior-based hypotheses
  • Forward motion is accumulated, while lateral deviation is applied relative to the forward path at each timestep.
  • Output format (std_msgs::msg::Header + geometry_msgs::msg::PoseStamped) is unchanged

@girish316 girish316 requested a review from RyanL2 February 8, 2026 22:07
Copy link
Contributor

@RyanL2 RyanL2 left a comment

Choose a reason for hiding this comment

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

Nice work Girish. Make sure to run pre-commit checks before making the PR.

Check out https://github.com/WATonomous/wato_monorepo/blob/main/DEVELOPING.md for instructions to run pre-commit.

aligned_orientation.z = std::sin(heading_yaw * 0.5);

// Hypothesis 1: Confident forward walking
TrajectoryHypothesis confident_walk;
Copy link
Contributor

Choose a reason for hiding this comment

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

generatePedestrianHypotheses() sets probability (0.55 / 0.30 / 0.15), but processObject() in prediction_node.cpp:159-160 then calls intent_classifier_->assignProbabilities() which overwrites them.

I was planning for us to not use the intent classifier yet. But since vehicle prediction already used intent classifier, let's refactor the assigning probabilities part to the intent classifier for pedestrians for consistency.

0.6 * nominal_walk_speed * time_step_;

// Lateral uncertainty grows with time (non-cumulative)
double lateral_offset = 0.15 * std::sqrt(time_sec);
Copy link
Contributor

Choose a reason for hiding this comment

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

The hesitant walk just drifts to one side. 0.15 * sqrt(t) is always positive and only applied to one side. This looks like it's trying to model uncertainty (sqrt(t) growth) but it's just a single curved path. Add a mirrored right-side hypothesis or rethink how you want to represent the uncertainty here.

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

Successfully merging this pull request may close these issues.

2 participants