Week 9
Situation
In lab 09: Performance Test 2: Code, the team’s goal was to develop two different versions of code that would still complete the main objective but determine which was better. By testing two different codes, it could help the team discover a better and more efficient code or help confirm moving forward with the original code. In order to make another independent code, the team developed one based on coasting for large distances by using the AEV’s larger mass to improve power efficiency. The other code, which the team had currently been using, was based upon using relative position commands and hard brakes by reversing the motors before the stop. To test the different codes, the team ran the course multiple times with each version uploaded and took note of consistency, efficiency, and effectiveness.
Results and Analysis
The team tested two different versions of code: one that stopped early and used the AEV’s weight to coast to the position, and the other that used absolute position and hard reverse break commands to stop on the dot. For the coasting code, the team noticed an increased efficiency that is likely due to a large amount of movement being done without any power. Although, this code proved to be troubling since the AEV often inconsistently stopped, triggering the second sensor. On the other hand, the second code’s strengths were in its consistency and effectiveness since it would be able to complete the full course with ease with very minor inconsistencies. However, the hard reverse brake does use a significant amount of power that results in greater inefficiencies. The team decided on continuing with the reverse brake code over the coasting one since it was more important that the AEV completed all tasks effectively rather than being very power efficient.
The AEV can complete the course by doing the following: travelling a distance of 352 marks, waiting for 7 seconds, moving an additional 403 marks, waiting 5 seconds, returning 297 marks, waiting for 7 seconds, return an additional 258 marks, decreasing speed for 110 additional marks, and coasting the final 90 marks to the starting point.
Takeaways
- AEV – decided on using code that implemented the absolute position commands over the code that focused on coasting.
- General – Think through revisions to code before testing them in order to cut down on wasted time.