-
Notifications
You must be signed in to change notification settings - Fork 0
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
MaliputViewerPlugin: Improve initialization to fix crash. #471
Conversation
I've solved the issue with the visualization. Again, the key was to sync the scene set up with the render event. @agalbachicar It is ready to review. I can't be happier. EDIT: sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y libignition-gui3-dev libignition-rendering3-dev libignition-transport8-dev libignition-msgs5-dev libignition-common3-dev libignition-math6-dev
sudo apt-get upgrade Also, deactivate the |
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.
PTAL
delphyne_gui/visualizer/maliput_viewer_plugin/maliput_viewer_plugin.cc
Outdated
Show resolved
Hide resolved
delphyne_gui/visualizer/maliput_viewer_plugin/maliput_viewer_plugin.cc
Outdated
Show resolved
Hide resolved
delphyne_gui/visualizer/maliput_viewer_plugin/maliput_viewer_plugin.cc
Outdated
Show resolved
Hide resolved
delphyne_gui/visualizer/maliput_viewer_plugin/maliput_viewer_plugin.cc
Outdated
Show resolved
Hide resolved
delphyne_gui/visualizer/maliput_viewer_plugin/maliput_viewer_plugin.cc
Outdated
Show resolved
Hide resolved
delphyne_gui/visualizer/maliput_viewer_plugin/maliput_viewer_plugin.hh
Outdated
Show resolved
Hide resolved
void Initialize(); | ||
|
||
/// \brief Set up the scene modifying the light and instanciating the ArrowMesh, Selector and TrafficLightManager. |
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.
Nit: instantiating
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.
Done.
@@ -420,7 +423,7 @@ class MaliputViewerPlugin : public ignition::gui::Plugin { | |||
std::atomic<bool> newRoadNetwork{false}; | |||
|
|||
/// \brief Indicates the scene needs to be set-up. | |||
bool setUpScene = false; | |||
std::atomic<bool> setUpScene = false; |
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.
Nit: use braced initialization as with the others.
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.
Ops, sorry for that. Done.
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.
LGTM aside from the nits.
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.
LGTM
Part of #466
This PR
For a reason that I couldn't identify yet, the initialization process that we were performing wasn't correct and that causes that crash later on. I improved the initialization process and the crash is no longer present.
Note: To test the lane selection in focal I manually updated ign-gui using apt as we need the changes in 3.6 version. (See #452 (comment))
First approach:
At first I thought it was related to a lack of syncing between render thread and our changes in the scene but the way we were doing it was the recommended(hooking to the Render event)
Known issue
Sometimes when hitting the Load button the meshes aren't visualized correctly however when pressing on the scene you can still select the lanes. This is the reason this pr is still draft
