Giter Site home page Giter Site logo

unreal_airsim's Introduction

unreal_airsim

This repo contains simulation tools and utilities to perform realistic simulations base on Unreal Engine (UE4), using microsoft AirSim as interface to UE4.

preview

Table of Contents

Getting started:

Documentation:

Installation

The following 3 components are necessary to utilize the full stack of unreal_airsim tools.

Unreal Engine

Install Unreal Engine. This repository was developped and tested on UE 4.25, which is the recommended version. To install UE4 on linux, you need to register with Epic Games and build it from source. Please follow the detailed instructions on their website to set everything up. If you plan to use only pre-compiled binaries as simulation worlds, this section can be omitted,

Airsim

Install our fork of AirSim, the UE4 Plugin:

export AIRSIM_PATH=</absolute/path/where/to/install> # Set the target destination.
cd $AIRSIM_PATH
git clone [email protected]:ethz-asl/AirSim.git
cd Airsim
./setup.sh 
./build.sh

unreal_airsim

Install unreal_airsim, containing the simulation ROS-package and tools.

  • If you haven't already installed ROS, please install it according to their instructions. This repo was developed on a desktop-full version of ROS melodic.

  • System dependencies:

    sudo apt-get install python-wstool python-catkin-tools ros-melodic-cmake-modules
  • If you haven't already set up a caktin worskpace:

    mkdir -p ~/catkin_ws/src
    cd ~/catkin_ws
    catkin init
    catkin config --extend /opt/ros/melodic
    catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
    catkin config --merge-devel
  • Install via SSH:

    cd ~/catkin_ws/src
    git clone [email protected]:ethz-asl/unreal_airsim.git
    wstool init . ./unreal_airsim/unreal_airsim_ssh.rosinstall
    wstool update
  • Tell unreal_airsim where you installed AirSim by running:

    cd ~/catkin_ws/src/unreal_airsim
    echo "set(AIRSIM_ROOT $AIRSIM_PATH)" > ./AirsimPath.txt

    In case you didn't set $AIRSIM_PATH before, don't forget to replace the above $AIRSIM_PATH with the absolute path to the lcoation where AirSim is installed.

  • Build:

    catkin build unreal_airsim
    source ../devel/setup.bash

Contributing

If you are adding features to this repo please consider opening back a PR, so others can use it as well. If you consider contributing, please adhere to the google style guide and setup our linter:

# Download the linter
cd <linter_dest>
git clone [email protected]:ethz-asl/linter.git  # SSH
git clone https://github.com/ethz-asl/linter.git  # HTTPS

# install the linter
cd linter
echo ". $(realpath setup_linter.sh)" >> ~/.bashrc  # Or the matching file for
                                                   # your shell.
bash

# Register this repo for the linter
roscd unreal_airsim
init_linter_git_hooks

Examples

This demo briefly walks through the steps on how to use the online_simulator. The simulation is setup from a single configuration file, a minimal example is given in cfg/demo.yaml. The settings required for AirSim to produce the requested simulation must first be generated by running

roslaunch unreal_airsim parse_config_to_airsim.launch 

It is strongly recommended to produce AirSim's Settings.json using this script and not changing it manually. Additional AirSim Settings can be set in the yaml-config using CamelCase params with identical names.

In this demo, start the Blocks environment provided by AirSim, and run the game in the UE4 Editor (select 'Active Play Mode' = 'Selected Viewport', then 'Play'). Then run

roslaunch unreal_airsim demo.launch 

to start the simulation and display the sensor readings in RVIZ.

u_airsim_4

External view of the UE4 game (left), camera image (center) and lidar readings (right) obtained from the simulator.

Troubleshooting

Installation

  • Include error 'xlocale.h" not found:

    xlocale was removed/renamed from glibc somewhen, can fix via symlink:

     ln -s /usr/include/locale.h /usr/include/xlocale.h

Running Unreal Engine

  • The UE Editor freezes when 'Compiling Shaders':

    According to this thread this may happen when using Vulcan with less than 2GB of graphics card memory. Can be adjusted by switching back to OpenGL (uncomment TargetedRHIs=GLSL_430 in Engine/Config/BaseEngine.ini).

Starting the simulation

  • Error at startup: bind(): address already in use:

    Airsim connects to UE4 via a TCP port. If multiple instances of Airsim (i.e. the unreal game) are running, the selected port will already be taken. Note that the editor itself already loads the Airsim plugin, thus closing all instances of UE4 (editor or game) and starting a single game/editor usually fixes this.

unreal_airsim's People

Contributors

renezurbruegg avatar schmluk avatar victorreijgwart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unreal_airsim's Issues

What are the core differences with respect to airsim_ros_pkgs?

Hi, thanks for providing your version of Airsim for ROS.

I just found this repo and was wondering: what are the improvements or modifications that you made on the original code? I think it would be useful to add a small note for people to consider using this code instead :)

REQUIRED process [config_parser-2] has died!

Dear Schmluk,
When i roslaunch unreal_airsim parse_config_to_airsim.launch. the REQUIRED process [config_parser-2] has died!
i see you say "The shutdown after the config parsing is expected, once the parsing finishes successfully the node exits and the launch file terminates (since the parser is required)." AS a chinese beginner,I don't know or realize what is parser.could you tell me where can download the parser or other way to solve this problem,thank you very much!

REQUIRED process [config_parser-2] has died!

i install UE4.24.3 and Airsim(you give)

when I run
roslaunch unreal_airsim parse_config_to_airsim.launch
shows

... logging to /home/sharine/.ros/log/88ee30f4-ad96-11eb-be6c-00d861bc2028/roslaunch-sharine-MS-7B98-2848.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://sharine-MS-7B98:46001/

SUMMARY

PARAMETERS

  • /config_parser/config_file_path: /home/sharine/cod...
  • /config_parser/target_file_path:
  • /rosdistro: melodic
  • /rosversion: 1.14.10

NODES
/
config_parser (unreal_airsim/parse_config_to_airsim.py)

auto-starting new master
process[master]: started with pid [2873]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 88ee30f4-ad96-11eb-be6c-00d861bc2028
process[rosout-1]: started with pid [2899]
started core service [/rosout]
process[config_parser-2]: started with pid [2902]
/home/sharine/Documents/AirSim/settings.json
[INFO] [1620214763.449762]:


  • Starting config parser for unreal_airsim to AirSim config conversion *

[INFO] [1620214763.459512]: Read source: '/home/sharine/code/unreal_airsim_ws/src/unreal_airsim/cfg/demo.yaml'
[INFO] [1620214763.463535]: Existing file '/home/sharine/Documents/AirSim/settings.json' was auto-generated and will be overwritten.
[INFO] [1620214763.466049]: Found camera 'Seg_cam'.
[INFO] [1620214763.469445]: Found imu 'Imu'.
[INFO] [1620214763.472197]: Found camera 'Scene_cam'.
[INFO] [1620214763.475673]: Found camera 'Depth_cam'.
[INFO] [1620214763.478462]: Found lidar 'Lidar'.
[INFO] [1620214763.482812]: Using vehicle name 'airsim_drone'.
[INFO] [1620214763.485061]: Wrote config to target file '/home/sharine/Documents/AirSim/settings.json'.
[INFO] [1620214763.486599]:


  • Settings parsing finished successfully (0 Warnings, 0 Errors)! *

REQUIRED process [config_parser-2] has died!
process has finished cleanly
log file: /home/sharine/.ros/log/88ee30f4-ad96-11eb-be6c-00d861bc2028/config_parser-2*.log
Initiating shutdown!

[config_parser-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

and UnrealEigene windows shows:
[2021.05.05-11.44.36:138][790]LogPlayLevel: Error: RunUAT ERROR: AutomationTool was unable to run successfully.

[2021.05.05-11.44.36:138][790]PackagingResults: Error: 启动失败! Unknown Error

LowLevelFatalError about Vulkan

Error details:

4.24.3-0+++UE4+Release-4.24 518 0
Disabling core dumps.

LowLevelFatalError [File:Unknown] [Line: 772]

VulkanRHI::vkQueueSubmit(Queue, 1, &SubmitInfo, Fence->GetHandle()) failed, VkResult=-4
at /home/xxxx/UnrealEngine_4.24/Engine/Source/Runtime/VulkanRHI/Private/VulkanQueue.cpp:71
with error VK_ERROR_DEVICE_LOST

Signal 11 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554
CommonUnixCrashHandler: Signal=11
Malloc Size=65535 LargeMemoryPoolOffset=131119
Malloc Size=124960 LargeMemoryPoolOffset=256096
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.