FixTheRobot Explore Robotics / Systems Engineering / Troubleshooting

Troubleshooting · Sensors

Camera images contain motion blur

Blur is motion during the exposure. Shorten the exposure, add light or reduce motion, and use a global shutter when speed demands it.

  • Related modules: 02, 08
  • ROS 2 Jazzy

1. Symptoms

  • Features smear in the image when the robot moves or turns.
  • Feature tracking or visual odometry loses lock in motion.
  • Straight edges look skewed (rolling-shutter effect).

2. Possible causes

  • Long exposure in low light (auto-exposure picks a long time).
  • Motion: speed, turning rate, vibration.
  • Rolling shutter: rows exposed at different times skew moving scenes.
  • Focus or lens problem mistaken for blur.
  • Gain limited so exposure cannot be shortened.

3. Measurements to collect

  • Exposure time and gain for each frame (from the driver or camera API).
  • Blur length in pixels ≈ image motion speed (px/s) × exposure time.
  • Robot speed and angular rate at the time.
  • Light level in the scene.

4. Diagnostic commands

Commands are not executed by the site’s automated tests (they need a ROS 2 Jazzy installation or the robot).

ros2 topic hz /camera/image_raw
ros2 param list /camera_driver | grep -i -E "exposure|gain"
ros2 run rqt_image_view rqt_image_view

5. Step-by-step investigation

  1. Read the exposure time and compute blur ≈ pixel speed × exposure.
  2. Fix manual exposure to a short value (a few ms) and raise gain or add light; compare tracking.
  3. Check the driver’s auto-exposure limits and set a maximum exposure.
  4. Slow the motion temporarily to see if blur disappears.
  5. Check the shutter type: a global shutter removes skew; with a rolling shutter lower the speed or use readout-time compensation in the estimator.
  6. Check focus and lens on a static target.

6. Corrective actions

  • Cap exposure and compensate with gain and lighting.
  • Use a global-shutter camera for fast motion.
  • Mount the camera on a vibration-isolated, stiff bracket.
  • Use a faster frame rate with shorter exposure.
  • Enable rolling-shutter-aware processing if the estimator supports it.

7. Validation after the fix

  • Blur length below about one pixel (or the tracker’s limit) at the maximum speed.
  • Feature tracking stays locked through the worst-case turn.
  • Timestamps are exposure time (see the camera guide).

References