Pavement Drive Assist Continued

by azaghal

Introduces a driver assistance system that autonomously follows paved roads, while maintaining a preset cruise speed if desired.

Content
a month ago
1.1 - 2.0
15.5K
Transportation

g a question about asphalt lines

2 years ago

Hello, thanks for updating the mod to latest factorio version.

I have a question. I have designed some roads with asphalt mod (the updated version) and put lines on sides of the road. I also put some various markings for train crossing, my own style but a combination of asphalt and refined concrete.

please check the screenshot. when I drive the car to forward, it shall suddenly turn around and crash into gates or walls. I suspect car tries to align itself within those asphalt lines and the lines I have put are diagonal or vertical to road. does it affect the direction finding? or is it because of the refined concrete which is like a stopper?

https://i.imgur.com/7iyHcLQ.png

I set the refined concrete priority to 0 and I do not have another tile than asphalt or refined concrete on the screenshot (under rails are also regular refined concrete). would making the priority 0 make the script to "ignore" refined concrete or "avoid" it?
btw, if I drive full straight then no problem happens. if I drive with a little angle (which sometimes I cannot control it fully) car turns to walls and crashes.

if you need I can try to send the map as well, it is a test map anyway.

regards

2 years ago

So, talking a bit off the top of my head since I haven't used asphalt mod for a while now, but... If I remember well, the asphalt lines will definitively act as separators between valid paths. The best way to see this would be to set-up a straight road with two lanes that are separated by an asphalt line. Should you try to drive on the road using drive assist, you should notice that it will center you on one of the two lanes, and never in exact middle.

So, I don't think that priority matters in this particular set-up you have - most likely you would need to get rid of the yellow lines you have that are sitting just in front of the hazard concrete.

Perhaps a couple of more options that pop to my mind:

  • Try fiddling with the score values for road lines themselves.
  • Try dropping/getting rid of just the "curving" yellow lines (the ones that might make the car try to follow them "sideways").

On another note - this is most likely not a bug, although I haven't tried to study the algorithm in detail :) It's just that you are using the lines in a way that was not intended. Oh, and I've been there, done that myself :D

2 years ago

Oh, and thank you for using the mod - this mod is probably the main reason why I still am using cars in Factorio, I am happy that previous maintainers did work on it in the first place - I just did minor fixes to make it usable in up-to-date versions :)

2 years ago

hi again,
as you suggested I tested around yellow lines on asphalt, yes, car tries to drive within lines. I removed the yellow line pattern I used but the problem is still there, less though. I figured the refined concrete gets into problem this time.

I changed the refined concrete to asphalt tile which has similar pattern but asphalt based. even though it has diagonal lines on it, the script works perfect now. it does not cause weirdness like the refined concrete or yellow lines.

thanks for support.

New response