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

Ground speed sensor #161

Merged
merged 6 commits into from
Jul 23, 2020
Merged

Ground speed sensor #161

merged 6 commits into from
Jul 23, 2020

Conversation

SijmenHuizenga
Copy link
Member

@SijmenHuizenga SijmenHuizenga commented Jul 19, 2020

closes #92

image

@SijmenHuizenga SijmenHuizenga marked this pull request as ready for review July 19, 2020 12:42
@SijmenHuizenga
Copy link
Member Author

@smnschfr would you be able to test this? If you haven't setup unreal engine, I can provide you with a packaged version of the game if that helps you. Let me know what you need 👍

@smnschfr
Copy link

Hi @SijmenHuizenga , yes we'll gladly test this. A packaged version would be appreciated.

@SijmenHuizenga
Copy link
Member Author

SijmenHuizenga commented Jul 19, 2020

Thanks @smnschfr !! This is the packaged download link. This link expires on 26 juli.

case SensorBase::SensorType::GSS:
// at this moment the codebase requires every sensor to have settings.
// However, gss does not have settings... so we just place ImuSettings in here for now.
sensor_setting = std::unique_ptr<SensorSetting>(new ImuSetting());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does this work? Can you give an example of a settings.json that has an IMU and a GSS?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new ImuSetting() doesn't do anything with the imu settings in the json, it just creates an empty settings object.

The problem is that sensor_setting needs to have a valid object and I don't want to create the GSSSettings class because gss doesn't have settings. The good solution would be to change the abstraction structure to allow sensors without settings. But I don't want to do that because lotsofwork and notthatusefullreally.

@smnschfr
Copy link

smnschfr commented Jul 20, 2020

Hi @SijmenHuizenga
It seems the velocity data published is relative to the global reference frame?
It's easy to get an approximation of the vehicles v_x from this when assuming v_y is close to 0 (just sqrt((linear/x)^2 + (linear/y)^2), but it's different from the real Kistler like plotted in https://user-images.githubusercontent.com/8008227/87918378-a0be5000-ca76-11ea-8c2c-08d16d019713.png.

If it's not too much effort, I'd suggest using the same data representation as in the real sensor.

@SijmenHuizenga
Copy link
Member Author

SijmenHuizenga commented Jul 21, 2020

@smnschfr Yes, good idea 👍 See above commit with the implementation.

Now, driving around it looks like this:

image

different scale to see the z changing:

image

@SijmenHuizenga
Copy link
Member Author

@smnschfr Is there anything else you would like to see changed before we merge it?

@smnschfr
Copy link

smnschfr commented Jul 21, 2020

@SijmenHuizenga I'm wondering why the curve doesn't look completely discrete (stair shape) at some points. Is that just the image resolution? Otherwise looks fine to me. And thanks for implementing that so quickly!

@davidoort
Copy link
Member

Are we adding noise to this sensor?

@SijmenHuizenga
Copy link
Member Author

SijmenHuizenga commented Jul 21, 2020

@davidoort Are we adding noise to this sensor?

At this moment I added no noise and am not planning to do so. My rational being that the kistler is this precise as well. When smoothing the kistler 250hz into the 100hz it is basically ground truth. I wrote a bit on this here and in the docs in this pr.

@SijmenHuizenga
Copy link
Member Author

SijmenHuizenga commented Jul 21, 2020

@smnschfr I'm wondering why the curve doesn't look completely discrete (stair shape) at some points.

Well spotted! This is because the ros bridge requests the information at a higher frequency then the physics simulation updates the vehicle. I'm not sure we can fix this, but i'm trying in #166 The architecture of this project (dictated by airsim) requires data pulling from the simulation in unreal so there is no way (yet) to synchronize it. So for now we have to live with this staircase datathing.

@SijmenHuizenga
Copy link
Member Author

It seems like everything has been resolved, so let's merge!

@SijmenHuizenga SijmenHuizenga merged commit 00fa002 into master Jul 23, 2020
@SijmenHuizenga SijmenHuizenga deleted the ground-speed-sensor branch July 23, 2020 22:29
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

Successfully merging this pull request may close these issues.

ground speed sensor
3 participants