UAT 308 Automation and Robotics Technology
Worksheet 3 Setting QoS and measuring real latency
Objective
Measure how QoS settings affect latency and processed frames, and pair camera and LiDAR data by time
Equipment and materials
- Computer with ROS 2
- Training camera and LiDAR, or bag files prepared by the lecturer
- Python and the module 3 example code
Safety
- Desk and lab work; no driving or flying
Steps
- Write a 30 Hz image publisher and a subscriber taking 50 ms per image, timestamping every message
- Measure processed frames and latency at depth 1, 5 and 10 and compare with Example 1
- Set mismatched reliability between publisher and subscriber, observe and check with ros2 topic info --verbose
- Record camera and LiDAR bags and pair them with ApproximateTimeSynchronizer at several slop values; count pairs against Example 2
- Summarise a QoS table for every UGV topic with reasons
Record of results
| Depth | Frames sent | Frames processed | Frames dropped | Mean latency (ms) | Median (ms) |
|---|---|---|---|---|---|
| Slop (ms) | Pairs / LiDAR scans | Largest time gap (ms) | Heading error turning at 30 deg/s (deg) |
|---|---|---|---|
| Topic | Data | Reliability | History and depth | Reason |
|---|---|---|---|---|
Questions
From Table 1, why does a larger depth process more frames but also raise latency? Are your measurements close to Example 1? If not, give possible reasons.
When you set mismatched reliability between publisher and subscriber, what did you see, and what did ros2 topic info --verbose show? Why is this problem often mistaken for broken code?
From Table 2, which slop would your group choose for hotspot detection while the vehicle turns? Justify it with the pair count and heading error. What fix is better than widening the slop?
At 1 m/s, how far off would the hotspot position be because of the latency difference between depth 1 and depth 10? Which topics in Table 3 should use a long queue and reliable delivery, and why?
Check before you hand in
What to hand in
- Node code and latency table
- Record of the reliability mismatch
- Pair count by slop
- UGV QoS table