Very low cosntruction and logistic robot speeds prevent them from moving at all
Posted: Wed Oct 23, 2024 7:40 pm
While playing using my GTTS mod targeting 240 UPS, I ran into the issue that some out of power construction and logistics robots were occasionally stuck bobbing in place on the map while there were free roboports available to charge them. I found that this was related to very low robot speeds.
I created a test mod RSM_1.0.0 which simply has:
data.raw["construction-robot"]["construction-robot"]["speed"] = 0.0045
I also set up a game save with a set of construction robots deployed and returning to a nearby roboport. It helps to enable the debug options "show-entity-positions" and "show-directions". It shows they are only able to move orthogonally with this speed if pointed in certain directions, and as they get close to the roboport for docking or charging come to a stop. If you finish the worker robot speed 1 research before they run out of electricity, they will gain the ability to move diagonally, reach the roboport for charging and finally dock.
In discord last night (for me) Bilka said, "the smallest value step for positions should be 1/2^8 = 0.00390625". While I initially didn't think that had anything to do with this as it didn't match the speeds I was seeing the problem at. I this morning after some rest, I realized I had been thinking very one dimensionally... While I am still not sure whether that has anything to do with this, it is suspiciously close to the orthogonal components of the robot speeds which they fail to move in some directions (0.00390625 * sqrt(2) ~= 0.0055).
I have a workaround for GTTS by boosting the out of energy robot speed multiplier if the potential minimum robot speed gets too low, and only occurs at scaling for the very highest UPS targets, but I figure that should not stop me from still reporting the issues that seem like bugs in the engine.
I created a test mod RSM_1.0.0 which simply has:
data.raw["construction-robot"]["construction-robot"]["speed"] = 0.0045
I also set up a game save with a set of construction robots deployed and returning to a nearby roboport. It helps to enable the debug options "show-entity-positions" and "show-directions". It shows they are only able to move orthogonally with this speed if pointed in certain directions, and as they get close to the roboport for docking or charging come to a stop. If you finish the worker robot speed 1 research before they run out of electricity, they will gain the ability to move diagonally, reach the roboport for charging and finally dock.
In discord last night (for me) Bilka said, "the smallest value step for positions should be 1/2^8 = 0.00390625". While I initially didn't think that had anything to do with this as it didn't match the speeds I was seeing the problem at. I this morning after some rest, I realized I had been thinking very one dimensionally... While I am still not sure whether that has anything to do with this, it is suspiciously close to the orthogonal components of the robot speeds which they fail to move in some directions (0.00390625 * sqrt(2) ~= 0.0055).
I have a workaround for GTTS by boosting the out of energy robot speed multiplier if the potential minimum robot speed gets too low, and only occurs at scaling for the very highest UPS targets, but I figure that should not stop me from still reporting the issues that seem like bugs in the engine.