Skip to content

Two level pedestrians - #1613

Draft
ThoChat wants to merge 34 commits into
PedestrianDynamics:masterfrom
ThoChat:two_level_model
Draft

ThoChat wants to merge 34 commits into
PedestrianDynamics:masterfrom
ThoChat:two_level_model

Conversation

@ThoChat

@ThoChat ThoChat commented Jul 13, 2026

Copy link
Copy Markdown

Two level pedestrians with social force model.

ThoChat and others added 30 commits October 21, 2025 14:56
…lum representaion for Pedestrians

- Updated the SocialForceModelIPP structure to include ground support attributes.
- Enhanced the Sqlite serialization to store ground support data.
WA_PaintOnScreen (set by QVTKRenderWindowInteractor) causes an
infinite paintEvent→Render loop on macOS. Disable it on Darwin
in the RenderWidget constructor.
Recording auto-detects IPP columns (pos_gs_x, height, radius) and
populates RecordingAgent fields. Trajectory renders ground support
circles and connection lines alongside upper body circles.
Documents the equations of motion from the paper and NetLogo reference
implementation, with parameter mapping and implementation checklist.
Rewrite SocialForceModelIPP to match the equations from
"When legs and bodies synchronize" (Chatagnon et al., 2026)
and the NetLogo reference implementation.

Physics changes:
- Unbalancing: lambda_u * (-v_s * e_n - v_n) (body falls away from legs)
- Balance recovery: lambda_b * (v_s * e_n - v_leg) (legs chase body)
- Damping: -lambda * v_n
- All interactions use pure exponential repulsion (no contact forces)
- Separate interaction ranges: B (upper body) and B_leg (legs)
- No mass division in force computation

API changes:
- Model constructor: no parameters (was: body_force, friction)
- New agent params: lambda_u, lambda_b, balance_speed, damping,
  leg_force_distance
- Removed agent params: mass, obstacle_scale
- Defaults from NetLogo: A=5, B=0.5, B_leg=0.3, lambda_u=0.5,
  lambda_b=1.0, v_s=1.0, lambda=1.0

All layers updated: C++ core, C API, pybind11 bindings, Python wrapper,
example, and tests (9/9 pass).
…paration clamping

- Fix unbalancing term sign to +v_s·e_n (body falls away from legs)
- Add separate obstacle_scale and obstacle_force_distance for wall tuning
- Add max body-leg separation clamping (LEG_SCALING_FACTOR * height)
- Handle co-located body/legs with destination-direction fallback
- Default ground_support_position to agent position when not specified
The leg and upper body can be up to ~0.92m apart, potentially in different
grid cells. Using the upper body's wall list could miss walls near the legs.
Fix unbalancing sign to +v_s·e_n, add obstacle_scale/obstacle_force_distance
to parameter table, update comparison table to reflect completed status.
@Ozaq
Ozaq marked this pull request as draft August 11, 2026 13:53

This branch has not been deployed

No deployments
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