srl-freiburg / pedsim_ros

Pedestrian simulator powered by the social force model
https://github.com/srl-freiburg/pedsim_ros
BSD 2-Clause "Simplified" License
460 stars 170 forks source link

Change max velocity of pedestrians? #17

Closed pirobot closed 7 years ago

pirobot commented 7 years ago

Hello,

Thank you for this awesome simulator. I was wondering if there is a configuration parameter that would enable me to change the maximum velocity for the pedestrians? I am doing some computer vision tests on detecting groups of moving people and it would be helpful to slow down the motion of the simulated people.

Thanks!

sfchik commented 7 years ago

Hi pirobot,

What I did was I found the velocity parameter of the pedestrian under the file [your_workspace]/src/pedsim_ros/pedsim/src/ped_agent.cpp

under the code section: // assign random maximal speed in m/s // normal distribution (mean 1.2, std 0.26) normal_distribution distribution ( 1.2, 0.06 ); vmax = distribution ( generator );

You could try to change the value 1.2 to some other value and recompile the package. This does the job for me. Hopefully it works for you too.

Regards, Chik

pirobot commented 7 years ago

Hi Chik--many thanks for your quick reply. Your suggestion works perfectly for me. Thank you!