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

Fix a crash in the grid_config plugin #412

Merged
merged 3 commits into from
Oct 21, 2020
Merged

Conversation

nkoenig
Copy link
Contributor

@nkoenig nkoenig commented Oct 14, 2020

The grid plugin will crash when changing properties if a world has <grid>false</grid> in the <scene> tag.

For example:

<?xml version="1.0" ?>
<sdf version="1.6">
  <world name="default">
    <plugin
      filename="ignition-gazebo-user-commands-system"
      name="ignition::gazebo::systems::UserCommands">
    </plugin>
    <plugin
      filename="ignition-gazebo-scene-broadcaster-system"
      name="ignition::gazebo::systems::SceneBroadcaster">
    </plugin>
    <physics name="1ms" type="ode">
      <max_step_size>0.004</max_step_size>
      <real_time_factor>1.0</real_time_factor>
    </physics>

    <scene>
      <ambient>0.1 0.1 0.1 1.0</ambient>
      <background>0 0 0 1.0</background>
      <grid>false</grid>
      <origin_visual>false</origin_visual>
    </scene>

    <include>
      <static>true</static>
      <name>staging_area</name>
      <pose>0 0 0 0 0 0</pose>
      <uri>https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Cave Starting Area Type B</uri>
    </include>
  </world>
</sdf>

This fixes the problem, but there might be a more elegant solution.

Signed-off-by: Nate Koenig <nate@openrobotics.org>
@nkoenig nkoenig requested a review from chapulina as a code owner October 14, 2020 21:25
@github-actions github-actions bot added the 🏰 citadel Ignition Citadel label Oct 14, 2020
chapulina added a commit that referenced this pull request Oct 14, 2020
Signed-off-by: Louise Poubel <louise@openrobotics.org>
@chapulina
Copy link
Contributor

there might be a more elegant solution.

See #413

@codecov
Copy link

codecov bot commented Oct 21, 2020

Codecov Report

Merging #412 into ign-gazebo3 will increase coverage by 11.59%.
The diff coverage is 80.21%.

Impacted file tree graph

@@               Coverage Diff                @@
##           ign-gazebo3     #412       +/-   ##
================================================
+ Coverage        65.71%   77.30%   +11.59%     
================================================
  Files              127      205       +78     
  Lines             6238    11018     +4780     
================================================
+ Hits              4099     8518     +4419     
- Misses            2139     2500      +361     
Impacted Files Coverage Δ
include/ignition/gazebo/EntityComponentManager.hh 100.00% <ø> (ø)
include/ignition/gazebo/Link.hh 100.00% <ø> (ø)
include/ignition/gazebo/Model.hh 100.00% <ø> (ø)
include/ignition/gazebo/SdfEntityCreator.hh 100.00% <ø> (ø)
include/ignition/gazebo/Server.hh 100.00% <ø> (ø)
include/ignition/gazebo/ServerConfig.hh 100.00% <ø> (ø)
include/ignition/gazebo/gui/GuiEvents.hh 0.00% <0.00%> (ø)
src/SimulationRunner.hh 100.00% <ø> (ø)
.../plugins/component_inspector/ComponentInspector.hh 28.57% <ø> (ø)
src/gui/plugins/entity_tree/EntityTree.cc 9.89% <0.00%> (ø)
... and 171 more

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 aa6c62b...d98a4f1. Read the comment docs.

@chapulina chapulina merged commit d3e5d67 into ign-gazebo3 Oct 21, 2020
@chapulina chapulina deleted the nate/fix_grid_crash branch October 21, 2020 17:15
mjcarroll pushed a commit that referenced this pull request Oct 21, 2020
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Louise Poubel <louise@openrobotics.org>
doisyg pushed a commit to wyca-robotics/ign-gazebo that referenced this pull request Dec 13, 2020
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Guillaume Doisy <guillaume.doisy@wyca.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants