This week has been a slower week implementation wise. I have been mostly working on my portfolio documents. These documents are the main way Fontys will gauge my process and is a big factor in my assessment. I have not been putting a lot of time in them. So, for the next weeks I want to prioritize them a bit more.
Friday, I was a bit tired of the documentation so looked into the issues described of the previous week entry. I wanted to improve the demo to show it that afternoon in the CoLab meeting. The biggest issue of last week was that the straddle carrier was making weirds pathing choices when picking up container from the QCTP. So I started with that issue.
After some searching, I realized the problem was with the ScRouter. This router checks if the rotation is equal to specific hardcoded directions.
The implementation has an internal MAX_ANGLE_DELTA it checks against. However, is fairly small and probably just there to keep floating point accuracy issues from arising. This works for the prototype because the position and rotation end up at the right spot because there is no actual simulation just interpolation. In the simulation there currently is a bigger delta between target position and the final position because of the new simulation code. This delta should get smaller when I improve the ScHardware movement.
For long term I should change the router to not be so strict. The route should be independent of specific starting points. As the Sc should be able to make most movements even if when there is a big angle delta.
For now, I round the angle to the closest 45-degree angle before calling the router. This will fix the rotation comparisons issues while modifying the least amount of code. I use desmos for figuring out the equation. This one was pretty simply once I figured out the issue was with the router angles. This is the code that fixed the issue:
Afterwards I looked into the issue that the ASC was not showing up at the right time. That turned out to be because I didn’t wait for the async calls. I tried implementing bi-directional Sc movement. But had some issues with the implementation. I did not manage to finish that on Friday for the demo. So, I took it out for now.
The picking up of the container goes quite smoothly. However, when dropping off the container at the ASC it still moves strangely. Not sure if this is because the bidirectional movement is not yet implemented or it is problem with the router or something different altogether.
Next week I will again focus on documentation. I want to finish a first version of the portfolio to show my teacher.