-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Working Windows ROS2 Native Build #8937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ue5-dev
Are you sure you want to change the base?
Working Windows ROS2 Native Build #8937
Conversation
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
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 |
There was a problem hiding this comment.
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 | ||
) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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.
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 |
…rpaTriageChallenge/carla into Neya/rbelle/windows-native-ros2-build
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