This build of the plugin is based on ROS2 Foxy and has been tested on Ubuntu 20.
This branch currently represents the release branch.
Experimental and WIP
- clone this repository in your project Plugin folder
- create and use the following shell script to run the UE4 editor (substituting
PROJECT_PATH
,PROJECT_NAME
andUNREAL_ENGINE_REPO
for the appropriate strings):
#!/bin/sh
export LD_LIBRARY_PATH=\
"${PWD}/Plugins/rclUE/Source/ThirdParty/ros2lib":\
"${PWD}/Plugins/rclUE/Source/ThirdParty/ros2lib/std_msgs/lib":\
"${PWD}/Plugins/rclUE/Source/ThirdParty/ros2lib/geometry_msgs/lib":\
"${PWD}/Plugins/rclUE/Source/ThirdParty/ros2lib/sensor_msgs/lib":\
"${PWD}/Plugins/rclUE/Source/ThirdParty/ros2lib/rosgraph_msgs/lib":\
"${PWD}/Plugins/rclUE/Source/ThirdParty/ros2lib/builtin_interfaces/lib":\
"${PWD}/Plugins/rclUE/Source/ThirdParty/ros2lib/ue4_interfaces/lib"
EDITOR_COMMAND="UNREAL_ENGINE_REPO/Engine/Binaries/Linux/UE4Editor"
(exec "$EDITOR_COMMAND" "PROJECT_PATH/PROJECT_NAME.uproject")
- For messages not in std_msgs, the appropriate library path needs to be added to LD_LIBRARY_PATH
- within the Unreal Editor: Edit->Plugins, search and enable for
rclc
- change the world settings to use meters as units instead of the default centimeters
- Example_BP_PubSub.mp4 shows how to build a PubSub example using Blueprint
Development switched from Ubuntu18+noetic to Ubuntu20+foxy - please refer to the Ubuntu 20 and adapt it
- rcl
- rcl_action
- rcl_interfaces
- rcl_lifecycle
- rcl_yaml_param_parser
- rclc
- rclc_lifecycle
- rcutils
- rmw
- tracetools
- rosidl_adapter
- rosidl_cmake
- rosidl_generator_c
- rosidl_parser
- rosidl_typesupport_c
- rosidl_typesupport_interface
- rosidl_typesupport_introspection_c
- rosidl_runtime_c (Ubuntu 20/Foxy)
- rosgraph_msgs
- std_msgs
- ue4_interfaces (contains an example of custom interface)
Currently, the plugin requires the following shared libraries at runtime:
- libfastcdr.so
- libfastcdr.so.1
- libfastrtps.so.1 (Ubuntu 18/Eloquent)
- libfastrtps.so.2 (Ubuntu 20/Foxy)
- librcl_logging_spdlog.so
- librmw_fastrtps_cpp.so
- librmw_fastrtps_shared_cpp.so
- librmw_implementation.so
- librosidl_typesupport_cpp.so (Ubuntu 20/Foxy)
- librosidl_typesupport_fastrtps_cpp.so
- librosidl_typesupport_fastrtps_c.so
- librcpputils.so (Ubuntu 20/Foxy)
- librmw_dds_common.so (Ubuntu 20/Foxy)
- librmw_dds_common__rosidl_typesupport_cpp.so (Ubuntu 20/Foxy)
- librmw_dds_common__rosidl_typesupport_fastrtps_cpp.so (Ubuntu 20/Foxy)
The plugin folder contains a video "Example_BP_PubSub.mp4" demonstrating how to setup a PubSub example in Blueprint.
An example setup for Turtlebot3 using this plugin can be found at https://github.com/rapyuta-robotics/turtlebot3-UE
- rcl and void* types cannot be managed by UE4 (no UPROPERTY) and therefore can't be used directly in Blueprint. Whenever access to these variables is needed, the user should write a class to wrap it and all of their handling must be done in C++.
- some basic numerical types are not natively supported in Blueprint (e.g. double, unsigned int). In order to use these, a workaround is needed (a plugin implementing those types for BP, a modified UE4 or a custom implementation).
- In autogenerated messages, the method MsgToString() should be implemented by the user as its current purpose is to help debugging.