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

Add SetSize API for LidarVisual #392

Merged
merged 18 commits into from
Sep 15, 2021
Merged

Add SetSize API for LidarVisual #392

merged 18 commits into from
Sep 15, 2021

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Sep 1, 2021

Signed-off-by: Ian Chen [email protected]

🎉 New feature

Summary

Support setting point size for lidar visual.

Currently working for ogre 1.x only. I still need to figure out how to make it work with the ogre2 hlms system.

Update: ogre2 is now working - updated to use ogre low level materials.

Test it

  1. Build and run the lidar_visual example.
  2. Press 2 to toggle to point rendering and see the points are now slightly larger than before (size increased from 1 to 5):

lidar_visual_size_5

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • 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

@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Sep 1, 2021
Signed-off-by: Ian Chen <[email protected]>
@codecov
Copy link

codecov bot commented Sep 1, 2021

Codecov Report

Merging #392 (cd65302) into main (38a2b43) will decrease coverage by 0.11%.
The diff coverage is 28.98%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #392      +/-   ##
==========================================
- Coverage   58.65%   58.54%   -0.12%     
==========================================
  Files         174      174              
  Lines       17278    17345      +67     
==========================================
+ Hits        10134    10154      +20     
- Misses       7144     7191      +47     
Impacted Files Coverage Δ
ogre/src/OgreLidarVisual.cc 0.00% <0.00%> (ø)
ogre/src/OgreMarker.cc 0.00% <0.00%> (ø)
ogre2/src/Ogre2Marker.cc 40.88% <0.00%> (-5.22%) ⬇️
ogre2/src/Ogre2LidarVisual.cc 80.67% <35.29%> (-3.18%) ⬇️
ogre2/src/Ogre2DynamicRenderable.cc 75.00% <60.00%> (-0.23%) ⬇️
include/ignition/rendering/base/BaseLidarVisual.hh 84.61% <100.00%> (+0.55%) ⬆️
include/ignition/rendering/base/BaseMarker.hh 51.16% <100.00%> (+7.91%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 38a2b43...cd65302. Read the comment docs.

Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
@chapulina chapulina added the beta Targeting beta release of upcoming collection label Sep 8, 2021
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

Nice! Can we also make the point size in markers configurable? 🙏

include/ignition/rendering/LidarVisual.hh Outdated Show resolved Hide resolved
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
@iche033
Copy link
Contributor Author

iche033 commented Sep 10, 2021

Can we also make the point size in markers configurable?

I created pull request #403 for setting marker point size. I notice that we don't have any gui plugin or msg field to configure the point size though. That may be a good feature to add afterwards.

Copy link
Contributor

@adlarkin adlarkin left a comment

Choose a reason for hiding this comment

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

LGTM. I played with the example to change the value passed in to the SetSize call, and things behaved as expected with both ogre and ogre2. When running the example with ogre2, I saw the Error casting user data: Unexpected index message, but this went away when I tested the example with #396.

I left a few minor comments, and wouldn't mind having one more person take a look at this to confirm that the usage of materials/shaders here is okay.

examples/lidar_visual/Main.cc Show resolved Hide resolved
ogre2/src/Ogre2DynamicRenderable.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@adlarkin adlarkin left a comment

Choose a reason for hiding this comment

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

As I mentioned before, it'd be nice to have at least one more set of eyes on this since my rendering knowledge is still fairly elementary. But, from what I tested/reviewed, LGTM!

@iche033 iche033 merged commit bd9b815 into main Sep 15, 2021
@iche033 iche033 deleted the lidar_point_size branch September 15, 2021 21:52
WilliamLewww pushed a commit to WilliamLewww/ign-rendering that referenced this pull request Dec 7, 2021
* add set size for lidar visual

Signed-off-by: Ian Chen <[email protected]>

* update unit test

Signed-off-by: Ian Chen <[email protected]>

* fix warnings

Signed-off-by: Ian Chen <[email protected]>

* ogre2 working

Signed-off-by: Ian Chen <[email protected]>

* testing homewbrew

Signed-off-by: Ian Chen <[email protected]>

* more testing homebrew

Signed-off-by: Ian Chen <[email protected]>

* test arb extension

Signed-off-by: Ian Chen <[email protected]>

* testing no extension

Signed-off-by: Ian Chen <[email protected]>

* fixing windows

Signed-off-by: Ian Chen <[email protected]>

* fixing windows

Signed-off-by: Ian Chen <[email protected]>

* update doc

Signed-off-by: Ian Chen <[email protected]>

* fixes

Signed-off-by: Ian Chen <[email protected]>

* update doc

Signed-off-by: Ian Chen <[email protected]>

* Add SetSize API for Marker point size (gazebosim#403)

Signed-off-by: Ian Chen <[email protected]>

Co-authored-by: Alejandro Hernández Cordero <[email protected]>
Co-authored-by: Louise Poubel <[email protected]>
Signed-off-by: William Lew <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta Targeting beta release of upcoming collection 🏯 fortress Ignition Fortress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants