Skip to content

Simulating different crowds in Isaac Sim for autonomous navigation

License

Notifications You must be signed in to change notification settings

SCAI-Lab/isaac-crowd-sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simulating different crowds in Isaac Sim for autonomous navigation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published