microsoft / AirSim

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

C++ Lidar API #4443

Open marionro opened 2 years ago

marionro commented 2 years ago

Question

What's your question?

Hello, i started using AirSim only 2 weeks ago so I'm quite new with it and i have issues using the lidar sensor. How do we use lidar sensor with C++ API ?

Include context on what you are trying to achieve

I'm testing AirSim to know if it would be corresponding our requirements to run with our external AP.

Context details

I'm using C++ API on Visual Studio 2019 for windows to control my drone (I customed the quadrotor by default with my own). I am in "ExternalPhysicsEngine" mode on the settings. And here are my lidar settings :

settings

I tried to "translate" the python client drone_lidar.py code to C++ and add it to my modified HelloDrone main.cpp. It builds with no errors but when run no points are detected by the lidar. The problem comes from getLidarData that doesn't get anything.

Include details of what you already did to find answers

I already tried to only display the number of points of the ExternalPhysicsEngine : didn't work; I tried changing my environment meshes' collision : didn't work; I tried to edit the pluggins of FCollisionQueryParams to trace the complex collision in AirBlueprintLib.cpp : didn't work; I tried changing settings.json parameters : didn't work; I tried to modify altitude or pose of the drone : didn't work.

I tried to went through all issues about lidar opened to get information but nothing that fits my problem.

I also tried to use default quadrotor and it this time get points until reach the moment to write them in a new .asc file where they display

error But this is another issues...

Is it not possible to use lidar and get their data in C++ or ExternalPhysicsEngine mode ? If it is how can i fix this problem.

Thank you !

rajat2004 commented 2 years ago

The C++ API should work as well, please post both the entire settings file and the script you're using so that it's easier to figure out what's going wrong