This is an old revision of the document!
Using Cram in Unreal Engine
Description: In this tutorial you will learn..
Requirements:
- Unreal Engine version 2.25.4/2.26/2.27.
- Unreal requires a lot of disc space, at least 60 GB for the engine itself, and with several projects even more.
- Making the Unreal engine takes a lot of computation time. Schedule it adequately.
- Either:
- Check the installation of Unreal by launching the engine under <unreal-path>/Engine/Binaries/Linux/UE4Editor. Since it requires OpenGL or Vulkan, running it from a remote machine can get finicky.
- Or use Rider for Unreal Engine
- Clone the Demo Project:
git clone --recurse-submodules git@github.com:urobosim/DemoProject.git
- For further information how to Setup the Demo Project please take a look into this README.
Setup
To communicate with the robot in the Unreal Engine from host-machine additional components are required, including the host-side rosbridge, shared ROS messages and descriptions. First, install the following packages for communication via WebSockets, the TF2 buffer, kinematic models and a state publisher.
sudo apt install ros-melodic-rosbridge-server ros-melodic-robot-state-publisher ros-melodic-joint-state-publisher-gui ros-melodic-tf ros-melodic-tf2 ros-melodic-tf2-ros ros-melodic-pr2-arm-kinematics
Further software stacks are needed to control the robot in Unreal via CRAM plans and Giskards motion planner, as well as perception and knowledge inference and logging.
Follow the installation instructions for each of the following software stacks, picking the ones required for your specific purpose. Using separate, overlayed workspaces is recommended.
- Install Giskard, the motion planner.
- Install Knowrob, the long-term memory, especially for NEEMs
- Install CRAM, the noetic branch, please follow the Github-ReadMe.
Now create a catkin workspace for deps from repositories. Use wstool for git imports and rosdep for apt sources.
mkdir -p ~/unreal_project_ws/src cd ~/unreal_project_ws/src wstool init wstool merge https://raw.githubusercontent.com/urobosim/DemoProject/master/rosinstall/unreal_demo_project.rosinstall wstool up rosdep update rosdep install --from-paths --ignore-src . -r
Build the workspace either with the ros-native catkin or with python-catkin-tools, which can be added via apt.
cd ~/unreal_project_ws catkin_make # or 'catkin build' source ~/unreal_project_ws/devel/setup.bash # rather put the top-level workspace in your .bashrc
If the build process wasn't successful, install the missing packages via apt, find missing repositories in the code-iai GitHub group or ask the contributors for help.