This project provides a Python CLI script to measure key network metrics between the base station and rover at multiple distances.
- TCP bandwidth/throughput (
iperf3) - UDP throughput, jitter, and loss (
iperf3) - Ping latency (avg and p95) and packet loss (
ping) - Program feasibility for:
telemetrycommand_control
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtCopy and edit the example config:
cp config.example.yaml config.yamlSet:
base.hostrover.hostssh.userssh.key_pathdistances.rover_m
Dry-run matrix:
python3 network_rig_test.py run --config config.yaml --dry-runRun tests:
python3 network_rig_test.py run --config config.yamlOptional flags:
--session-name <name>--output-dir <path>--no-plots--fail-fast
Default output directory:
results/<timestamp_session>/
Artifacts:
measurements.csvsummary.jsonplots/metric_vs_distance.pngplots/latency_loss_vs_distance.pngplots/program_feasibility_vs_distance.png
- Current implementation supports
future.scenario_mode: directonly. - CSV schema includes relay-ready columns (
scenario,relay_distance_m) for future expansion. - The script retries each metric command once before marking failure in
notes. - The rover host must be reachable over SSH and must have
iperf3installed.
This project is not currently a ROS 2 package: it has no package.xml, setup.py, or ament_python wrapper. That is okay for the main job here. The network rig measures the link itself with iperf3, ping, CSV summaries, and plots, so it can run alongside a ROS 2 rover stack without being built by colcon.
The RoverFlake2 repo is a ROS 2 workspace with many packages under src/, custom messages in src/rover_msgs/msg, and network configuration under network_stuff/. Its current network scripts set values like ROS_DOMAIN_ID=101, RMW_IMPLEMENTATION=rmw_cyclonedds_cpp, ROS_LOCALHOST_ONLY=0, and CYCLONEDDS_URI=.../network_stuff/dds_profile_cyclone.xml. For ROS-level tests, source the same ROS and CycloneDDS environment on the base station and rover before collecting data.
Recommended workflow:
- Run this rig with the ROS stack stopped to characterize the raw base-to-rover link.
- Run it again while RoverFlake2 launch files are active to see how the same link behaves under real traffic.
- On the base station, use ROS 2 introspection for application-level measurements:
source /opt/ros/humble/setup.bash source ~/RoverFlake2/install/setup.bash source ~/RoverFlake2/network_stuff/cyclonedds_env.sh ros2 node list ros2 topic list -t ros2 topic hz /gnss_fix ros2 topic bw /gnss_fix
- For repeatable competition data, add a small ROS 2 collector later that subscribes to selected topics, records receive rate/message size/drop symptoms, and writes rows into this repo's result schema. Keep
iperf3/pingas the baseline because they distinguish radio/link problems from ROS graph or node problems.
Useful RoverFlake2 topics to start with depend on what is launched, but the repo includes examples such as GNSS on gnss_fix, drive commands on cmd_vel, wheel speed topics, drive feedback, and heart/health topics under /heart/....