Giter VIP home page Giter VIP logo

isaac-crowd-sim's Introduction

Simulating crowds of people in Isaac Sim

This repository...

If you find this code relevant for your work, please consider citing one or both of these papers. A bibtex entry is provided below:

@article{hughes2023foundations,
         title={TODO},
         author={TODO},
         year={2024},
         eprint={xxxx.xxxxx},
         archivePrefix={arXiv},
         primaryClass={cs.RO}
}

Installation

To start using the isaac crowds simulator, by follow the steps described in the following sections:

  • Install requirements
  • Clone this repository
  • Patch Isaac Sim

Reqirements

Patching of Isaac Sim

As the simulator has multiple issues, which influence the functionality of this simulation, some files have to be manually patched

Use the files located at isaac_crowds_sim/patches and move them to the correct location specified on the first line of the file with reference to the main installation directory of isaac sim (generally ~/.local/share/ov/pkg/isaac_sim-XX)

The patches have the following functionality

  • annotator_utils.py
    • Fixes possible runtime error when using the annotator
  • global_character_position_manager.py and navigation_manager.py
    • Makes commnication of position, velocity and orientation of animated people possible
  • omni.isaac.sim.python.kit
    • Fixes bug, that animated people do not move when run from standalone simulator
  • queue.py
    • Fixes possible runtime error when using queueing animated people

Using different version of Isaac Sim

Newer versions of the isaac simulator are not supported. Yet it is possible to use them if all changes made to the API are adjusted accordingly.

In addition to this changes the following files have to be adjusted to match the used version of Isaac Sim

  • startup.sh: Change isaac directory for LD_LIBRARY_PATH and the python environment
  • isaac_crowds_sim/utils/character_setup.py: Change isaac directory in root_dir and change to the appropriate version of omni.anim.people in ext_path

Run

Simulator

To run the simulator just run the script startup.sh

Move robot in simulation

The robot in the simulation listens on the ros topic /move_wheelchair for velocity commands given as Twist messages.

Current methods to move the robots are:

  • Follow list of waypoints
    • Modify the file isaac_crowds_sim/config/coordinates.csv by setting the desired waypoints in the format (x, y, z, velocity)
    • Run waypoint_controller.py in a sourced ROS environment with ros2 run isaac_crowds_sim waypoint_controller to let the robot follow the predefined waypoints
  • Use the ROS package teleop_twist_keyboard to control the robot with keyboard inputs Run ros2 run teleop_twist_keyboard teleop_twist_keyboard cmd_vel:=move_wheelchair.

Generate people animation

Generating animations for a group of people is done in two steps.

  1. Create a json config file in isaac_crowds_sim/config/scenes by following the examples providied
    • Add for each sub-group the desired waypoints in a list format
    • Add savety margins to each location, which define the maximal distance a person belonging to this group can spawn at
    • Modify the number of people belonging to the sub-group
    • Change if there is a queue in the animated scenario (see multi-line.json as an example config)
  2. Run the animation generator by running python3 isaac_crowds_sim/utils/animation_file_generator.py to generate the appropriate txt file required by isaac sim
    • To change the selected configuration modify file_name in the file animation_file_generator.py

Save data & export rosbag

In order to get the data generated by the simulator, the data has to be first saved in a rosbag by running ros2 bag record -a

With all the data saved in rosbag format, the sensor data can then be automatically exported to JRDB format by using the rosbag exporter Run the exporter by running python3 isaac_crowds_sim/utils/rosbag_exporter/rosbag_exporter.py -i input_directory -o output_directory

Change input_directory to match the path of a rosbag and specify your desired output location in output_directory

isaac-crowd-sim's People

Contributors

wueestry avatar jopequ avatar

Stargazers

Sheng WANG avatar

Watchers

Yang Chen avatar

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.