-
Notifications
You must be signed in to change notification settings - Fork 270
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
Fix enviroment system loading mechanism #1842
Conversation
Currently, there is an issue with the way the Environment loader plugin loads data. In particular it directly writes to the ECM. While this makes sense intuitively, it does not work in practice as the GUI runs on a client process while systems that use it run on the server. This PR fixes this issue by introducing a topic through which the GUI may load Environment Data on the server. TODO: - [ ] This commit breaks the visuallization plugin. Fix it so the visuallization plugin runs the data sampling off the server plugin. Signed-off-by: Arjo Chakravarty <[email protected]>
Required by gazebosim/gz-sim#1842 Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Required by gazebosim/gz-sim#1842 Signed-off-by: Arjo Chakravarty <[email protected]>
@arjo129 are you actively working on this? |
I have not had any hours to work on this this month. However if I get some time at the end of the week I will probably revisit this. Theres still a fair deal of work needed on the visuallization side and some testing to be done. |
Visuallization still goes 💥 Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Vis still not working Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Now left with one more crash that needs debugging when "play" is hit. Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Also refactored the visualization tool out. Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
76dec37
to
4fd5c9e
Compare
Signed-off-by: Arjo Chakravarty <[email protected]>
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.
Note to self: 1 file left to look at (src/systems/environment_preload/EnvironmentPreload.cc)
Wanted to put in the review to get this going in case I don't have more time rest of the week to look at that file.
How does one test this? I see in gz-sim/examples/worlds
, these files exist:
environmental_data.csv
environmental_sensor.sdf
Do those files test this PR?
src/gui/plugins/environment_visualization/EnvironmentVisualization.cc
Outdated
Show resolved
Hide resolved
src/gui/plugins/environment_visualization/EnvironmentVisualization.cc
Outdated
Show resolved
Hide resolved
Signed-off-by: Arjo Chakravarty <[email protected]>
@arjo129 Do you have time to resolve the conflicts and address any remaining feedback? |
Yep. Should be able to fix this by friday. |
Co-authored-by: Mabel Zhang <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
…-sim into arjo/fix/environment_system
This commit automatically loads the environment preload plugin if it is missing. Signed-off-by: Arjo Chakravarty <[email protected]>
As promised, this is ready for review. CI is failing because we need an upstream release. I solved the issue where we were unable to load the environment from the empty world. Here is an example of how to use the plugin: First search for |
Signed-off-by: Arjo Chakravarty <[email protected]>
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 notice a couple of issues when testing. Not sure if these are caused by or in the scope of this PR:
-
If I launch gazebo unpaused (with
-r
) then open theEnvironment Visualization
plugin, the GUI crashes.gz sim -r environmental_sensor.sdf
- Open
Environment Visualization
gui plugin -> crash
-
I need to have the
Environment Visualization
andPoint Cloud
GUI plugins already open before hitting Play to see the point cloud visualization. If I open thePoint Cloud
GUI plugin after hitting Play, I don't see the visualization.gz sim environmental_sensor.sdf
- Open
Environment Visualization
gui plugin - Hit Play
- Open
Point Cloud
gui plugin - Click on refresh button in the
Point Cloud
gui plugin -> No point cloud visualization
src/gui/plugins/environment_visualization/EnvironmentVisualization.cc
Outdated
Show resolved
Hide resolved
Signed-off-by: Arjo Chakravarty <[email protected]>
`TimeVaryingVolumetricGrid` This is needed to resolve a bug in gazebosim/gz-sim#1842 (review). In particular part of the issue is poor API design. Ideally `CreateSession` would return an `Option<Session>`, however it returns a `Session` even if it is not possible to create the session (for instance if it is too far ahead in time or an empty grid). Hence downstream users need a way to verify session validity. Signed-off-by: Arjo Chakravarty <[email protected]>
However fix depends on gazebosim/gz-math#551 Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
I've fixed issue 1 you mentioned. It was caused by an incorrect access to the session object. The fix does require this pull request though: gazebosim/gz-math#551. Issue 2 sounds like expected behavior. The reason for this is that the example |
I think it's best to remove |
Confirmed that issue 1 is fixed!
Got it. The error msg popped up as soon as I opened the |
needs a gz-math7 release. |
…metricGrid` (#551) This is needed to resolve a bug in gazebosim/gz-sim#1842 (review). In particular part of the issue is poor API design. Ideally `CreateSession` would return an `Option<Session>`, however it returns a `Session` even if it is not possible to create the session (for instance if it is too far ahead in time or an empty grid). Hence downstream users need a way to verify session validity. Signed-off-by: Arjo Chakravarty <[email protected]>
@osrf-jenkins run tests please |
Let me investigate these tests...I will not be able to address thing immediately. I think we should merge this after code freeze as said by @azeey |
Signed-off-by: Arjo Chakravarty <[email protected]>
Codecov Report
@@ Coverage Diff @@
## gz-sim7 #1842 +/- ##
===========================================
- Coverage 65.01% 64.57% -0.44%
===========================================
Files 353 357 +4
Lines 28618 29119 +501
===========================================
+ Hits 18606 18804 +198
- Misses 10012 10315 +303
|
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 good to me
🦟 Bug fix
Fixes #
Summary
Currently, there is an issue with the way the Environment loader plugin loads data. In particular it directly writes to the ECM. While this makes sense intuitively, it does not work in practice as the GUI runs on a client process while systems that use it run on the server. This PR fixes this issue by introducing a topic through which the GUI may load Environment Data on the server.
Depends on:
TODO:
Signed-off-by: Arjo Chakravarty [email protected]
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.