Skip to content

Conversation

@glopezdiest
Copy link
Contributor

@glopezdiest glopezdiest commented Oct 29, 2025

Description

Changed the target location used by the TrafficManager control to smooth the way turns are performed.

Currently, the road is divided into waypoints every 5m, reduced to 2-3m at turns. The MotionPlanStage selects one of these waypoints and uses is as the target. This creates sudden changes in the target yaw, making the control less smooth.

This PR makes it so that instead of targeting a specific waypoint, it interpolates between the two closest ones to that target distance, picking a location in between. The PR also changes the angular metric from the dot product to the angle. It doesn't really make that much of a difference control wise, but the dot product has a non-linear relation with the steering, while the angle has so it adds a bit of robustness..

Where has this been tested?

  • Platform(s): Ubuntu 22.04
  • Python version(s): 3.10
  • Unreal Engine version(s): CARLA's UE4

This change is Reviewable

@glopezdiest glopezdiest requested a review from a team as a code owner October 29, 2025 10:48
@update-docs
Copy link

update-docs bot commented Oct 29, 2025

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update our CHANGELOG.md based on your changes.

Blyron
Blyron previously approved these changes Oct 29, 2025
@Blyron Blyron merged commit dfb66fd into ue4-dev Oct 31, 2025
3 of 4 checks passed
@Blyron Blyron deleted the glopez/tm_smooth_turns branch October 31, 2025 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants