You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thought I'd pick the community's brain for a way to elegantly prevent a vehicle changing directions on a roadway when autopilot is re-enabled after some manual steering is applied.
We will periodically inject 'noise' into a carla.VehicleControl's steer value while in motion by disabling auto-pilot and incrementally adding random noise to the steer value over a short period of time. We then re-enable auto-pilot and let it set said steering value and it will nearly always 'right' itself, get back onto the roadway, etc. unless there is a collision (which we detect and respawn the vehicle as needed).
IIRC, the autopilot seeks the nearest embedded, predefined point in the map ahead of it, so if said noise causes the vehicle to turn enough, it will seek a waypoint that was originally behind it and start driving in the opposite direction (before noise).
Short of crunching some numbers to ensure noise never causes it to turn 'enough' to trigger such a situation, any way to get auto-pilot to seek the point it was traveling towards before it was disabled then re-enabled?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Greetings,
Thought I'd pick the community's brain for a way to elegantly prevent a vehicle changing directions on a roadway when autopilot is re-enabled after some manual steering is applied.
We will periodically inject 'noise' into a
carla.VehicleControl
'ssteer
value while in motion by disabling auto-pilot and incrementally adding random noise to thesteer
value over a short period of time. We then re-enable auto-pilot and let it set said steering value and it will nearly always 'right' itself, get back onto the roadway, etc. unless there is a collision (which we detect and respawn the vehicle as needed).IIRC, the autopilot seeks the nearest embedded, predefined point in the map ahead of it, so if said noise causes the vehicle to turn enough, it will seek a waypoint that was originally behind it and start driving in the opposite direction (before noise).
Short of crunching some numbers to ensure noise never causes it to turn 'enough' to trigger such a situation, any way to get auto-pilot to seek the point it was traveling towards before it was disabled then re-enabled?
Beta Was this translation helpful? Give feedback.
All reactions