mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-04-22 09:06:37 +00:00
1.9 KiB
1.9 KiB
Test Data Driver Component
Detailed Description
The Test Data Driver acts as a mock input source for the ASTRAL-Next system in the sandbox/validation environment. It replaces the real hardware camera drivers. It is responsible for iterating through the provided dataset (AD*.jpg), managing the simulation clock, and providing the "Ground Truth" camera intrinsics.
It serves as the primary feeder for Integration Tests, ensuring the system can be validated against a known sequence of events.
API Methods
initialize_source
- Input:
source_path: str,camera_config_path: str - Output:
bool - Description: Opens the image directory. Loads the camera intrinsic parameters (K matrix, distortion model) from the config file. Prepares the iterator.
- Test Cases:
- Valid path -> Returns True, internal state ready.
- Invalid path -> Returns False, logs error.
get_next_frame
- Input:
void - Output:
FrameObject | None - Description: Retrieves the next available image from the sequence.
- Structure of FrameObject:
image_raw: np.array (Original resolution)timestamp: floatframe_id: intintrinsics: CameraIntrinsics object
- Structure of FrameObject:
- Test Cases:
- End of sequence -> Returns None.
- Corrupt image file -> Skips or raises error.
get_intrinsics
- Input:
void - Output:
CameraIntrinsics - Description: Returns the loaded camera parameters (fx, fy, cx, cy, distortion).
- Test Cases:
- Check against known values in
data_parameters.md.
- Check against known values in
Integration Tests
- Sequence Replay: Point to
docs/00_problem/input_data, iterate through allAD*.jpgfiles. verify correct ordering and total count (60 frames).
Non-functional Tests
- File I/O: Efficiently read large files from disk without blocking the test runner for extended periods.