SONATA - A Toolkit to Generate Social Navigation Datasets and HRI
Contributors: Rishabh Baghel, Aditya Kapoor, Pilar Bachiller, Ronit R. Jorvekar, Daniel Rodriguez-Criado and Luis J. Manso
Social navigation datasets are necessary to assess social navigation algorithms and train machine learning algorithms. Most of the currently available datasets target pedestrians’ movements as a pattern to be replicated by robots. It can be argued that one of the main reasons for this to happen is that compiling datasets where real robots are manually controlled, as they would be expected to behave when moving,is a very resource intensive task. Another aspect that is often missing in datasets is symbolic information that could be relevant, such as human activities, relationships or interactions. Unfortunately, the available datasets targeting robots and supporting symbolic information are restricted to static scenes. Our approach argues that simulation can be used to gather social navigation data in an effective and cost-efficient way and presents a toolkit for this purpose. A use case studying the application of graph neural networks to create learned control policies using supervised learning is presented as an example of how it can be used.
The toolkit is used to generate the dataset by simulating the scenarios for robot’s navigation in a social setting. We show an usecase of this data collected from the toolkit by converting into graphs and feeding it into the GNNs to predicts the robot’s path in a given scene.
Format of the collected data
The data collected from the toolkit comprises of the following for a given entity:
- Co-ordinates
- Velocity with respect to the robot
- Type of interaction betweeen the two entities
- Orientation
- Size
The data is stored in the form of JSON files, with the following structure:
How to run the default tool
Prerequisites
Before installing the tool, it is necessary to have this software installed in your computer:
- PyTorch
- DGL
- PyTorch Geometric
- PyRep (This link would also help in the installation of CoppeliaSim)
- Robocomp
Installing and running
After cloning the directory, execute the following commands to move the interfaces to the proper location:
Ans then run the tool with:
Using SONATA GUI
After you run the above commands the SONATA GUI opens up. Follow the following steps to start generating your data:
-
Write the contributor’s (user’s) name so that the data saved can be marked by the users name.
-
After this the simulation will start with a green tint, and until the mouse controller is clicked robot will not move.
-
Select the configuration from the top bar of the SONATA GUI to select the range of different entities you want to add in the scene. You can also regenerate a scene if you don’t like the settings of entities by using the regenerate button from the top bar. We also provided blue lines between two entities to show that they are interacting with each other.
-
Click on the mouse controller and hold the left key and drag the mouse to move the robot in that direction.
-
Move the robot to the goal marked by the cone.
-
Save your data.
After you click and save the data, a JSON file is generated and the full episode gets saved with timestamps. For the usecase we take these JSONs and convert them into graphs using socnavData data loader, which is then fed into the GNNs. Once the model is trained you can run the toolkit in test mode by setting TEST_MODE boolean to true in the controller’s specificworker.py file.
Tutorial: Customize SONATA
SONATA’s main components are the Controller, Joystick, and Simulator. All the changes that needs to be done are in the src/specificworker.py file of these components. For adding/changing a new objects in the scene, python/coppeliasimapi2.py needs to be modified, for interacting or controlling the behavior of these objects you can make changes in python/sonata.py module.
Add a new object to the scene
Let’s assume you want to add more than one goal in the scene, for that you need to make another goal object in python/coppeliasimapi2.py.
After this you need to call this NewGoal()
object in the python/sonata.py module in def room_setup()
.
Citation
To cite this work, use the following BibTex notation: