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

Pedestrian, what is the algorithm to control pedestrain's path. #258

Closed
5guo opened this issue Mar 2, 2018 · 9 comments
Closed

Pedestrian, what is the algorithm to control pedestrain's path. #258

5guo opened this issue Mar 2, 2018 · 9 comments
Assignees
Labels

Comments

@5guo
Copy link

5guo commented Mar 2, 2018

Firstly, the code of carla-simulator/carla is so beautiful. I have a problem when I read it, where can I find the program about control pedestrain? When a pedestrain is generated with position and speed, then, how to calculate his next position?

@nsubiron nsubiron self-assigned this Mar 2, 2018
@nsubiron
Copy link
Collaborator

nsubiron commented Mar 2, 2018

Hi @5guo,

Pedestrian are using the built-in navigation system that comes with Unreal Engine. The trick is to add a UCrowdFollowingComponent to our AWalkerAIController class. Pedestrians avoid each other and find their way following the navmesh present in the maps, we just tell them where to go and their max speed. The map also has areas with different weights, so pedestrians prefer to walk on the sidewalk and cross the road only when necessary.

Just mention that this system has some issues, as in #6 or #7.

@5guo
Copy link
Author

5guo commented Mar 5, 2018

Thank you so much for your attention and answer. The pedestrians can find their way in the maps and avoid each other, all of these are provided by Unreal Engine's algorithm? So, where can I find the algorithm's detail?

@nsubiron
Copy link
Collaborator

nsubiron commented Mar 5, 2018

The navigation mesh is generated by adding a navmesh volume to the scene. Then the paths are calculated using an A* algorithm. You can find more details in Unreal Engine documentation or even their source code.

@5guo
Copy link
Author

5guo commented Mar 6, 2018

All pedestrians can avoid collision from each other, was this function provided by UE4's AI Modules? Or It was implemented with Carla's algorithm?

@nsubiron
Copy link
Collaborator

nsubiron commented Mar 6, 2018

All the pedestrian movement is done by Unreal Engine's methods, including avoidance.

The only thing we implement is a basic detection of vehicles, when a vehicle appears to be in the pedestrian route the pedestrian momentarily pauses its movement. We implement this to avoid #7 as much as possible.

@simmates
Copy link

simmates commented Mar 6, 2018

It would be nice to be able to implement an interface to manage the control of pedestrians - especially to generate corner cases.

@nsubiron
Copy link
Collaborator

Controlling all the agents in the scene is a feature we have in our backlog, follow the progress at #184.

@slyer0009
Copy link

Hi @5guo,

Pedestrian are using the built-in navigation system that comes with Unreal Engine. The trick is to add a UCrowdFollowingComponent to our AWalkerAIController class. Pedestrians avoid each other and find their way following the navmesh present in the maps, we just tell them where to go and their max speed. The map also has areas with different weights, so pedestrians prefer to walk on the sidewalk and cross the road only when necessary.

Just mention that this system has some issues, as in #6 or #7.

Can you explain how to add a UCrowdFollowingComponent to get this working? I'm unable to get my spawned pedestrians to move using the navmeshs in Town01
Thanks!

@jingluoquanergy
Copy link

@nsubiron I've observed pedestrians intermittently walk though vehicles for CARLA with commit id 5ce501d. It tends to happen when the vehicles are at slow speed(e.g. making a turn).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants