microsoft / AirSim

Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
https://microsoft.github.io/AirSim/
Other
16.39k stars 4.57k forks source link

Get "no compatible vehicles created for current SimMode" when running computer vision mode with custom vehicle #4573

Open JiancongWang opened 2 years ago

JiancongWang commented 2 years ago

Question

What's your question?

Hi guys, I am trying to add custom cameras to a car when using computer vision mode. The settings.json I use is as follows

{ "SettingsVersion": 1.2, "SimMode": "ComputerVision", "Vehicles": { "PhysXCar": { "VehicleType": "PhysXCar", "DefaultVehicleState": "", "AutoCreate": true, "PawnPath": "", "EnableCollisionPassthrogh": false, "EnableCollisions": true, "RC": { "RemoteControlID": -1 }, "Cameras": {
"MyCamera0": { "X": 2, "Y": 0, "Z": -1, "Pitch": 0, "Roll": 0, "Yaw": -90 }, "MyCamera1": { "X": 2, "Y": 0, "Z": -1, "Pitch": 0, "Roll": 0, "Yaw": 0 }, "MyCamera2": { "X": 2, "Y": 0, "Z": -1, "Pitch": 0, "Roll": 0, "Yaw": 90 }, "MyCamera3": { "X": 2, "Y": 0, "Z": -1, "Pitch": 0, "Roll": 0, "Yaw": 180 }, "MyCamera4": { "X": 2, "Y": 0, "Z": -1, "Pitch": 90, "Roll": 0, "Yaw": 0 } } } }, "SubWindows": [ {"WindowID": 0, "ImageType": 0, "CameraName": "MyCamera4", "Visible": true}, {"WindowID": 1, "ImageType": 0, "CameraName": "MyCamera1", "Visible": true}, {"WindowID": 2, "ImageType": 0, "CameraName": "MyCamera2", "Visible": true} ], "Recording": { "RecordOnMove": false, "RecordInterval": 0.05, "Cameras": [ { "CameraName": "MyCamera0", "ImageType": 5, "PixelsAsFloat": false, "Compress": true }, { "CameraName": "MyCamera1", "ImageType": 5, "PixelsAsFloat": false, "Compress": true }, { "CameraName": "MyCamera2", "ImageType": 5, "PixelsAsFloat": false, "Compress": true } ] } }

This runs fine when I set the sim mode to "Car". But when I switch the sim mode to "ComputerVision", it gives me an error of "there were no compatible vehicles created for current simmode". So I am writing to ask how to resolve this issue?

Context details

I am running this on Ubuntu 20.04, unreal4 4.27.2.

Include details of what you already did to find answers

I tried to add the "PawnPath" and add a drone to the vehicle setting and still no luck.

rajat2004 commented 2 years ago

For Computer vision simmode, the vehicle type must also be ComputerVision

JiancongWang commented 2 years ago

Thanks for the tip! In that case can I just replace the vehicle type of "PhysXCar" to "ComputerVision"?