MengeCrowdSim / Menge

The source code for the Menge crowd simulation framework
Apache License 2.0
138 stars 64 forks source link

Adding movable goals #138

Closed curds01 closed 4 years ago

curds01 commented 4 years ago

This allows goals to move w.r.t. time.

  1. VelComponent base class provides mechanism for handling moving goals.
  2. It is invoked by the state prior to calling setPrefVelocity
  3. SimulatorBase and SimulatorInterface now integrate goal positions
    • Currently takes a timestep -- that may not be ideal.
    • FSM, GoalSet, and Goal have the supporting infrastructure for advancing goal position.
  4. Adds a moving goal ("path" goal). It moves along a specified, piecewise linear path.
  5. Adds a "path_goal" example illustrating the path goal.
    • adds two paths: one closed and one open. Agents head to them with a "goal" velocity component.
    • Add another path that an agent moves towards on a roadmp.
  6. Update visualization; path goal can draw its goal geometry.
  7. Updated road map vel component to update based on goal movement.
  8. Updated nav mesh vel component to update based on goal movement.

This change is Reviewable

douglasbandeiraivo commented 4 years ago

@curds01 It's a very interesting functionality. How could it be used for follow an agent instead of a goal?

curds01 commented 4 years ago

@douglasbandeiraivo It's the first step of a two-step process. This allows goals to move. The next step introduces a goal based on another agent's position. There's a fair amount of design decisions to make: how does the agent get selected, what happens if the agent can no longer serve as a goal, etc.

douglasbandeiraivo commented 4 years ago

@curds01 I saw you added movable goals, but them are always associated to goals sets. I wanted to make a follow-the-leader of group approach, but in Menge, the goals are not exclusive for individuals, they are shared through goal sets. I'm a bit lost about how to make this follow-the-leader approach. Have you thought about the design decisions you cited above?

curds01 commented 4 years ago

So, I've started making a "follow-the-leader" approach. It got relatively complicated quickly. Here's what I'll do -- I'll put my notes and design thoughts in an issue so you can see. I'd certainly appreciate your thoughts an opinions in what the "right" behavior is. I'll tag you when I post the issue.

douglasbandeiraivo commented 4 years ago

Ok, @curds01. Thank you for your help.