Chaitanya Rajasekhar
Chaitanya Rajasekhar
Creator of this blog.
May 9, 2019 2 min read

Robotarium GNN Simulation

thumbnail for this post

In the chaser model, agent ‘i’ tries to chase the agent ‘i+1’ excluding the edge case condition. In the simulations below, a time step is considered to be 0.3 sec and the number of agents to be 20, and the number of time steps to be 50. Check out the swarm’s repo for a detailed look at the implementation of the chaser model.

The agents in the Robotarium are controlled by the velocity inputs. The agents for this experiment is initialized in the circular fashion so that chasing action looks like agents rotating in circles with respect to the center of the testbed.

The first experiment is just initialized the initial positions (circular positions) from the test data and execute the velocities command for the rest of the time steps. This experiment has position RMSE (root mean square error) of 0.1.

Note: The agents are docked to the edge of the testbed, In the gif files it takes some time to get them to the initial conditions of the simulation.

alt text

The graph neural network is trained with 5000 instances of the chaser model for 10,000 training steps. For more information on the GNN implementation check the run_dynamical.py in this repo. run_dynamical_robotarium.py file is used to the inference experiments in the Robotarium simulator.

For the experiment below the GNN is used to predict the test data at the beginning and the velocities predictions are used to update the agents in the Robotarium. This execution has position RMSE of 0.7 approximately.

alt text

But in the real world, we do not have access to future position information. So the above two models are not feasible to perform the real-world experiments. So the next experiment is done in such a way that at every time step the GNN is used to predict the next states from the current agent data. This does not work as expected because of the execution time of GNN at each time step takes 0.5 sec, therefore, the total execution takes 0.8 secs which causes a drift in positions causing the circle to expand seen the gif below.

alt text

Next time I will try to optimize the run time of GNN or find a better way to run GNN dynamically.