UAT 308 Automation and Robotics Technology

Worksheet 3 Setting QoS and measuring real latency

Lab 12 hAssesses CLO2

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

  1. Write a 30 Hz image publisher and a subscriber taking 50 ms per image, timestamping every message
  2. Measure processed frames and latency at depth 1, 5 and 10 and compare with Example 1
  3. Set mismatched reliability between publisher and subscriber, observe and check with ros2 topic info --verbose
  4. Record camera and LiDAR bags and pair them with ApproximateTimeSynchronizer at several slop values; count pairs against Example 2
  5. Summarise a QoS table for every UGV topic with reasons

Record of results

Table 1 Processed frames and latency by depth
DepthFrames sentFrames processedFrames droppedMean latency (ms)Median (ms)
Table 2 Camera and LiDAR pairs by slop
Slop (ms)Pairs / LiDAR scansLargest time gap (ms)Heading error turning at 30 deg/s (deg)
Table 3 QoS table for the UGV topics
TopicDataReliabilityHistory and depthReason

Questions

  1. 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.

  2. 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?

  3. 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?

  4. 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

CLO2 Develop robotic systems with ROS 2. (CLOs are a web-team draft; the course owner sets the final ones.)

Instructors: answers and teaching notes for this worksheet are in the teaching pack