These instructions will provide a brief, step-by-step guide to setting up the SWARM Developer System to collect sensor data.

Please note this is for using the Command Line system for submitting a Simulation!

Currently Supported Sensors

  • IMU
  • GPS
  • Barometer
  • LiDAR

Support for more sensors is coming soon. Reach out to Tyler Fedrizzi if you have immediate needs for a sensor not listed here.

Setting your Settings

Step 1 - Create A Settings File

To get started, you can utilize the DefaultSimulationSettings.json file located in the settings folder of the client repository. Feel free to copy this file and rename it or modify this one directly.

Step 2 - Add needed Sensors

Add any supported sensor to the Sensors section for each agent. The SWARM Developer System will automatically collect data from any supported sensor that is available. Please see the example below for adding an IMU to the an agent. Please see the Sensors documentation for more information about each parameter.

{
            ...
                "Sensors": {
                    "IMU": {
                        "Imu1": {
                            "Enabled": true,
                            "Method": "Colosseum",
                            "PublishingRate": 50.0
                            "Record": true
                        }
                    },
                    ...
                }
}
                

Step 3 - Setup the Sensor Data Collector Node

You will want to add a SensorDataCollector to the SoftwareModules of the Agent or Agent's you are running. An example is provided below:

{
    ...
        "SoftwareModules": {
            "SensorDataCollector": {
                "Parameters": {
                    "OutputType": "csv"
                },
                "Publishes": [],
                "Subscribes": []
            },
            ...
        }
}
        

Please view the Documentation for the SensorDataCollector for module options.

The SensorDataCollector module is a Node in the computation graph for the SWARM Developer System, which reads in the provided sensor settings and collects data based upon the publishing rate for each sensor. Data for each sensor is provided in a separate data file, with multiple data formats supported (currently only csv is supported but more are on the way.)

Running the Simulation

Step 1 - Run the Client

To run the Simulation that you have set up, simply run the following command: (Note that there are differences if you are running the system locally or with the cloud)

Connecting to AWS Cloud

You should find the IP address of the server to connect to on the SWARM Simulation Platform Server Manager page. It is an IPV4 address in the format XXX.XXX.XXX.XXX. You can utilize this to create the following command:

python3 main.py --ip-address XXX.XXX.XXX.XXX
            

Running Locally

You can run locally by running python3 main.py.

Step 2 - View the Livestream

Once the simulation has started, you can go to the IP address provided (127.0.0.1 if running locally) and view the streamed output of the agent executing the provided mission. Data is being collected the entire time.

Step 3 - Downloading Data

Once the simulation has been completed, you will be prompted to download data. Enter "y" to download the logs and sensor data from the server.

Data is downloaded to the data folder. Sensor data is in data/AGENT_NAME/sensors in the format that was requested.

Tags: