Test Plan - Weber-State-Submarine-Project/Submarine GitHub Wiki
Test Plan for Autonomous Boat
This document outlines the testing procedures for the autonomous boat, ensuring each component and the integrated system performs as expected.
Sonar Sensor Testing
Objectives:
- Verify sonar sensors transmit accurate data.
- Ensure 2D SLAM maps and 3D Octomap depth maps are generated correctly.
Procedures:
- Hardware Setup:
- Connect sonar sensors to the Raspberry Pi.
- Launch Sensor Node:
- Start the sonar sensor node using the ROS 2 launch file.
- Data Verification:
- Use
ros2 topic echo
to check for realistic and consistent sonar data.
- Use
- Mapping Nodes:
- Launch 2D SLAM and Octomap mapping nodes.
- Visualization:
- Use Foxglove or a similar tool to verify maps are being generated.
Boat Build Testing
Objectives:
- Confirm the boat’s stability in water.
- Ensure the electronics container is waterproof.
Procedures:
- Place the boat in the pool to test balance.
- Splash the electronics case fairly rough to ensure water protection .
Orientation Sensor Testing
Objectives:
- Verify the orientation sensor outputs accurate data.
Procedures:
- Connect the BNO085 orientation sensor to the Raspberry Pi.
- Launch the orientation sensor node.
- Use
ros2 topic echo
to confirm data accuracy during manual movements.
Motor Testing
Objectives:
- Test motor functionality for forward, backward, and turning motions.
Procedures:
- Pair the PS5 controller to the Raspberry Pi via Bluetooth.
- Launch the
joy_controller_to_esc
package. - Test forward, backward, and turning motions using the controller.
Battery Testing
Objectives:
- Ensure Battery 1 powers the Raspberry Pi and sensors.
- Verify Battery 2 powers the motors.
Procedures:
- Simulate full load operations and monitor voltage drains for both batteries.
Robot Localization Testing
Objectives:
- Validate robot position tracking using front sonar and orientation data.
Procedures:
- Launch the robot localization node.
- Place the robot in the pool and move it manually.
- Use
ros2 topic echo
to monitor the/odom
topic for accurate x, y coordinates. - Check if the robot's position updates accurately when it moves or turns.
Finalized Octomap Creation Testing
Objectives:
- Confirm the generated Octomap accurately represents the pool environment.
Procedures:
- Run the complete navigation program.
- Save the generated Octomap file.
- Visualize the Octomap in Foxglove and verify its accuracy.
- Check for missed areas or artifacts and recalibrate if necessary.
Behavior Tree Testing
Objectives:
- Ensure the behavior tree executes all tasks correctly, including navigation, mapping, and obstacle avoidance.
Procedures:
- Launch the behavior tree using the
bt_main
program. - Monitor the robot's behavior and logs to confirm:
- Turns when encountering a wall.
- Executes mapping actions (e.g.,
AdjustAngle
,Forward
,Turn90Degrees
).
Manual Control Testing
Objectives:
- Test the manual override system using the PS5 controller.
Procedures:
- Pair the PS5 controller with the Raspberry Pi.
- Launch the manual control package.
- Use the controller to:
- Move forward and backward.
- Turn left and right.
- Confirm the boat responds accurately and promptly to all inputs.
Pool Testing
Objectives:
- Test the integrated system’s functionality in a pool environment.
Procedures:
- Assemble and connect all components.
- Place the boat in the pool and power it on.
- Launch the main behavior tree.
- Start mapping via Foxglove.
- Monitor robot behavior, path, and mapping progress.
- Secure the boat after mapping completion.
- Analyze the generated map for completeness and accuracy.
Lessons Learned & Adjustments
- Calibration:
- Recalibrate sensors and actuators as necessary for consistent performance.
- Test Conditions:
- Perform tests in various environmental conditions to account for external factors.
- Behavior Tree Refinement:
- Adjust tree logic based on observed edge cases during tests.