Giter Club home page Giter Club logo

airsim_samplecubeclient's Introduction

Capture panorama images by AirSim

I have made a modified version of AirSim so that we could capture panorama RGB images and depth images.

This repo has the sample code for testing the modified AirSim.

Please see my blog on how I implement the modifications.

rgb

depth

Note for "depth" v.s. "distance"

By default, the modified AirSim generates "depth" panorama images. Since "depth" is defined by referencing the individual faces of the rendered cube, the pixels in the depth panorama image will have different reference directions according to the pixel coordinates. If you need "distance" instead of "depth", you have to convert the rendered depth panorama into the distance version. I have provided a sample script to do just that and the run.py script already utilizes the conversion. See depth_2_distance.py for more detail. The numba package is required for depth-distance conversion.

Version info

Use the Cube branch of the modified AirSim.

The modified AirSim is based on the 1.4.0 (1.6) version. I have tested it with Unreal Engine 4.26.2. There might be some issues when converting a project that is created by the 4.25 version.

If this happens, let Unreal Engine generate the project files and use Visual Studio Code to compile the Development Editor configuration. If Unreal Engine refuses to generate the project files, I believe the following command is the one to try.

/UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -vscode -project=/path/to/your/unreal/project.uproject -game -engine

Then open the Visual Studio Code project and select the Terminal->Run Build Task menu entry. Then type "editor development" to search for Build commands.

How to run

Configure the settings.json used by AirSim by adding CaptureSettings for the new image type. Image type 8 is RGB and type 9 is depth.

"SimMode": "ComputerVision",
"CameraDefaults": {
    "CaptureSettings": [
        {
            "ImageType": 8,
            "Width": 1024,
            "Height": 1024,
        },
        {
            "ImageType": 9,
            "Width": 1024,
            "Height": 1024,
        }
    ]
}

Start a gamesimulation using the AirSimGameMode. Go to the cube directory and run python run.py.

Enjoy!

airsim_samplecubeclient's People

Contributors

huyaoyu avatar

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.