RVOAgent stuck when other RVOAgents Lock

  1. Open RVO demo scene, and RVO Agent Placer Set 4 Agents
  2. Lock 2 Agents
  3. step2 result in agent stuck behind locked agents (green and red agent locked, purple unlock)

I want to know how to solve it that can make purple walk around locked agents?

Hi

The RVO algorithm is inherently local and will get stuck in local optima (like in this case). That agent’s can be locked is not something that the RVO algorithm was originally built to handle, and it does affect the quality in situations like these.
The good news is that I do have another local avoidance algorithm in development that handles these cases a lot better. It is based on how Starcraft 2 does it.

Here is a demo of it https://www.youtube.com/watch?v=wBUdMXeeej0 (when the agents start attacking other agents then they are marked as locked, but agents behind them still manage to move around them to get to the front line).

I’m not really sure when it will be released though, I have a lot of stuff going on right now. I could perhaps upload a beta version pretty soon.

1 Like

Great job!I can’t wait to see new features. I am trying to replace RVO algorithm with RVO2 Library and add some context steering controll because this problem.

Can you send me this beta version first? I am very urgent to fix this problem.gmail: qingsonglai89@gmail.com

Hi

I have uploaded a beta version (on the branch “rts”) here: https://www.arongranberg.com/astar/download
Click the ‘Show Older Versions’ button to reveal it.

I don’t think the RVO2 library allows locking agents at all, and in any case I think it will have the exact same issue if you do implement locking. They use almost the same underlying algorithm after all.

You are right. RVO alone cannot solve the stuck problem. I have added some game context controls such as locks, weights, getting more neighbor information, etc. like your SC2Avoidance scripts.

1 Like

Hello! I was going to post a similar doubt but I found this one is exactly what’s happening to me, here is my scene:

video1

I am using the following structure for the agents:

I set the next destination randomly using the WanderingDestinationScript, then I set it to the RVOAgentWanderer script that has also the RVOController.

Seems the same problem Qing_Lai is facing, but I found if I set the radius of the agents to1 seems to work much better, although some parts of the ship overlap.

Here the video with the radius = 1
video 2

Is this the right solution? Any other suggestions of how to improve this?

Thanks a lot!
Juan

EDIT: trying to set radius a bit higher but agents get stuck again if I go over 1

I have been able to improve the Agents behavior a little bit by using the funnel modificator and playing with the values moveNextDist, agentTimeHorizon and obstacleTimeHorizon.
However I would like some advice on this, I’m kind of lost with so many threads of so many updates and branches and I don’t know anymore what’s the best configuration for this.
Thanks a lot in advance!

I modified the ‘Random point’ algorithm so boats do RayCast 8 directions (magenta lines) before choosing one point. This way I avoid unnecessary collisions, however I had to add colliders to the boats which I didn’t want to to avoid more cpu load.
Still, the local avoidance is acting up and some of the agents gets stuck not being able to trigger the reachedEndOfPath variable in order to pick another point. They get trying to resolve the original path indifinitely… Please some advice on this.

Thanks in advance!
pistoleta

EDIT: I attach the configuration of the agent, the Graph and the RVONavmesh:
agent:

Graph

NavMesh
47

PS: Should I start a new thread with this?