Skip to content

Conversation

@georgflick
Copy link

@georgflick georgflick commented Apr 18, 2023

This PR adds the following:

My changes:

  • Added a new protobuf type laserscan_angles, which extends the type laserscan with the azimuth and zenith angles
  • To use the sample_sensor, you need to set the parameters:
    • sample_sensor to true
    • sample_size to define the amount of "samples", which are published using the angles in the csv files for each step
    • sample_csv_file to a csv file with the angles for the sample sensor
    • to reduce the gpu load while simulating multiple sensors, the texture image was changed from float32 RGB values to float16 R values. Using only one float16 value per pixel, it is not possible to simulate the intensity. The intensity is then set to a fixed value.

How-To-Test:

  • Test together with PR in main repo

@georgflick georgflick changed the title [DRAFT] Add GPU Sample laser sensor to simulate Livox mid360 sensor [DRAFT] Add GPU based sample laser sensor to simulate Livox mid360 sensor Apr 18, 2023
@georgflick georgflick force-pushed the gf/implement_gpu_sample_laser branch 2 times, most recently from acd1bd3 to 46e8cff Compare April 19, 2023 14:35
@georgflick georgflick added the enhancement New feature or request label Apr 19, 2023
@georgflick georgflick force-pushed the gf/implement_gpu_sample_laser branch from 46e8cff to 3bf0de5 Compare April 19, 2023 14:37
@georgflick georgflick marked this pull request as ready for review April 19, 2023 14:38
@georgflick georgflick changed the title [DRAFT] Add GPU based sample laser sensor to simulate Livox mid360 sensor Add GPU based sample laser sensor to simulate Livox mid360 sensor Apr 19, 2023
@georgflick georgflick force-pushed the gf/implement_gpu_sample_laser branch from c13139a to db399bb Compare April 20, 2023 08:22
Copy link

@Roboterbastler Roboterbastler left a comment

Choose a reason for hiding this comment

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

Wouldn't it make sense to make it a general option to disable the intensity configuration? The motivation is purely performance related right?
Maybe it would also be beneficial for other (non-sample) sensors if this could be disabled and we save a lot of computation (time). I think we don't use the intensities much, if we even use them anywhere at all...

@Roboterbastler
Copy link

Should we drop the existing commits concerning the cubemap implementation from devel-enway? Maybe it would be much cleaner if the commits in this PR replace those.

@georgflick georgflick force-pushed the gf/implement_gpu_sample_laser branch from 43bcca0 to 9b60f09 Compare May 3, 2023 14:44
@georgflick
Copy link
Author

Wouldn't it make sense to make it a general option to disable the intensity configuration? The motivation is purely performance related right? Maybe it would also be beneficial for other (non-sample) sensors if this could be disabled and we save a lot of computation (time). I think we don't use the intensities much, if we even use them anywhere at all...

True, I added a parameter compute_intensity , if that is off the texture is only R_FLOAT16 and intensity is set to the parameter fixed_intensity.

@georgflick georgflick force-pushed the gf/implement_gpu_sample_laser branch from 9b60f09 to da5ab06 Compare May 8, 2023 10:27
Copy link

@Roboterbastler Roboterbastler left a comment

Choose a reason for hiding this comment

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

I tested it again and looks good!

@Roboterbastler Roboterbastler removed their assignment May 8, 2023
@georgflick
Copy link
Author

georgflick commented May 8, 2023

Because of the merging conflicts, from updating the commits to the newest version 11.2.0 from the upstream gazebo-classic repo, I will push the gazebo11 PR branch manually to devel-enway and merge the PR afterwards.

@georgflick georgflick merged commit dd974c3 into devel-enway May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants