AirSim
AirSim copied to clipboard
Can I use a car and a multirotor at the same time?
I wan to control a car using the image from a drone multirotor but how can I spawn one of different tyoes of robots
Currently no but this in our mind (specifically because of some challenges involves this scenario). We hope to enable this in near future.
Hi! Any update on it?
Not yet. I don't anticipating this getting implemented in at least next 3 months. I would encourage to study the code and see if you can contribute.
Currently no but this in our mind (specifically because of some challenges involves this scenario). We hope to enable this in near future.
Could you quickly outline some of the challenges mentioned @stylus? Also could you list the files you think would need to be changed to implement this? I'd like to try and contribute to this
Hi! I was able to achieve this, you can check my fork. For my scenario I wanted to be able to control the multirotor using APIs to track the car which I would drive around. I had to make modifications to SimModeWorldMultiRotor.cpp based on SimModeCar.cpp. So now when you start the simulation, select no to start multirotor mode and a car and drone both will be spawned.
Hi,
I forked your airsim repo to use the simultaneous vehicle feature. However build is failing with a couple of undeclared identifier errors. I have attached a screenshot of the same.

@alvikag Fixed it..Check the latest commit.
Sorry, I had only tested the build for linux. However this issue is due to mkdir_p (recursive mkdir) in Filesystem.cpp, the function was supposed to be invoked for linux platform only. I have added the conditional compilation flags so it will hopefully build without any errors now!
Hi,
Thanks! I checked the latest commit, most of the errors are gone but the build is still failing.

As of now, I disabled the warning and now its getting compiled. Thanks!
Hi, I am working on a windows machine. I followed the steps , no results so far. the system crashes if I put SimMode as BothWorld on settings.json.

@aadi-mishra...the name of simmode is just "Both" and if you keep it blank you will get 2 prompts...choose quadrotor simulation (No) in first and when second appears choose car simulation also (Yes)
@kshitiz38 Error persists. Tried both methods as you suggested. In my case, UE doesn't prompt me twice. check this error from UE.

@kshitiz38 when the vehicles spawn in the environment, do both of them spawn at the same location?
@aadi-mishra ..This seem like an issue with your UE4 setup...Are you on lastest commit, The AirSim supports UE 4.18. If you are working with some other version or custom environment please make sure that you are able to build the official release and run default Environment Blocks.
I do not have a windows environment so I am unable to reproduce this error..maybe someone else on the thread can help to see if it works for Windows.
Yes both vehicles are spawned at same location(X,Y) but their Z values are different..This can be easily modified in setupVehiclesAndCamera() by modifying variables car_transform and multirotor_transform
I've no issues running this on Windows 10 on UE 4.18.3. Thanks for the great fork @kshitiz38
@kshitiz38 Working now! Thanks a lot.
@kshitiz38 Any updates on the new updated Airsim repo for heterogeneous vehicles? I have your repo forked.
@sytelus Any update on development? I'm working through kshitiz38's fork to try and update it to work with the latest AirSim version, but am having trouble. Any pointers?
Hi! I was able to achieve this, you can check my fork. For my scenario I wanted to be able to control the multirotor using APIs to track the car which I would drive around. I had to make modifications to SimModeWorldMultiRotor.cpp based on SimModeCar.cpp. So now when you start the simulation, select no to start multirotor mode and a car and drone both will be spawned.
@kshitiz38 Hi, I'm using your fork to simulate a drone and car. I'm also trying to make the drone follows the car. Is there a way to attach the viewport to the drone instead of the car?
Thanks!
@aadi-mishra @sousheel I've updated my fork (branch both/1.2.1) to the branch master of official repo now. See PythonClient/both/multi_agent_drone_car.py for example settings.json file and usage.
@alessand01 Yes with the new fork just mark the vehicle as fpv in settings.json file.
@alessand01 Yes with the new fork just mark the vehicle as fpv in settings.json file.
Thank you! I have downloaded and built the new fork but I get a segmentation fault error running the default HelloDrone application.. Any idea?
Thanks!
@kshitiz38 I have been trying to run your fork, but have come across a number of problems I am unsure of how to fix. I am experiencing the same seg fault as @alessand01. This only occurs after trying to move the car. I am also interested in the same viewport on the drone and the FPV option doesn't work for me. Do you have any pointers on how I can help to fix these problems? I can give more info on the seg fault as well.
@kshitiz38 I'm also experiencing seg fault even when no clients are connected. The crash occurs after a very variable period of time. (from 5 sec to some minutes). I have attached some log files about it.
I follow your advice, but there are some mistakes that can't be solved. I don't know what to do...seg fault, Can anybody help me?thanks alot
@fmazzi Do you have any idea about these errors. When using the both mode on windows, I encountered some runtime errors as yours.
Here is some additional information.

@kshitiz38 I tried using your both-1.2.1 branch with Unreal 4.24 on ubuntu 18.04 and got the following error:
`The project could not be compiled. Would you like to open it in Null Source Code Access?
Running /home/akshath/UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool.exe Development Linux -Project="/home/akshath/AirSim/Unreal/Environments/Blocks/Blocks.uproject" -TargetType=Editor -Progress -NoHotReloadFromIDE Scale at X=0.000000, Y=0.000000: 1.000000 (monitor=#0, HDPI=96.000000 (horz scale: 1.000000), VDPI=96.000000 (vert scale: 1.000000)) Scale at X=960.000000, Y=540.000000: 1.000000 (monitor=#0, HDPI=96.000000 (horz scale: 1.000000), VDPI=96.000000 (vert scale: 1.000000))
Running Mono...
Fixing inconsistent case in filenames. Setting up Mono ~/UnrealEngine/Engine ~/UnrealEngine/Engine/Binaries/Linux Using 'git status' to determine working set for adaptive non-unity build (/home/akshath/UnrealEngine). Creating makefile for BlocksEditor (no existing makefile) WARNING: Library 'stdc++' was not resolvable to a file when used in Module 'AirSim', assuming it is a filename and will search library paths for it. This is slow and dependency checking will not work for it. Please update reference to be fully qualified alternatively use PublicSystemLibraryPaths if you do intended to use this slow path to suppress this warning. WARNING: Library 'supc++' was not resolvable to a file when used in Module 'AirSim', assuming it is a filename and will search library paths for it. This is slow and dependency checking will not work for it. Please update reference to be fully qualified alternatively use PublicSystemLibraryPaths if you do intended to use this slow path to suppress this warning. @progress push 5% Creating makefile for UnrealHeaderTool (no existing makefile) @progress push 5% @progress pop Waiting for 'git status' command to complete ------- Build details -------- Using toolchain located at '/home/akshath/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v15_clang-8.0.1-centos7/x86_64-unknown-linux-gnu'. Using clang (/home/akshath/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v15_clang-8.0.1-centos7/x86_64-unknown-linux-gnu/bin/clang++) version '8.0.1' (string), 8 (major), 0 (minor), 1 (patch) Using bundled libc++ standard C++ library. Using lld linker Using llvm-ar : /home/akshath/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v15_clang-8.0.1-centos7/x86_64-unknown-linux-gnu/bin/llvm-ar Using fast way to relink circularly dependent libraries (no FixDeps).
Parsing headers for BlocksEditor Running UnrealHeaderTool "/home/akshath/AirSim/Unreal/Environments/Blocks/Blocks.uproject" "/home/akshath/AirSim/Unreal/Environments/Blocks/Intermediate/Build/Linux/B4D820EA/BlocksEditor/Development/BlocksEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors /home/akshath/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/CameraDirector.h(24) : LogCompile: Error: 'ECameraDirectorMode' does not have a 0 entry! (This is a problem when the enum is initalized by default) `
Can you help me with the debugging?
Is there any progress? To my best of my knowledge, since the implementations of the ground and aerial vehicles in Airsim are totally different, they have different data retrieve policies (for groud vehicle, Airsim fetches the sensor data once at each unreal render frame, while for aerial vehicle, it fetches data every sample time. So does your solution addresses this problem?
@sandyUni Hii, did you able to do it? I tried it with everything available but looks like some of the EIGEN policies has updated which hinders the successful vuild.
Hello, to anyone still interested in this:
I followed the work of @kshitiz38 from his repository and what I found here and I managed to get a joint simulation to work. I also went ahead and updated the ROS wrapper for AirSim to account for this.
You can find my repository here. It should be compatible with the latest version of AirSim.
hello daniel, Thanks for sharing. Is it tested on windows as well?
On Tue, May 18, 2021 at 9:11 PM Daniel Nieto @.***> wrote:
Hello, to anyone still interested in this:
I followed the work of @kshitiz38 https://github.com/kshitiz38 from his repository https://github.com/kshitiz38/AirSim and what I found here https://github.com/IdoMatan/AirsimAugmentedFiles and I managed to get a joint simulation to work. I also went ahead and updated the ROS wrapper for AirSim to account for this.
You can find my repository here https://github.com/danieto98. It should be compatible with the latest version of AirSim.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/microsoft/AirSim/issues/506#issuecomment-843280096, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIXRUPMIXLHVOBVS4XB7HHTTOKDB5ANCNFSM4D5LU4CA .