For real world experiments: record a map (--> how to)
For simulation world experiments: convert this map to a gazebo world (with map2gazebo)
Equip all robots with fully charged batteries, and equip all charging stations with the uncharged batteries
Gathering data with rosbag2
In order to gather data you will need the tool rosbag2
This tool needs a configuration, stating which topics are to be recorded
if you use the multi_(real)_robot launch file, set the 'rosbag_topics_file' like in this example
Pay attention to the qos-profile the topic has -- this could require overriding the default settings of rosbag2, e.g. laser-scan topic
if you use the multi_(real)_robot launch file, set the 'qos_override_file' like in this example
Starting the code
For real world experiments: place the robots at their starting positions, turn them on
Note: Sometimes the robots don't boot correctly -- make sure the laser scanner turns quickly and all the required topics are active (use rqt)
For simulation experiments: make sure Gazebo launches without any error
Launch your code on the controlling laptop (if you're using rviz, make sure the tf-positions and/or robot description is active)
If this wasn't already started with the multi_(real)_robot launch file, now launch rosbag2 to record the data
Staging in experiments
There are two topics involved in staging experiments:
The global topic /command is for managing global commands: "ready", "go", "stop"
Each robot should publish a status topic, which can be "ready", "running" or "done"
Each experiment should be designed to adhere to this general procedure (which may be extended in the future, i.e. to reset experiments)
The command node which sends the commands has a parameter "run_timeout" which can be set to end experiments after a set time
You can pass run_timeout:=100.0 to the default multi-robot launchfiles to set the timer
The launch file will stop all nodes, after the command node is shutting down
Evaluating the data
The data recorded by rosbag2 is stored in a sqlite database
It can be analyzed using:
any tool processing .csv format (e.g. Excel) -- to create a csv file run python3 data_aggregation.py -h in the experiment_measurement folder and adhere to the help description for usage
jupyter-notebooks (until a better documentation is available, refer to this) -- to import the data, use the experiment_measurement code (see example)