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

Update Entity Id create offset on GUI side #1145

Merged
merged 2 commits into from
Oct 27, 2021
Merged

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Oct 26, 2021

Signed-off-by: Ian Chen ichen@osrfoundation.org

🦟 Bug fix

Summary

It was found that several GUI plugins in ign-gazebo casts Entity type to either 32 bit signed / unsigned integers so having an offset value of max 64 bit int / 4.0 causes issues with other GUI plugins, e.g. Component Inspector would not display the entity Id correctly and entity selection does not work.

We will be fixing the 32 bit vs 64 bit int data type issue found in other GUI plugins separately. However, the main problem is found in entity selection. It gets the Entity Id through ignition::rendering::Node's UserData call which takes a std::variant object that currently does not support 64 bit ints. Adding support for this breaks ABI so that'll need to be done in ign-rendering7 / Garden.

This PR is a workaround for Fortress which sets the Entity Create offset to a value that can be represented using a 32 bit int.

Checklist

  • Signed all commits for DCO
  • Added tests
  • 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

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@iche033 iche033 requested a review from adlarkin October 26, 2021 22:23
@iche033 iche033 requested a review from chapulina as a code owner October 26, 2021 22:23
@github-actions github-actions bot added 🌱 garden Ignition Garden 🏯 fortress Ignition Fortress labels Oct 26, 2021
@codecov
Copy link

codecov bot commented Oct 26, 2021

Codecov Report

Merging #1145 (eecc125) into ign-gazebo6 (4d846d3) will decrease coverage by 0.11%.
The diff coverage is 5.66%.

Impacted file tree graph

@@               Coverage Diff               @@
##           ign-gazebo6    #1145      +/-   ##
===============================================
- Coverage        63.84%   63.73%   -0.12%     
===============================================
  Files              256      256              
  Lines            20077    20116      +39     
===============================================
+ Hits             12819    12820       +1     
- Misses            7258     7296      +38     
Impacted Files Coverage Δ
include/ignition/gazebo/gui/GuiEvents.hh 0.00% <0.00%> (ø)
src/gui/plugins/entity_tree/EntityTree.hh 100.00% <ø> (ø)
src/gui/plugins/select_entities/SelectEntities.cc 10.04% <0.00%> (ø)
src/rendering/SceneManager.cc 28.55% <ø> (ø)
src/gui/plugins/entity_tree/EntityTree.cc 9.00% <4.54%> (-0.62%) ⬇️
src/gui/GuiRunner.cc 78.57% <100.00%> (ø)
src/EntityComponentManager.cc 87.03% <0.00%> (-0.13%) ⬇️

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 9e00fc8...eecc125. Read the comment docs.

@adlarkin adlarkin merged commit e7e5f64 into ign-gazebo6 Oct 27, 2021
@adlarkin adlarkin deleted the gui_entity_id_offset branch October 27, 2021 16:02
srmainwaring pushed a commit to srmainwaring/gz-sim that referenced this pull request Nov 11, 2021
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Commit:
e7e5f64 [e7e5f64]
Parents:
9e00fc8
Author:
Ian Chen <ichen@osrfoundation.org>
Date:
27 October 2021 at 17:02:03 BST
Committer:
GitHub <noreply@github.com>
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏯 fortress Ignition Fortress 🌱 garden Ignition Garden
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants