Skip to content

Added Left Hand Traffic support#8951

Merged
Blyron merged 16 commits intoue4-devfrom
left_hand_traffic_support
May 31, 2025
Merged

Added Left Hand Traffic support#8951
Blyron merged 16 commits intoue4-devfrom
left_hand_traffic_support

Conversation

@glopezdiest
Copy link
Copy Markdown
Contributor

@glopezdiest glopezdiest commented May 30, 2025

Description

This PR adds left-handed traffic support. Left-handed traffic is defined in two stages, the road and the traffic elements.

For the roads, the OpenDrive is used, specifically the rule road attribute, like the example below

<road name="Road 0" length="1.3310253693587601e+1" id="0" junction="-1" rule="LHT">
    <link>
        <predecessor elementType="road" elementId="3" contactPoint="end" />
        <successor elementType="road" elementId="10" contactPoint="start" />
    </link>
...
</road>

The rule attribute works as follows:

  • LHT for left-handed traffic
  • RHT for right-handed traffic
  • Any other values, or if the rule attribute is missing, defaults to right-handed traffic

As for the traffic elements (traffic lights, stops, yield, speed limits...), the creators of the maps are responsible for placing them in the correct spot so that they make sense in a LHT environment. As such, this doesn't mean that available maps, such as Town10HD_Opt, can now be used as a LHT.

Having maps with mixed RHT and LHT is possible, though limited testing has been done in that area.

The TrafficManager has been modified to automatically use the direction set by the road. The keep_right_rule_percentage parameter has been renamed to keep_slow_lane_rule_percentage, as the right rule didn't make sense in LHT. For left-handed roads, vehicles controlled by the TM will move to the left instead (if the parameter is active). THIS BREAKS COMPATIBILTIY WITH PREVIOUS VERSIONS.

Waypoints now have an additional is_rht attribute to determine if they are part of a right-handed road

Where has this been tested?

  • Platform(s): Ubuntu 20.04
  • Python version(s): 3.8
  • Unreal Engine version(s): CARLA's

Possible Drawbacks

Theoretically none as this is an addition, but some RHT code has changed to accommodate for LHT.


This change is Reviewable

@glopezdiest glopezdiest requested a review from a team as a code owner May 30, 2025 13:57
@update-docs
Copy link
Copy Markdown

update-docs bot commented May 30, 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 merged commit 77894ab into ue4-dev May 31, 2025
glopezdiest added a commit that referenced this pull request Jun 2, 2025
* Swapped all the lane sign logic

* Fixed bug with lane sections + added debug

* Added LHT support for the map

* Added TM LHT support

* Changed to keep_slow_lane_percentage

* Added missing file

* Added TM docs

* Added RHT and LHT traffic lights

* Aded LHT logic to signal displacement

* Added is_rht docs

* Updating the RHT rule to send a warning for unexpected rules

* Added LHT docs

* Fixed issue with rule type

* Fixed bug with multisection lanes

---------

Co-authored-by: glopezdiest <glopez@cvc.uab.cat>
Blyron pushed a commit that referenced this pull request Jun 2, 2025
* Added Left Hand Traffic support (#8951)

* Swapped all the lane sign logic

* Fixed bug with lane sections + added debug

* Added LHT support for the map

* Added TM LHT support

* Changed to keep_slow_lane_percentage

* Added missing file

* Added TM docs

* Added RHT and LHT traffic lights

* Aded LHT logic to signal displacement

* Added is_rht docs

* Updating the RHT rule to send a warning for unexpected rules

* Added LHT docs

* Fixed issue with rule type

* Fixed bug with multisection lanes

---------

Co-authored-by: glopezdiest <glopez@cvc.uab.cat>

* Fixed UE5 changes

---------

Co-authored-by: glopezdiest <glopez@cvc.uab.cat>
Blyron added a commit that referenced this pull request Jun 13, 2025
* Fix map names in smoke tests (#8945)

* Fix typo (#8941)

* Added Left Hand Traffic support (#8951)

* Swapped all the lane sign logic

* Fixed bug with lane sections + added debug

* Added LHT support for the map

* Added TM LHT support

* Changed to keep_slow_lane_percentage

* Added missing file

* Added TM docs

* Added RHT and LHT traffic lights

* Aded LHT logic to signal displacement

* Added is_rht docs

* Updating the RHT rule to send a warning for unexpected rules

* Added LHT docs

* Fixed issue with rule type

* Fixed bug with multisection lanes

---------

Co-authored-by: glopezdiest <glopez@cvc.uab.cat>

* avoid car aliasing due to a bad car reutilisation (#8960)

Co-authored-by: Ruben Abad <rabad@cvc.uab.es>

* CI/CD Updates (#8972)

* Ensure xerces, sqlite and proj libraries are copied correctly on first build

* Windows: Update boost to 1.84.0

* Ubuntu: Update boost to 1.84.0

* Extend build python api to manylinux_2_31

* Update examples compiler to gcc9

* Updated content version

* Updated deploy script to add a summary output with the package uri

* Do not overwrite output summary output

* Updated release dockerfile to Ubuntu 20.04

---------

Co-authored-by: Joel Moriana <joel@aerosim.org>

* Added additional width to roads (#8975)

Co-authored-by: glopezdiest <glopez@cvc.uab.cat>

---------

Co-authored-by: joel-mb <joel.moriana@gmail.com>
Co-authored-by: 王海东 <wanghaidong@hutb.edu.cn>
Co-authored-by: glopezdiest <58212725+glopezdiest@users.noreply.github.com>
Co-authored-by: glopezdiest <glopez@cvc.uab.cat>
Co-authored-by: rubenabad <77672233+rubenabad@users.noreply.github.com>
Co-authored-by: Ruben Abad <rabad@cvc.uab.es>
Co-authored-by: Joel Moriana <joel@aerosim.org>
@glopezdiest glopezdiest deleted the left_hand_traffic_support branch June 19, 2025 11:24
@utkuoguzman
Copy link
Copy Markdown

Is this in a new 20GB content download? because I pulled Carla code now and it gives errors about not finding these 2 BPs in my content folder.

Blyron added a commit that referenced this pull request Jul 16, 2025
* Fix map names in smoke tests (#8945)

* Fix typo (#8941)

* Added Left Hand Traffic support (#8951)

* Swapped all the lane sign logic

* Fixed bug with lane sections + added debug

* Added LHT support for the map

* Added TM LHT support

* Changed to keep_slow_lane_percentage

* Added missing file

* Added TM docs

* Added RHT and LHT traffic lights

* Aded LHT logic to signal displacement

* Added is_rht docs

* Updating the RHT rule to send a warning for unexpected rules

* Added LHT docs

* Fixed issue with rule type

* Fixed bug with multisection lanes

---------

Co-authored-by: glopezdiest <glopez@cvc.uab.cat>

* avoid car aliasing due to a bad car reutilisation (#8960)

Co-authored-by: Ruben Abad <rabad@cvc.uab.es>

* CI/CD Updates (#8972)

* Ensure xerces, sqlite and proj libraries are copied correctly on first build

* Windows: Update boost to 1.84.0

* Ubuntu: Update boost to 1.84.0

* Extend build python api to manylinux_2_31

* Update examples compiler to gcc9

* Updated content version

* Updated deploy script to add a summary output with the package uri

* Do not overwrite output summary output

* Updated release dockerfile to Ubuntu 20.04

---------

Co-authored-by: Joel Moriana <joel@aerosim.org>

* Added additional width to roads (#8975)

Co-authored-by: glopezdiest <glopez@cvc.uab.cat>

* CARLA CI/CD Github Actions (#8973)

* Added first iteration CI/CD

* Fixed deploy summary output

* Disable windows workflow

* Allow manual dispatch for workflows (#8977)

* CI/CD Ubuntu Improvements (#8984)

* Added first iteration content workflow

* Added reusable workflow

* Use a specific map for c++ client example

* Fix workflows when triggered from external forks (#8987)

* Fixed `frame`, `timestamp` and `transform` of `SensorData` not matching to the actually sent image for camera sensors.

* First iteration Windows CI/CD

* Fix type aws secret

* [Feature] CARLA DevContainer & Docker Improvements – Ubuntu 22.04 (#8620)

* Update semantic labels (changed from version 0.9.13 -> 0.9.14)

* Add "Other" Label description in ref_sensors.md

* Revert "Add "Other" Label description in ref_sensors.md"

This reverts commit 3958e35.

* Revert "Update semantic labels (changed from version 0.9.13 -> 0.9.14)"

This reverts commit 6ee572e.

* Update Master URLS

* Update tuto_A_add_vehicle.md removed euw

* Update README.md

* Update README.md

* updated master README (#7204)

* ci: ignore pytho venv and build dir

* ci: docker integration for ubuntu22 devcontainer

* fix: comment out corrupted link (empty file)

* feat: support for GUI inside container

* feat: GUI container support, UE4 install

* feat: force carla scripts to use python3

* feat: monolitic carla image

* fix : delete temporary file

* feat: run carla in container with UE4 mounted from host

* feat: add support for mounted and on image ue4

* feat: move dockerfiles to follow carla conventions

* docs: rename ubuntu18 based dockerfile to CarlaLegacy to avoid confusion

* fix: use curl instead of wget for FBX SDK download

Updated the script to use curl instead of wget for downloading the FBX SDK, as the Autodesk server rejects wget requests with HTTP 403 errors. Added a Mozilla/5.0 user-agent to mimic browser behavior and ensure compatibility. This change resolves download issues and maintains the existing unpacking and build process.

* docs: remove docker reference at main README

* fix: explicitly pass the library paths

If you must use Unreal's Clang, explicitly pass the library paths (/usr/lib/x86_64-linux-gnu) to the linker. This ensures the linker can find libpthread.so.0, libicuuc.so.70, and liblzma.so.5.

* fix: remove progress=plain, it doesn't help with truncated output

* fix: workspace conflict for different images

* chores: clean-up dockerfiles

* fix: build requires recommended packages

* fix: rename workdir to match VS Code default mount dir name for devcontainers

* feat: add shortcut for --monolith argument

* docs: create documentation for devcontainer usage

* chore: cleanup devcontainer file

* fix: add unzip, missing after merge ue4-dev

* chore: remove unecessary file ignore

* chore: include back shipping targets

* fix: refence to default branch not custon branch

* fix: add unzip for devcontiner, missing dependency for make package

* Update CHANGELOG.md

* feat: improve readability, remove devcontainer.json and clean and update documentation (#4)

Fixes an issue where containers would start in the right directory instead of the expected /workspaces/<REPO_NAME>. This would case trouble when launching from devcontainer.json

---------

Co-authored-by: Gerhard Dorn <67096719+dorn-gerhard@users.noreply.github.com>
Co-authored-by: Blyron <53337103+Blyron@users.noreply.github.com>
Co-authored-by: Aaron <samaniegoaaron112@gmail.com>
Co-authored-by: MattRoweEAIF <125647690+MattRoweEAIF@users.noreply.github.com>

* Renamed workflows to include unreal engine version

* Removed jenkins file

* Fix type

* [CI/CD] UE4 Release workflow (#9020)

* Get release version from branch name

* Fixed get git repository version

* Added release workflow

* Fix test client for release workflow

* Fix version deploy windows version

---------

Co-authored-by: Joel Moriana <joel@aerosim.org>

* The LABEL_COLORS have been updated. (#8926)

* ue4-dev fix the --monolith flag for run_container.sh script (#9009)

* Create carla-ue4-monolith.sh

* Rename carla-ue4-monolith.sh to carla-ue4-monolith.dockerfile

* updated repository to clone to official carla repository

* Add the SimReady Converter Plugins from commit 44d61420

* Ignore whitespace when applying the material patches, update CHANGELOG and README

* Avoid modifying config files, these settings are unnecessary

* Add --no-simready flag to BuildCarlaUE4.bat|sh to disable the plugin

* Add some quick documentation for material conversion and the export commandlet

* Update build_linux.md

1. Updated the Unreal Engine cloning with Oauth2 with github personal access token. 

2. Using `make -j<N>` causes the build to fail, added a warning about it.

* Add NVIDIA Neural Reconstruction Engine (NuRec) integration

Integrate NVIDIA Neural Reconstruction API with CARLA to use
pre-trained neural reconstructions from NVIDIA for high-fidelity
camera simulation. This allows developers to load reconstructed
real-world scenes and render camera data from them.

Key components:
- NuRec gRPC API integration for data exchange with NuRec container
- Installer script for setup with curated datasets
- Support for NVIDIA Physical AI Dataset for Autonomous Vehicles
- Three example replay scripts:
  * Multi-camera replay with Pygame visualization
  * Custom camera parameter configuration
  * Image capture and export functionality
- Documentation with setup and usage instructions

This integration enables developers to simulate camera sensors in
realistic environments using NVIDIA's pre-trained neural scene
reconstructions for autonomous driving system testing.

* Execute only python api unit tests

* Updated NuRec image path to public location (#9048)

---------

Co-authored-by: joel-mb <joel.moriana@gmail.com>
Co-authored-by: 王海东 <wanghaidong@hutb.edu.cn>
Co-authored-by: glopezdiest <58212725+glopezdiest@users.noreply.github.com>
Co-authored-by: glopezdiest <glopez@cvc.uab.cat>
Co-authored-by: rubenabad <77672233+rubenabad@users.noreply.github.com>
Co-authored-by: Ruben Abad <rabad@cvc.uab.es>
Co-authored-by: Joel Moriana <joel@aerosim.org>
Co-authored-by: Thies de Graaff <thiesdegraaff@gmail.com>
Co-authored-by: Julio Castillo <julio.a.castillo.c@gmail.com>
Co-authored-by: Gerhard Dorn <67096719+dorn-gerhard@users.noreply.github.com>
Co-authored-by: MattRoweEAIF <125647690+MattRoweEAIF@users.noreply.github.com>
Co-authored-by: donghaiwang <whd@hutb.edu.cn>
Co-authored-by: Minhaj Ahmad <69266728+minhaj6@users.noreply.github.com>
Co-authored-by: 0graph <50416380+0graph@users.noreply.github.com>
Co-authored-by: Lou Rohan <lrohan@nvidia.com>
Co-authored-by: Max Apodaca <mapodaca@nvidia.com>
Blyron added a commit that referenced this pull request Jul 17, 2025
* Fix map names in smoke tests (#8945)

* Fix typo (#8941)

* Added Left Hand Traffic support (#8951)

* Swapped all the lane sign logic

* Fixed bug with lane sections + added debug

* Added LHT support for the map

* Added TM LHT support

* Changed to keep_slow_lane_percentage

* Added missing file

* Added TM docs

* Added RHT and LHT traffic lights

* Aded LHT logic to signal displacement

* Added is_rht docs

* Updating the RHT rule to send a warning for unexpected rules

* Added LHT docs

* Fixed issue with rule type

* Fixed bug with multisection lanes

---------

Co-authored-by: glopezdiest <glopez@cvc.uab.cat>

* avoid car aliasing due to a bad car reutilisation (#8960)

Co-authored-by: Ruben Abad <rabad@cvc.uab.es>

* CI/CD Updates (#8972)

* Ensure xerces, sqlite and proj libraries are copied correctly on first build

* Windows: Update boost to 1.84.0

* Ubuntu: Update boost to 1.84.0

* Extend build python api to manylinux_2_31

* Update examples compiler to gcc9

* Updated content version

* Updated deploy script to add a summary output with the package uri

* Do not overwrite output summary output

* Updated release dockerfile to Ubuntu 20.04

---------

Co-authored-by: Joel Moriana <joel@aerosim.org>

* Added additional width to roads (#8975)

Co-authored-by: glopezdiest <glopez@cvc.uab.cat>

* CARLA CI/CD Github Actions (#8973)

* Added first iteration CI/CD

* Fixed deploy summary output

* Disable windows workflow

* Allow manual dispatch for workflows (#8977)

* CI/CD Ubuntu Improvements (#8984)

* Added first iteration content workflow

* Added reusable workflow

* Use a specific map for c++ client example

* Fix workflows when triggered from external forks (#8987)

* Fixed `frame`, `timestamp` and `transform` of `SensorData` not matching to the actually sent image for camera sensors.

* First iteration Windows CI/CD

* Fix type aws secret

* [Feature] CARLA DevContainer & Docker Improvements – Ubuntu 22.04 (#8620)

* Update semantic labels (changed from version 0.9.13 -> 0.9.14)

* Add "Other" Label description in ref_sensors.md

* Revert "Add "Other" Label description in ref_sensors.md"

This reverts commit 3958e35.

* Revert "Update semantic labels (changed from version 0.9.13 -> 0.9.14)"

This reverts commit 6ee572e.

* Update Master URLS

* Update tuto_A_add_vehicle.md removed euw

* Update README.md

* Update README.md

* updated master README (#7204)

* ci: ignore pytho venv and build dir

* ci: docker integration for ubuntu22 devcontainer

* fix: comment out corrupted link (empty file)

* feat: support for GUI inside container

* feat: GUI container support, UE4 install

* feat: force carla scripts to use python3

* feat: monolitic carla image

* fix : delete temporary file

* feat: run carla in container with UE4 mounted from host

* feat: add support for mounted and on image ue4

* feat: move dockerfiles to follow carla conventions

* docs: rename ubuntu18 based dockerfile to CarlaLegacy to avoid confusion

* fix: use curl instead of wget for FBX SDK download

Updated the script to use curl instead of wget for downloading the FBX SDK, as the Autodesk server rejects wget requests with HTTP 403 errors. Added a Mozilla/5.0 user-agent to mimic browser behavior and ensure compatibility. This change resolves download issues and maintains the existing unpacking and build process.

* docs: remove docker reference at main README

* fix: explicitly pass the library paths

If you must use Unreal's Clang, explicitly pass the library paths (/usr/lib/x86_64-linux-gnu) to the linker. This ensures the linker can find libpthread.so.0, libicuuc.so.70, and liblzma.so.5.

* fix: remove progress=plain, it doesn't help with truncated output

* fix: workspace conflict for different images

* chores: clean-up dockerfiles

* fix: build requires recommended packages

* fix: rename workdir to match VS Code default mount dir name for devcontainers

* feat: add shortcut for --monolith argument

* docs: create documentation for devcontainer usage

* chore: cleanup devcontainer file

* fix: add unzip, missing after merge ue4-dev

* chore: remove unecessary file ignore

* chore: include back shipping targets

* fix: refence to default branch not custon branch

* fix: add unzip for devcontiner, missing dependency for make package

* Update CHANGELOG.md

* feat: improve readability, remove devcontainer.json and clean and update documentation (#4)

Fixes an issue where containers would start in the right directory instead of the expected /workspaces/<REPO_NAME>. This would case trouble when launching from devcontainer.json

---------

Co-authored-by: Gerhard Dorn <67096719+dorn-gerhard@users.noreply.github.com>
Co-authored-by: Blyron <53337103+Blyron@users.noreply.github.com>
Co-authored-by: Aaron <samaniegoaaron112@gmail.com>
Co-authored-by: MattRoweEAIF <125647690+MattRoweEAIF@users.noreply.github.com>

* Renamed workflows to include unreal engine version

* Removed jenkins file

* Fix type

* [CI/CD] UE4 Release workflow (#9020)

* Get release version from branch name

* Fixed get git repository version

* Added release workflow

* Fix test client for release workflow

* Fix version deploy windows version

---------

Co-authored-by: Joel Moriana <joel@aerosim.org>

* The LABEL_COLORS have been updated. (#8926)

* ue4-dev fix the --monolith flag for run_container.sh script (#9009)

* Create carla-ue4-monolith.sh

* Rename carla-ue4-monolith.sh to carla-ue4-monolith.dockerfile

* updated repository to clone to official carla repository

* Add the SimReady Converter Plugins from commit 44d61420

* Ignore whitespace when applying the material patches, update CHANGELOG and README

* Avoid modifying config files, these settings are unnecessary

* Add --no-simready flag to BuildCarlaUE4.bat|sh to disable the plugin

* Add some quick documentation for material conversion and the export commandlet

* Update build_linux.md

1. Updated the Unreal Engine cloning with Oauth2 with github personal access token. 

2. Using `make -j<N>` causes the build to fail, added a warning about it.

* Add NVIDIA Neural Reconstruction Engine (NuRec) integration

Integrate NVIDIA Neural Reconstruction API with CARLA to use
pre-trained neural reconstructions from NVIDIA for high-fidelity
camera simulation. This allows developers to load reconstructed
real-world scenes and render camera data from them.

Key components:
- NuRec gRPC API integration for data exchange with NuRec container
- Installer script for setup with curated datasets
- Support for NVIDIA Physical AI Dataset for Autonomous Vehicles
- Three example replay scripts:
  * Multi-camera replay with Pygame visualization
  * Custom camera parameter configuration
  * Image capture and export functionality
- Documentation with setup and usage instructions

This integration enables developers to simulate camera sensors in
realistic environments using NVIDIA's pre-trained neural scene
reconstructions for autonomous driving system testing.

* Execute only python api unit tests

* Updated NuRec image path to public location (#9048)

* Fixed some NuRec docs paths and added folder to package (#9050)

* Fixed Docs paths and added folder to package

* Moved line

* Added Windows folder

---------

Co-authored-by: glopezdiest <glopez@cvc.uab.cat>

---------

Co-authored-by: joel-mb <joel.moriana@gmail.com>
Co-authored-by: 王海东 <wanghaidong@hutb.edu.cn>
Co-authored-by: glopezdiest <58212725+glopezdiest@users.noreply.github.com>
Co-authored-by: glopezdiest <glopez@cvc.uab.cat>
Co-authored-by: rubenabad <77672233+rubenabad@users.noreply.github.com>
Co-authored-by: Ruben Abad <rabad@cvc.uab.es>
Co-authored-by: Joel Moriana <joel@aerosim.org>
Co-authored-by: Thies de Graaff <thiesdegraaff@gmail.com>
Co-authored-by: Julio Castillo <julio.a.castillo.c@gmail.com>
Co-authored-by: Gerhard Dorn <67096719+dorn-gerhard@users.noreply.github.com>
Co-authored-by: MattRoweEAIF <125647690+MattRoweEAIF@users.noreply.github.com>
Co-authored-by: donghaiwang <whd@hutb.edu.cn>
Co-authored-by: Minhaj Ahmad <69266728+minhaj6@users.noreply.github.com>
Co-authored-by: 0graph <50416380+0graph@users.noreply.github.com>
Co-authored-by: Lou Rohan <lrohan@nvidia.com>
Co-authored-by: Max Apodaca <mapodaca@nvidia.com>
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.

3 participants