lgsvl / simulator

A ROS/ROS2 Multi-robot Simulator for Autonomous Vehicles
Other
2.27k stars 779 forks source link

Create random pedestrians #1855

Open gizem-buss opened 2 years ago

gizem-buss commented 2 years ago

Hello, I can't create random pedestrians on own map. I followed all the steps in the documentation but; 1) Pedestrians crossing the street 2) Pedestrians walking randomly on the road

I can't create the above scenarios. Can you help me?

navmesh pedestrianpath

ertauren commented 2 years ago

Not sure if this would help but it might work if you set roads as walkable objects and then generate navmesh, but again there might be better practice. rampayukari

EricBoiseLGSVL commented 2 years ago

Yes, @ertauren is correct, you can set a lower navigation area point value (higher value == pedestrian logic less likely to use) but I would also look closer to the curb. If the nav mesh is broken, then agents can't get over or down to the road nav mesh. See here: image

Another issue could be the check for the nav mesh we do. Unity doesn't have apis to see if a nav mesh is present so we raycast at 0,0,0 in world space to see if a nav mesh is hit. Make sure the nav mesh is created at this point or change the code to the point that fits your new map. image

Lastly, please show how you organized your pedestrian annotation under the mapholder object. Screen shot the Hierarchy panel. image

Finally, be sure you have pedestrians in the AssetBundle folder in the editor as well as binary builds. We provide compatible bundles in the binary and you just need to copy and place in the editor. You should see logs in the Console panel if simulator detects no pedestrians to load or other issues. Be sure to always look at and post console/playerlogs when posting issues to quickly see what the problem is. image