Closed lewie-donckers closed 2 years ago
@Rayman @rokusottervanger @Timple I need some help. I noticed that I introduced a change in behavior which can be seen when running the visualization of the tests. I tracked it down to this commit.
In certain tests, you can see that the robot takes longer to stop and turns a bit more at the end of the test.
Example before change:
Example after change:
Any idea what's going on and how to fix it?
I'm not sure. But could you maybe refactor this first, so that this calculation is isolated as a separate function. Then a unit test can show if/how the behavior changes.
@Timple @rokusottervanger @Rayman
I have reworked this PR. I fixed the new implementation with the help of @rokusottervanger . The calculation is now moved to a separate function and I've added some unit tests.
I tested this by running a build with both the old and new calculation in tandem. It logged if they were not the same. None of the automated tests showed any differences.
Simplified the calculation of the direction of the goal in
Controller::update()
. Fix for #82 .