Skip to content
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

Distance Sensor in AirSim #2444

Closed
YKembal opened this issue Mar 5, 2020 · 5 comments
Closed

Distance Sensor in AirSim #2444

YKembal opened this issue Mar 5, 2020 · 5 comments

Comments

@YKembal
Copy link

YKembal commented Mar 5, 2020

I am trying to use the distance sensor (for a Vechile not a Drone) in airsim and it is working properly except that it only measure the distance from the bottom of the car to the ground and i don't know where to change it to make it measure the distance from the front of the car not from it's bottom , PLEASE HELP.

This is an example of the current distance sensor output :

{ 'distance': 0.05738349258899689,
'max_distance': 40.0,
'min_distance': 0.20000000298023224,
'relative_pose': { 'orientation': { 'w_val': 1.0,
'x_val': 0.0,
'y_val': 0.0,
'z_val': 0.0},
'position': { 'x_val': 0.0,
'y_val': 0.0,
'z_val': 0.0}},
'time_stamp': 1583421822500312700}

@rajat2004
Copy link
Contributor

Distance sensor currently doesn't support modification of orientation or position through the settings, could have a look at using Lidar for this
Another possibility is to add such a transforming code which takes the orientation from settings and applies it, which should be similar to the already existing code for Lidar

@YKembal
Copy link
Author

YKembal commented Mar 10, 2020

Distance sensor currently doesn't support modification of orientation or position through the settings, could have a look at using Lidar for this
Another possibility is to add such a transforming code which takes the orientation from settings and applies it, which should be similar to the already existing code for Lidar

Can you give an example on how to taake the orientaaation of a sensor from settings and change it and apply it as you have said ?

@rajat2004
Copy link
Contributor

The settings for Lidar are parsed here - https://github.com/microsoft/AirSim/blob/master/AirLib/include/common/AirSimSettings.hpp#L1175
This takes in position and orientation of the Lidar, which are then used in LidarSimpleParams.hpp
Some transformation also happens in LidarSimple.hpp

This should be a good starting place for adding such a feature. Files across different sensors have similar names and implementations, to make it easier for developing new features, which is the case across most of the AirSim codebase for different vehicles, etc.

@EdwinMeriaux
Copy link

Distance sensor currently doesn't support modification of orientation or position through the settings, could have a look at using Lidar for this
Another possibility is to add such a transforming code which takes the orientation from settings and applies it, which should be similar to the already existing code for Lidar

does the distance sensor still have the limitation of modification of orientation?

@rajat2004
Copy link
Contributor

I believe so, don't remember any changes being made to sensors, etc recently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants