Skip to content

UBC-Snowbots/network-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Network Rig Test (Direct Base-to-Rover)

This project provides a Python CLI script to measure key network metrics between the base station and rover at multiple distances.

What it measures

  • TCP bandwidth/throughput (iperf3)
  • UDP throughput, jitter, and loss (iperf3)
  • Ping latency (avg and p95) and packet loss (ping)
  • Program feasibility for:
    • telemetry
    • command_control

Install

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Configure

Copy and edit the example config:

cp config.example.yaml config.yaml

Set:

  • base.host
  • rover.host
  • ssh.user
  • ssh.key_path
  • distances.rover_m

Usage

Dry-run matrix:

python3 network_rig_test.py run --config config.yaml --dry-run

Run tests:

python3 network_rig_test.py run --config config.yaml

Optional flags:

  • --session-name <name>
  • --output-dir <path>
  • --no-plots
  • --fail-fast

Outputs

Default output directory:

  • results/<timestamp_session>/

Artifacts:

  • measurements.csv
  • summary.json
  • plots/metric_vs_distance.png
  • plots/latency_loss_vs_distance.png
  • plots/program_feasibility_vs_distance.png

Notes

  • Current implementation supports future.scenario_mode: direct only.
  • 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 iperf3 installed.

ROS 2 / RoverFlake2 compatibility

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:

  1. Run this rig with the ROS stack stopped to characterize the raw base-to-rover link.
  2. Run it again while RoverFlake2 launch files are active to see how the same link behaves under real traffic.
  3. 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
  4. 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/ping as 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/....

About

This project provides a Python CLI script to measure key network metrics between a base station and rover at multiple distances.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages