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

How to resize rviz obstacle and pedestrian agent size? #82

Open zerosansan opened 2 years ago

zerosansan commented 2 years ago

Installation on ROS Melodic was successful and I managed to run all of the launch files. Is there a way to properly resize the obstacle (walls) and pedestrian agent size from the simulator's side? I can resize the walls and obstacles from Gazebo but the agents are floating around while moving.

rviz: Screenshot from 2022-10-01 21-14-38

Gazebo: Screenshot from 2022-10-01 21-15-01

zerosansan commented 2 years ago

I found the file responsible for the Z-axis offset. So, I set it to 0.0 and that fixed the floating pedestrian problem in Gazebo.

https://github.com/srl-freiburg/pedsim_ros/blob/master/pedsim_gazebo_plugin/src/actor_poses_plugin.cpp#L101

const float MODEL_OFFSET = 0.75;

However, pedestrian agent and obstacle wall size need to be adjusted somehow. The agents are only moving within less than 2m x 2m space out of the entire 3m x 3m available space due to the large obstacle size and limited space from the thick 1x1m wall blocks.