Closed Maaz0070 closed 1 year ago
i ran the mock classes through the test files in demos/
and they all worked fine
Future Scope
- Look into making a mock scenario file that mimics the rover moving closer to a target GPS position
Possible approach, as discussed with @Maaz0070 : Record a sample of actual sensor values while rover is moving to a GPS coordinate.
Cc @LucasStevenson
GitHub Issue: Create Mock Sensors for Autonomous Systems Project
Description: As part of enhancing the testing capabilities of the Autonomous Systems, we need to create mock sensor classes for all the sensors used in the project. These mock sensor classes will simulate the behavior of real sensors by providing random data for testing various functionalities.
Mock Sensor Implementation:
MockBN08x:
MOCKLSM303:
MOCKWiFi:
MOCKGPS:
MOCKMPU6050:
MOCKRPLIDAR:
MOCKSerial:
MOCKIR_Sensor:
MOCKStereoCamera:
Steps:
Create the mock sensor classes in the
modules
directory of the project.Implement the necessary methods in each mock sensor class to provide random data similar to the real sensors.
Create a separate branch named
feature/mock-sensors
branching off from themain
branch.Commit the new mock sensor classes to the
feature/mock-sensors
branch.Test the mock sensors by writing unit tests in the respective test files.
Once the mock sensors are fully tested and verified, create a pull request to merge the branch into the
main
branch.File Changes: Autonomous_Systems/ └── modules/ ├── BN08x.py ├── GPS.py ├── IR_Sensor.py ├── LSM303.py ├── MOCKBN08x.py # New ├── MOCKLSM303.py # New ├── MOCKWiFi.py # New ├── MOCKGPS.py # New ├── MOCKMPU6050.py # New ├── MOCKRPLIDAR.py # New ├── MOCKSerial.py # New ├── MOCKIR_Sensor.py # New ├── MOCKStereoCamera.py # New ├── MPU6050.py ├── RPLIDAR.py ├── Serial.py ├── WiFi.py
Testing:
Expected Outcome:
Additional Notes:
Future Scope