-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use the distance sensor? #1029
Comments
There is no Python API yet. We are planning to expose this soon. |
I know that there are some GPS related sensor APIs (e.g., getGPSLocation) and IMU related ones (e.g., get*Kinematics). Is there any API for magnetometor and barometer? If not, are you planning to expose them? Thank you! |
Hi @sytelus , Thanks a lot!! |
@dileep-krishnan Did you figure this out? Alternatively, does anyone have an example? |
hi, @sytelus is there anything updated for distance sensor ? I cannot find docs for how to use this sensor. You know that it's necessary to mount sensors (e.g.,ultrasonic sensor,millimeter-wave radar) on cars if we want to test our driverless car. i think that we need more sensors model (ultrasonic sensor and millimeter-wave radar are best ). |
@sytelus @paulerikf @dileep-krishnan for C++ users I also could not find anyway to get Barometer pressure...but : Please look at BarometerSimple.hpp Function : getOutputInternal(...) auto pressure = EarthUtils::getStandardPressure(altitude); . . . |
I just added APIs for Barometer, IMU, GPS, Magnetometer, Distance Sensor in #1920 See the updated docs https://github.com/Microsoft/AirSim/blob/master/docs/sensors.md |
For details on distance sensor / point lidar, see the discussion in the original PR here #791 and the original feature request here #405 The params of the distance sensor - pose , min_distance, max_distance all need to be still exposed, but we have an API for the default config. I'll add a PR to expose this params in settings.json soon. For those who want to do this by modifying code, you can directly params can be directly changed for any sensor in
Closing this now, but happy to keep the discussion alive. Please let us know if things are still not clear |
I tried to implement the getDistanceSensorData(lidar_name, vehicle_name) method but I received the following error. I tried to find the DistanceSensorData class but couldn't find it. Has anyone faced a similar issue? And if so, how did you resolve it? |
@rajatthosar |
To anyone looking for a fix to this when using the python wrapper. I was able to get the distance sensor working by adding a definition of DistanceSensorData to the 'types' file: AirSim\PythonClient\airsim\types.py. Just paste this in the bottom of that file: |
@madratman are the settings.json distance sensor parameters out yet? |
I am very happy to see the new "distance" sensor but don't know how to use it.
As far as I know, the distance sensor internally uses getRayLength(), which is actually implemented by UE4.
However, I do not know how to acquire the result (i.e., to log or display the distance value).
Is there an API or another way to do so?
Thank you very much for your support.
The text was updated successfully, but these errors were encountered: