Giter VIP home page Giter VIP logo

crowd_simulation's Introduction

Crowd simualtion plugin for gazebo and ignition-gazebo

Reference:

Menge: https://github.com/MengeCrowdSim/Menge. Menge is an open framework for crowd simulation. In this simulation, the original menge lib is modified to satisfy the scenario for rmf project.

Environment Setup

  1. Please use the following ignition source branch, if you are going to use ignition-gazebo plugin.
repositories:
  ign-cmake:
    type: git
    url: https://github.com/ignitionrobotics/ign-cmake
    version: ign-cmake2
  ign-common:
    type: git
    url: https://github.com/ignitionrobotics/ign-common
    version: ign-common3
  ign-fuel-tools:
    type: git
    url: https://github.com/ignitionrobotics/ign-fuel-tools
    version: ign-fuel-tools4
  ign-gazebo:
    type: git
    url: https://github.com/ignitionrobotics/ign-gazebo
    version: master
  ign-gui:
    type: git
    url: https://github.com/ignitionrobotics/ign-gui
    version: master
  ign-launch:
    type: git
    url: https://github.com/ignitionrobotics/ign-launch
    version: master
  ign-math:
    type: git
    url: https://github.com/ignitionrobotics/ign-math
    version: ign-math6
  ign-msgs:
    type: git
    url: https://github.com/ignitionrobotics/ign-msgs
    version: ign-msgs5
  ign-physics:
    type: git
    url: https://github.com/ignitionrobotics/ign-physics
    version: ign-physics2
  ign-plugin:
    type: git
    url: https://github.com/ignitionrobotics/ign-plugin
    version: dlopen_exception
  ign-rendering:
    type: git
    url: https://github.com/ignitionrobotics/ign-rendering
    version: master
  ign-sensors:
    type: git
    url: https://github.com/ignitionrobotics/ign-sensors
    version: master
  ign-tools:
    type: git
    url: https://github.com/ignitionrobotics/ign-tools
    version: ign-tools1
  ign-transport:
    type: git
    url: https://github.com/ignitionrobotics/ign-transport
    version: ign-transport8
  sdformat:
    type: git
    url: https://github.com/osrf/sdformat
    version: sdf9
  1. Manually modify Actor.cc file in sdformat9. Please check the PR for Actor.cc in https://github.com/osrf/sdformat/pull/301/files. This PR had been merged into sdf8 but may not be merged into sdf9 yet. If not, you will need to manually modify all the copy constructor in Actor.cc.

  2. Menge dependencies: The core lib for meng is at https://github.com/FloodShao/menge_core.git to make menge possible be compiled with colcon.

Steps:

  1. Compile ignition package in work space ignition_ws after modified the Actor.cc in sdf9
  2. In crowd simulation work space dev_ws. Download the repositories file "crowd_simulation_plugin.yaml" in the repo, and proceed:
vcs import src < ./crowd_simulation_plugin.yaml
  1. Colcon compile packages as following order:
colcon build --packages-select menge
colcon build --packages-select crowd_simulation_common
colcon build --packages-select crowd_simulation_gazebo
colcon build --packages-select crowd_simulation_ign

Run simulation

  1. source environment
source ~/ignition_ws/install/setup.bash
source ~/dev_ws/inatll/setup.bash
  1. for gazebo plugin
cd ~/dev_ws/src/crowd_simulation_gazebo/test/crowd_simulation/show_and_tell/
ros2 launch office_launch.launch
  1. for ignition-gazebo plugin
cd ~/dev_ws/src/crowd_simulation_ign/test/crowd_simulation/test_world/
ros2 launch test_world.launch.xml

Note

The default engine for ignition is "orge". If you have the nvidia graphics, remember to change the <engine> tag in test_world/test.world to orge2.

crowd_simulation's People

Contributors

floodshao avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

crowd_simulation's Issues

Different update rate between gazebo plugin and ignition plugin

History problem.
The gazebo plugin is referencing the previous crowd simulation, as well as the update part.
The ignition plugin is a bit different from gazebo version. From the current simulation result, the ignition version should be more stable. Modify the gazebo version.

Increase radius of Crowd object for robots to detect

Hello @FloodShao ,
I am using crowd simulation with a nav2 robot to see how a robot behave when it detects the moving crowd.
Having added the object markers, i realized that, the crowd is considered as if an object of very small radius.
Even increasing 'r' in agent profile is not helping.
https://github.com/MengeCrowdSim/Menge/blob/master/doc/mengeDetails/sceneSpec.md#:~:text=r%3A%20in%20%25Menge%2C%20agents%20are%20largely%20modeled%20as%20circular%20disks.%20This%20is%20the%20radius%20of%20that%20disk.
Regards,

The refreshing models in ignition plugin

When applying the ignition plugin, every update iteration, the models are refreshed, looks like the world is twinkling...

Although no idea what's happening there.

Add actor initial position tag

In ignition, some actors set (0, 0, 0) at the waist, while some actors set (0, 0, 0) at the foot.
Add the actor initial position tag to set the original pose for actors

optimize the update strategy for each update iteration

The realtime factor is related to the menge simulation rate (the agent movement update rate, this step will also update the agent animation), which is able to set in the plugin parameter.
Under the same agent number (25 total)
So when the menge simulation rate is 0.1s, ign: around 100%, gazebo: 0.80.
when the menge simulation rate is 0.01s, ign: around 78%, gazebo: 0.69.
Under the simulation rate of 0.01s:
only 2 agents: ign: around 82%, gazebo: 92%.
So I was wandering why is that…. and found that.
the gazebo plugin is using Kong Peng’s original structure, where he uses a template class of a functions, so in this logic, the code only iterate the database once, and the ptr is stored in that template class, no need to search again.
in ign plugin I was written on the simplest logic, to search the database for each update iteration. I think this can be optimized.

Isolate the pose interface in the common interface using eigen

Currently in rmf project, the gazebo-9 is used which uses the data structure of ignition::math::v4, will the ignition-gazebo is expected to use the latest ignition::math::v6. Currently the two versions are sharing the same common interface.

Task:
isolate the ignition::math interface from crowd_simulation_common, and made modifications of related APIs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.