Pedestrian simulator powered by the social force model

Overview

Pedestrian Simulator

|

ROS packages for a 2D pedestrian simulator based on social force model of Helbing et. al. The implementation is based on an extended version of Christian Gloor's libpedsim library which has been extended to include additional behaviors and activities. This packages is useful for robot navigation experiments with crowded scenes which are hard to acquire in practice.

Features

  • Individual walking using social force model for very large crowds in real time
  • Group walking using the extended social force model
  • Social activities simulation
  • Sensors simulation (point clouds in robot frame for people and walls)
  • XML based scene design
  • Extensive visualization using Rviz
  • Option to connect with gazebo for physics reasoning

Requirements

  • ROS with the visualization stack (currently tested on hydro, indigo, kinetic ). For melodic, see the branch melodic-dev
  • C++11 compiler

Installation

The default version is now melodic. For kinetic please check out the branch kinetic which still depends on Qt4.

cd [workspace]/src
git clone https://github.com/srl-freiburg/pedsim_ros.git  
cd pedsim_ros
git submodule update --init --recursive
cd ../..
catkin build -c  # or catkin_make

Sample usage

roslaunch pedsim_simulator simple_pedestrians.launch

Licence

The core libpedsim is licensed under LGPL. The ROS integration and extensions are licensed under BSD.

Developers

  • Billy Okal
  • Timm Linder

Contributors

  • Dizan Vasquez
  • Sven Wehner
  • Omar Islas
  • Luigi Palmieri

The package is a work in progress mainly used in research prototyping. Pull requests and/or issues are highly encouraged.

Acknowledgements

These packages have been developed in part during the EU FP7 project SPENCER

Comments
  • [ERROR] 'spencer_tracking_rviz_plugin/TrackedPersons' failed to load

    [ERROR] 'spencer_tracking_rviz_plugin/TrackedPersons' failed to load

    I am running on Ubuntu 16.04, with ROS Kinetic.

    Whenever I try the installation step: git submodule update --init --recursive I run in the following error:

    `Cloning into '2ndparty/spencer_messages'... Permission denied (publickey). fatal: Could not read from remote repository.

    Please make sure you have the correct access rights and the repository exists. fatal: clone of '[email protected]:spencer-project/spencer_messages.git' into submodule path '2ndparty/spencer_messages' failed`

    Even though, I moved forward, and catkin_make, the working space has compiled with no errors.

    Whenever I try, roslaunch pedsim_simulator simple_pedestrians.launch , RViz opens but only the limits of the environment open. I have the following error:

    [ERROR] [1538608123.222584045]: PluginlibFactory: The plugin for class 'spencer_tracking_rviz_plugin/TrackedPersons' failed to load. Error: According to the loaded plugin descriptions the class spencer_tracking_rviz_plugin/TrackedPersons with base class type rviz::Display does not exist. Declared types are rviz/Axes rviz/Camera rviz/DepthCloud rviz/Effort rviz/FluidPressure rviz/Grid rviz/GridCells rviz/Illuminance rviz/Image rviz/InteractiveMarkers rviz/LaserScan rviz/Map rviz/Marker rviz/MarkerArray rviz/Odometry rviz/Path rviz/PointCloud rviz/PointCloud2 rviz/PointStamped rviz/Polygon rviz/Pose rviz/PoseArray rviz/PoseWithCovariance rviz/Range rviz/RelativeHumidity rviz/RobotModel rviz/TF rviz/Temperature rviz/WrenchStamped rviz_plugin_tutorials/Imu

    opened by SamHSlva 11
  • Agents Not Avoinding Robot

    Agents Not Avoinding Robot

    I am running the melodic version on ubuntu 18.04, using a modified version of small_airport.xml (modified by dividing all sizes and locations by 5). The agents seem to be avoiding the robot at the location that the robot spawns however they are not continuing to avoid the robot as it moves.

    Tf is configured correctly and the /robot_position topic reports the correct position, however the agents are still avoiding the (0,0) location that the robot spawns.

    with_robot is set to true and robot_mode is 1

    Any tips or things I may have missed would be much appreciated.

    opened by owen7900 7
  • Not Occluded Agents

    Not Occluded Agents

    Hi there, First of all, thanks for sharing this great tool for crowd simulation.

    I am trying to simulate a robot navigating through a human crowd using pedsim, for that I ma using the simulated simulated pedsim_point_clouds. However it seems that both the pedsim simulator and the point cloud sensor does not take into account whether an agent might be occluded.

    Is there any workaround or anything that I am missing to make it work?

    Best regards, Framarbon

    opened by framarbon-zz 7
  • Minor improvements

    Minor improvements

    Additional features

    • Add support for older Gazebo versions (e.g. 7 in kinetic)
    • Add Waypoint and Waypoints messages.
    • Add waypoints and forces visualization to help debugging and social force model parameters tuning.
    • Add parameters for:
      • frame ids
      • actor sdf model file
      • spawning period (for source waypoints)

    Bug fixes:

    • pedsim_ros message dependency
    • dynamic obstacle visualization
    • LineObstacleToCells offset
    • use angleToQuaternion in poseFrom2DVelocity
    • skip agent without waypoints
    opened by f-fl0 5
  • Pedestrians shake up and down in pedsim_gazebo_plugin

    Pedestrians shake up and down in pedsim_gazebo_plugin

    Hello. When I was using https://github.com/srl-freiburg/pedsim_ros/tree/master/pedsim_gazebo_plugin, there was a bug-like behavior, so I report it.

    Watch the video on youtube, the pedestrians are swaying finely up and down. https://youtu.be/iV5yspXesCk I'm not familiar with Gazebo so I'm not sure, but it looks like the pedestrian and the floor are physically interfering with each other. I want to do a simulation with Gazebo and I want to solve this, do you have any solution?
    Here's what I've done

    [email protected]:~/catkin_ws/src/pedsim_ros$ rosrun pedsim_gazebo_plugin pedsim_to_gazbo_world.py 
    >> enter pedsim scenaria name: file_name.xml 
    scene1.xml
    gazbo world has been generated: /home/takuya/catkin_ws/src/pedsim_ros/pedsim_gazebo_plugin/worlds/scene1.world
    launch file has been generated: /home/takuya/catkin_ws/src/pedsim_ros/pedsim_gazebo_plugin/launch/scene1.launch
    >> after you launch the scenario using pedsim_simulator, launch the generated world using: 
     " $roslaunch pedsim_gazebo_plugin scene1.launch"  
    [email protected]:~/catkin_ws/src/pedsim_ros/pedsim_simulator$ roslaunch pedsim_simulator airport_demo.launch airport:=scene1
    [email protected]:~/catkin_ws/src/pedsim_ros$ roslaunch pedsim_gazebo_plugin scene1.launch 
    
    

    Thank you.

    opened by takanotume24 5
  • integration of pedsim_simulator into Gazebo

    integration of pedsim_simulator into Gazebo

    this pedsim_gazebo_plugin:

    • converts pedsim scenarios to gazebo worlds,
    • spawns pedsim agents into gazebo,
    • continously updates the poses of the spawned agents
    opened by mahmoud-a-ali 5
  • Option to connect with gazebo for physics reasoning

    Option to connect with gazebo for physics reasoning

    Dear,

    I am currently doing research on path planning in human environment and I am interested to use the feature of connection with gazebo to simulate a real world scenario in my university. May I know is there any tutorial provided for the pedsim_ros to connect to gazebo? Thank you.

    Best Regards, Sheng Fei

    opened by sfchik 5
  • Obstacles not avoided by agents

    Obstacles not avoided by agents

    I am using the latest code from the master branch and it appears that the agents do not avoid obstacles as I thought they would, even if I increase the force_obstacle parameter to its max value of 50 and the force_wall parameter to its max value of 10.

    I've attached a screen shot when running the simple_pedestrians.launch example after adding an obstacle to the social_contexts.xml file using the following line:

    <obstacle x1="14" y1="14" x2="17" y2="17"/>
    

    You can see the obstacle in the screen shot and you can also see pedestrians all over it. Also, changing the force_obstacle parameter using rqt_reconfigure seems to have no effect on where the agents pass over or through the obstacle.

    What do I need to do to make the agents avoid obstacles?

    Thanks!

    image

    opened by pirobot 4
  • Size of robot and pedestrians?

    Size of robot and pedestrians?

    Does anyone know if the pedsim simulator assigns a size (e.g. diameter) to the robot or the pedestrians? Or are they treated as points? I ask because I cannot tell by looking at the RViz animations if the pedestrians are actually avoiding the robot or even each other since the animations appear to pass by each other very closely.

    Thanks! patrick

    opened by pirobot 4
  • Pedestrian Walking Sim for Obstacle Avoidance

    Pedestrian Walking Sim for Obstacle Avoidance

    Hello there, I am trying to make a sim for p3dx (Pioneer 3dx Robot) in RVIZ such that when going from point A to Goal position it has to avoid a moving pedestrian who may be walking across or just standing in its path so it has to re-plan its trajectory. Could you please tell me how can i use your animated_walking_man marker for this purpose ? I would appreciate if you could reply at the earliest.

    question 
    opened by ktiwari9 4
  • Rviz Crashes (OGRE)

    Rviz Crashes (OGRE)

    Hello Everyone,

    I got the following error when I run the airport_demo example (roslaunch pedsim_simulator airport_demo.launch). So, I am not able to visualize the crowds and moving people in rviz.

    I am using ROS noetic and Ubuntu 20.04.

    Error: OGRE EXCEPTION(5:ItemIdentityException): Cannot find a group named rviz in ResourceGroupManager::isResourceGroupInitialised at /build/ogre-1.9-kiU5_5/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 1916)

    I tried to reinstall rviz and libogre-1.9-dev (see this LINK), but it doesn't solve the issue.

    Thanks in advance for your help.

    opened by IhabMohamed 3
  • [ERROR] 'spencer_tracking_rviz_plugin' failed to load

    [ERROR] 'spencer_tracking_rviz_plugin' failed to load

    Hello Team, I am using Ubuntu 18.04 with ROS Melodic. I had similar issues with the spencer_tracking_rviz_plugin. When I clone and build the package everything works fine for me. In fact, pedsim works fine too.

    Unfortunately, when I keep working on the pedsim package and others, and after building my workspace, the below error arises Screenshot from 2022-06-05 00-38-14

    Note:

    • I tried rospack find spencer_tracking_rviz_plugin after sourcing the devel workspace and was able to find the plugin, even after receiving errors.
    • I even did catkin clean, but no change in the error.

    Would you help me with this? Thank you!

    opened by chetanchandc 0
  • Updated ROS2 package

    Updated ROS2 package

    Hello,

    I have updated the package (minor edits including removing the dependency on spencer_* packages, moving spencer_people_tracking_rviz_plugin to pedsim_rviz_plugin). A lot of the work is borrowed from another branch.

    I have successfully compiled this on rolling and galactic. Although the pull-request says eloquent, you might want to make a separate repo for the ROS2 version.

    opened by ksatyaki 0
  • Possible segfault culprit

    Possible segfault culprit

    https://github.com/srl-freiburg/pedsim_ros/blob/de3772630ae174b278da00bcf26e5cf6c2db5ab2/pedsim_simulator/src/scene.cpp#L260

    Perhaps needs a continue after deletion? Because currentGroup is accessed immediately afterwards. It's bound to fail, right? Or am I missing something?

    opened by ksatyaki 3
  •  ImportError: cannot import name 'SpawnPeds'

    ImportError: cannot import name 'SpawnPeds'

    When I tried to python rl_agent/scripts/train_scripts/train_ppo.py It had error here:

    Traceback (most recent call last): File "rl_agent/scripts/train_scripts/train_ppo.py", line 13, in from rl_agent.env_wrapper.ros_env_cont_img import RosEnvContImg File "/home/hantewin/test/src/drl_local_planner_ros_stable_baselines-master/rl_agent/src/rl_agent/env_wrapper/ros_env_cont_img.py", line 19, in from rl_agent.env_wrapper.ros_env_img import RosEnvImg File "/home/hantewin/test/src/drl_local_planner_ros_stable_baselines-master/rl_agent/src/rl_agent/env_wrapper/ros_env_img.py", line 15, in from rl_agent.env_wrapper.ros_env import RosEnvAbs File "/home/hantewin/test/src/drl_local_planner_ros_stable_baselines-master/rl_agent/src/rl_agent/env_wrapper/ros_env.py", line 32, in from rl_agent.env_utils.task_generator import TaskGenerator File "/home/hantewin/test/src/drl_local_planner_ros_stable_baselines-master/rl_agent/src/rl_agent/env_utils/task_generator.py", line 29, in from pedsim_srvs.srv import SpawnPeds ImportError: cannot import name 'SpawnPeds'

    opened by xzy0825 0
  • People are not correctly assigned to a group

    People are not correctly assigned to a group

    Hello everyone! For some reason, whenever I create a group in a following manner:

      <waypoint id="waypoint_id_1" r="0.3" x="2.29508399963" y="5.5906701088"/>
      <waypoint id="waypoint_id_2" r="0.3" x="-2.9281039238" y="5.60592746735"/>
      <waypoint id="waypoint_id_3" r="0.3" x="-2.78732061386" y="-1.07651662827"/>
      <waypoint id="waypoint_id_4" r="0.3" x="2.2527050972" y="-1.39512872696"/>
    
      <agent dx="0.5" dy="0.5" n="3" x="2.3" y="5.6" type="1">
        <addwaypoint id="waypoint_id_1"/>
        <addwaypoint id="waypoint_id_2"/>
        <addwaypoint id="waypoint_id_3"/>
        <addwaypoint id="waypoint_id_4"/>
      </agent>
    

    people that are spawned in this location are assigned randomly to a group each time. It can be either no group, group of 2 (1 is by himself), and a group of 3. The same behavior is for different number of people ("n"), it also vary from 2 to n, and same for different "type" number. Did anyone else encounter this problem?

    opened by kurshakuz 0
Releases(0.0.3)
Owner
Social Robotics Lab, University of Freiburg
Social Robotics Lab at the University of Freiburg
Social Robotics Lab, University of Freiburg
a Living ENsemble Simulator -- a lens to help you watch biophysics

aLENS (a Living ENsemble Simulator) The motivation, algorithm and examples are discussed in this paper: aLENS: towards the cellular-scale simulation o

wenyan4work 8 Aug 19, 2022
Time Series Quick Simulator - able to perform time series analysis and to setup validation experiments.

tsqsim Time Series Quick Simulator - able to perform time series analysis and to setup validation experiments. With its somewhat limited plotting capa

null 6 Aug 7, 2022
Python wrapper for Environment Simulator Minimalistic (esmini)

python-esmini is a python wrapper for Environment Simulator Minimalistic (esmini). Install the package python-esmini is now only available for the Lin

Hamid Ebadi 6 Aug 4, 2022
Visualization framework powered by NVIDIA RTX technology

Introduction VisRTX is a C++ rendering framework developed by the HPC Visualization Developer Technology team at NVIDIA. Mesh source: Kitware Key feat

NVIDIA Corporation 174 Sep 3, 2022
High performance, easy-to-use, and scalable machine learning (ML) package, including linear model (LR), factorization machines (FM), and field-aware factorization machines (FFM) for Python and CLI interface.

What is xLearn? xLearn is a high performance, easy-to-use, and scalable machine learning package that contains linear model (LR), factorization machin

Chao Ma 3k Sep 21, 2022
Deploying Deep Learning Models in C++: BERT Language Model

This repository show the code to deploy a deep learning model serialized and running in C++ backend.

null 42 Mar 24, 2022
Object Based Generic Perception Object Model

This model is a highly parameterizable generic perception sensor and tracking model. It can be parameterized as a Lidar or a Radar. The model is based on object lists and all modeling is performed on object level.

TU Darmstadt - FZD 5 Jun 11, 2022
This is a small example project, that showcases the possibility of using a surrogate model to estimate the drag coefficient of arbitrary triangles.

flowAroundTriangles This is a small example project, that showcases the possibility of using a surrogate model to estimate the drag coefficient of arb

null 6 Sep 16, 2022
MozoLM: A language model (LM) serving library

A language model serving library, with middleware functionality including mixing of probabilities from disparate base language model types and tokenizations along with RPC client/server interactions.

Google Research 35 Jun 19, 2022
HackySAC is a C++ header only library for model estimation using RANSAC.

HackySAC HackySAC is a C++ header only library for model estimation using RANSAC. Available under the MIT license. Examples Minimal working example fo

Jonathan Broere 1 Oct 10, 2021
Operating system model using an assembler RISC-V RV32I instruction set.(development)

General Information Operating system model using an assembler RISC-V RV32I instruction set.(development) С++ Standard - c++17 gcc 9.3.0(Linux,unicode)

Alex Green 1 Dec 21, 2021
Hardware-accelerated DNN model inference ROS2 packages using NVIDIA Triton/TensorRT for both Jetson and x86_64 with CUDA-capable GPU.

Isaac ROS DNN Inference Overview This repository provides two NVIDIA GPU-accelerated ROS2 nodes that perform deep learning inference using custom mode

NVIDIA Isaac ROS 46 Sep 17, 2022
model infer framework with multithreads based on PaddleX

model_infer_multiThreads (最近更新:2021-10-28 增加了原生的所有api接口,支持clas/det/seg/mask) 该repo基于PaddleX模型推理动态链接库的接口代码进行修改,支持多线程并行访问。大部分代码均来自paddleX的model_infer.cp

Liang Su 14 Apr 27, 2022
It is a simple AI model running at Art-Pi.

Garbage Classification Device at Embedded AI Summer School 2021 of Nanjing IC Training Base Based on garbage datasets online, apply TensorFlow to get

MJ.XU 7 Aug 29, 2022
A lightweight 2D Pose model can be deployed on Linux/Window/Android, supports CPU/GPU inference acceleration, and can be detected in real time on ordinary mobile phones.

A lightweight 2D Pose model can be deployed on Linux/Window/Android, supports CPU/GPU inference acceleration, and can be detected in real time on ordinary mobile phones.

JinquanPan 50 Sep 1, 2022
A GKR-based zero-knowledge proof protocol for CNN model inference.

zkCNN Introduction This is the implementation of this paper, which is a GKR-based zero-knowledge proof for CNN reference, containing some common CNN m

null 30 Sep 22, 2022
Movenet cpp deploy; model transformed from tensorflow

MoveNet-PaddleLite Adapted from PaddleDetection; Movenet cpp deploy based on PaddleLite; Movenet model transformed from tensorflow; 简介 Movenet是近年的优秀开源

null 10 Aug 12, 2022
A Tool for Verifying Neural Networks using SMT-Based Model Checking

Project Title QNNVerifier Description A Tool for Verifying Neural Networks using SMT-Based Model Checking. Using Frama-C and ESBMC as the backends. Yo

null 2 Dec 11, 2021
Mmdeploy - OpenMMLab Model Deployment Framework

Introduction English | 简体中文 MMDeploy is an open-source deep learning model deployment toolset. It is a part of the OpenMMLab project. Major features F

OpenMMLab 1.3k Sep 21, 2022