-
Notifications
You must be signed in to change notification settings - Fork 269
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
Enabling Global Illumination (GI VCT) for sensors in SDF #2550
Conversation
Signed-off-by: Athena Z <athenaz@google.com>
Signed-off-by: Athena Z <athenaz@google.com>
Signed-off-by: Athena Z <athenaz@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this generally looks good, added some suggestions
src/systems/sensors/Sensors.cc
Outdated
@@ -521,6 +628,52 @@ Sensors::~Sensors() | |||
this->dataPtr->Stop(); | |||
} | |||
|
|||
//TODO: why does math::Vector3d work but not math::Vector3i? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like math::Vector3i
is not one of the supported types: https://github.com/gazebosim/sdformat/blob/ba1bf8fedc0b6063d4312ad312e515e28f71cfb9/include/sdf/Param.hh#L529-L537
src/systems/sensors/Sensors.cc
Outdated
std::string giType = giElem->GetAttribute("type")->GetAsString(); | ||
if (giType == "vct") | ||
{ | ||
this->dataPtr->giVctParameters.enabled = giElem->Get<bool>("enabled", this->dataPtr->giVctParameters.enabled).first; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrap lines to 80char
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked style with codecheck in f82c68e
Co-authored-by: Ian Chen <ichen@openrobotics.org> Signed-off-by: Athena Z. <athenaz@google.com>
… clean with codecheck Signed-off-by: Athena Z <athenaz@google.com>
Signed-off-by: Athena Z <athenaz@google.com>
Signed-off-by: Athena Z <athenaz@google.com>
Signed-off-by: Athena Z <athenaz@google.com>
Signed-off-by: Athena Z <athenaz@google.com>
Signed-off-by: Athena Z <athenaz@google.com>
looks like there's an issue with GI on metal. Output from homebrew CI build:
you can disable the test on mac using this macro. Can you ticket an issue on this in gz-rendering? |
…S :( Signed-off-by: Athena Z <athenaz@google.com>
Okay, created an issue - gazebosim/gz-rendering#1048. I also noted it in the issue description but the GI unit test also skips testing for Apple platform. |
The test is still segfaulting. I'm wondering if it's an issue with having two rendering tests in the same file. Can you try commenting out the "GiNotEnabled" version to see if just running the test with GI enabled still segfaults? |
Signed-off-by: Athena Z <athenaz@google.com>
Signed-off-by: Athena Z <athenaz@google.com>
Signed-off-by: Athena Z <athenaz@google.com>
Signed-off-by: Athena Z <athenaz@google.com>
Signed-off-by: Athena Z <athenaz@google.com>
<!-- <plugin | ||
filename="gz-sim-scene-broadcaster-system" | ||
name="gz::sim::systems::SceneBroadcaster"> | ||
</plugin> --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove if not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<property key="showTitleBar" type="bool">false</property> | ||
</gz-gui> | ||
</plugin> | ||
</gui> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can remove the whole <gui>
block because we don't need it for the test right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for the camera_sensor_gi_enabled_false.sdf
test world
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, was from creating SDF scene and ensuring cam lines up for test case. 95530a6
tutorials/global_illumination.md
Outdated
#### Example usage with VCT | ||
|
||
We will demonstrate how to enable VCT for the sensor with the SDF file below. (The finished SDF file can be viewed [here]( | ||
https://github.com/gazebosim/gz-sim/blob/main/examples/worlds/global_illumination.sdf).) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change link to point to the gz-sim8
branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tutorials/global_illumination.md
Outdated
#### Example usage for CI VCT | ||
|
||
1) Open the [global_illumination.sdf]( | ||
https://github.com/gazebosim/gz-sim/blob/main/examples/worlds/global_illumination.sdf) world using Vulkan with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change link to point to the gz-sim8
branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tutorials/global_illumination.md
Outdated
#### Example usage for VCT | ||
|
||
1) Open the [global_illumination.sdf]( | ||
https://github.com/gazebosim/gz-sim/blob/main/examples/worlds/global_illumination.sdf) world with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update link to point to gz-sim8
branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Ian Chen <ichen@openrobotics.org> Signed-off-by: Athena Z. <athenaz@google.com>
Co-authored-by: Ian Chen <ichen@openrobotics.org> Signed-off-by: Athena Z. <athenaz@google.com>
…cause unused, redo links Signed-off-by: Athena Z <athenaz@google.com>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
This shouldn't have been merged since we are in code freeze. Let's make sure we don't forward port this to gz-sim9. Ideally, we won't need to forward port in the next few weeks, but if we do, we should just cherry-pick any necessary changes. |
🎉 New feature
Summary
Global illumination (GI) has been enabled for the GUI with #1597, but not for the camera sensor view. This PR allows for GI to be enabled for sensors in the SDF as a
<global_illumination>
element within thesensor_system
plugin. Currently supports the VCT technique, in the future can consider adding support for CI VCT.Sensor view (left) and GUI (right) without GI VCT:
With GI VCT:
Test it
gi_for_sensors_demo.zip
Modify the
<global_illumination>
element in the SDF. This element is within thesensor_system
plugin. The format is as follows:Checklist
codecheck
passed (See contributing)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.