Skip to content

Conversation

rbellerobotics
Copy link

@rbellerobotics rbellerobotics commented May 24, 2025

Description

This merge requires updates the build pipeline to function on Windows when ROS2 is enabled. The build script has been updated to account for different types of VS code as wel.

Where has this been tested?

This is known to work on Windows 11 with the most recent SDK. This was also verified on Linux.

This has not tested spawning a vehicle and sensors, as well as ensuring their outputs are correct. It only went as far as hitting play in the editor and verifying the clock outputs time with ros2 topic echo /clock in WSL.

Possible Drawbacks

Windows 10 SDKs not tested. Sensors and vehicles not tested.


This change is Reviewable

rbellerobotics and others added 18 commits April 15, 2025 09:06
switch back to older fast dds

fastdds building on windows

Defaulting the ros2 to be on

Moved copy to a later part of the build

fixed error with copy, still requires running twice

Build copies on first try fix

Fixed pathing for Windows deps in build cs

TEST: STATIC

Update to static paths

Added functionality to load maps from anywhere across different content folders, project or plugin (carla-simulator#8862)

Changed the name and place of assets referenced in those BP and DT (carla-simulator#8864)

Add functionality to subdivide meshes in chunks (carla-simulator#8875)

Remove UE5_BUILD_README.md (carla-simulator#8876)

Aaron/ue5/addmaterialstosplittedmeshes (carla-simulator#8883)

* Add functionality to subdivide meshes in chunks

* Add Materials to splitted meshes

Got build to the 3000 package build

able to launch system

Cleaned up windows build

Switch arg name to link correctly on windows
…rpaTriageChallenge/carla into Neya/rbelle/windows-native-ros2-build
@rbellerobotics rbellerobotics requested a review from a team as a code owner May 24, 2025 17:59
Copy link

update-docs bot commented May 24, 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.

@@ -53,7 +53,7 @@ carla_option (
carla_option (
ENABLE_ROS2
"Enable ROS2."
OFF
ON
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I defaulted ROS2 to be on. I wasn't sure if getting Windows and Linux both working was enough to consider it a solid default.

set (
CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES
${UE_INCLUDE} ${UE_INCLUDE}/c++/v1
)
Copy link
Author

@rbellerobotics rbellerobotics May 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only changes in this file is just an added indent. Windows did not actually need anything specific in the toolchain. The only thing it would need is OpenSSL if we want to enable security options in FastDDS. I got it linking to the windows OpenSSL in Unreal once but had issues on the new computer so I disabled security with FastDDS.

@@ -2,7 +2,8 @@
setlocal EnableDelayedExpansion

set skip_prerequisites=false
set launch=false
set skip_prebuild=false
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added because Windows takes a while to do the prebuild steps.

@@ -94,7 +94,7 @@ void ROS2::SetFrame(uint64_t frame) {
if (_controller->HasNewMessage()) {
auto it = _actor_callbacks.find(actor);
if (it != _actor_callbacks.end()) {
VehicleControl control = _controller->GetMessage();
VehicleControl control = _controller->GetCarlaMessage();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was because Windows kept failing to compile this and would return an error where it said "GetMessageA()" couldn't be found. Changing the name worked so my best guess is that there is some other GetMessage function that interfered with it. Could be wrong on that one though.

@rbellerobotics
Copy link
Author

Just saw this other branch. Some of the changes @MarcelPiNacy-CVC did here may be optimal when compared to how I did things: ue5-dev...marcel/ros2-windows-tests

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.

1 participant