dragonpilot-community / dp-devel

Development branch for dragonpilot
MIT License
31 stars 29 forks source link

mapd node feature behaviour #25

Closed jprous closed 1 year ago

jprous commented 1 year ago

I have been implementing the nodes feature speed changes to my Subaru Forester, it really works well - thanks for the add. However, when passing a node, such as a speed bump, the road speed limit does not change back until a node in the road way has been passed. In some cases, if the road is straight, the next roadway node may be far off, leaving the speed limit at the last node feature limit passed.

Suggestion: can the roadway routine check whether the feature node is ahead or behind. The moment its position becomes behind the vehicle position, the speed limit should change back to the roadway it is on, or to the previous set road speed limit. This would make the behaviour at stops and traffic circles much better as well.

jprous commented 1 year ago

I managed to simulate this behaviour in carcontroller.py by testing whether the distance to the feature exists, increases or decreases at 5Hz, works pretty well, will close this request. JP