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

Optimization: remove extra copy of data buffer in Ogre2GpuRays and Ogre2DepthCamera #1022

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Jul 25, 2024

🦟 Bug fix

Summary

In Ogre2GpuRays and Ogre2DepthCamera, the raw data from ogre2 is copied into an local intermediate data buffer first before being copied again to separate outgoing data buffer(s) which are to be consumed by gz-sensors. This is not really necessary because gz-sensors also does its own copy when new data are available. This PR removes the local intermediate data buffer in Ogre2GpuRays and Ogre2DepthCamera classes and just copy the ogre2 raw data directly to the outgoing buffer

Tested by running relevant integration tests:

  • gz-rendering: INTEGRATION_gpu_rays, INTEGRATION_depth_camera tests
    • e.g. GZ_ENGINE_TO_TEST=ogre2 ./build/gz-rendering8/bin/INTEGRATION_depth_camera
  • gz-sensors: INTEGRATION_gpu_lidar_sensor, INTEGRATION_rgbd_camera, INTEGRATION_depth_camera

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Jul 25, 2024
@iche033 iche033 merged commit e48767b into gz-rendering8 Jul 26, 2024
9 of 10 checks passed
@iche033 iche033 deleted the lidar_depth_buffer branch July 26, 2024 16:39
athenaz2 pushed a commit to athenaz2/gz-rendering that referenced this pull request Jul 29, 2024
athenaz2 pushed a commit to athenaz2/gz-rendering that referenced this pull request Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants