-
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
Added DEM support #1262
Merged
Merged
Added DEM support #1262
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
083e04b
dem support
jennuine 17a31b8
Merge branch 'main' into jennuine/dem
jennuine 8788a56
Merge branch 'main' into jennuine/dem
jennuine fce9244
fixed includes
jennuine c6cdacd
Merge branch 'main' into jennuine/dem
scpeters ded74d0
Merge branch 'main' into jennuine/dem
chapulina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
<?xml version="1.0" ?> | ||
<!-- | ||
|
||
Demonstrates a Digital Elevation Model (DEM) heightmap of Monterey Bay bathymetry | ||
downloaded from GEBCO (General Bathymetric Chart of the Oceans) 2021 https://www.gebco.net/ | ||
|
||
--> | ||
<sdf version="1.9"> | ||
<world name="dem_monterey_bay"> | ||
<physics name="1ms" type="ignored"> | ||
<dart> | ||
<!-- Heightmaps behave better with the bullet collision detector --> | ||
<collision_detector>bullet</collision_detector> | ||
</dart> | ||
</physics> | ||
|
||
<gui fullscreen="0"> | ||
<plugin filename="MinimalScene" name="3D View"> | ||
<ignition-gui> | ||
<title>3D View</title> | ||
<property type="bool" key="showTitleBar">false</property> | ||
<property type="string" key="state">docked</property> | ||
</ignition-gui> | ||
|
||
<engine>ogre</engine> | ||
<scene>scene</scene> | ||
<ambient_light>0 0 0</ambient_light> | ||
<background_color>0.8 0.8 0.8</background_color> | ||
<camera_pose>-91.402603 7.516849 114.206924 0 0.889399 -0.016090</camera_pose> | ||
</plugin> | ||
|
||
<!-- Plugins that add functionality to the scene --> | ||
<plugin filename="EntityContextMenuPlugin" name="Entity context menu"> | ||
<ignition-gui> | ||
<property key="state" type="string">floating</property> | ||
<property key="width" type="double">5</property> | ||
<property key="height" type="double">5</property> | ||
<property key="showTitleBar" type="bool">false</property> | ||
</ignition-gui> | ||
</plugin> | ||
<plugin filename="GzSceneManager" name="Scene Manager"> | ||
<ignition-gui> | ||
<property key="resizable" type="bool">false</property> | ||
<property key="width" type="double">5</property> | ||
<property key="height" type="double">5</property> | ||
<property key="state" type="string">floating</property> | ||
<property key="showTitleBar" type="bool">false</property> | ||
</ignition-gui> | ||
</plugin> | ||
<plugin filename="InteractiveViewControl" name="Interactive view control"> | ||
<ignition-gui> | ||
<property key="resizable" type="bool">false</property> | ||
<property key="width" type="double">5</property> | ||
<property key="height" type="double">5</property> | ||
<property key="state" type="string">floating</property> | ||
<property key="showTitleBar" type="bool">false</property> | ||
</ignition-gui> | ||
</plugin> | ||
<plugin filename="CameraTracking" name="Camera Tracking"> | ||
<ignition-gui> | ||
<property key="resizable" type="bool">false</property> | ||
<property key="width" type="double">5</property> | ||
<property key="height" type="double">5</property> | ||
<property key="state" type="string">floating</property> | ||
<property key="showTitleBar" type="bool">false</property> | ||
</ignition-gui> | ||
</plugin> | ||
<plugin filename="WorldControl" name="World control"> | ||
<ignition-gui> | ||
<title>World control</title> | ||
<property type="bool" key="showTitleBar">false</property> | ||
<property type="bool" key="resizable">false</property> | ||
<property type="double" key="height">72</property> | ||
<property type="double" key="width">121</property> | ||
<property type="double" key="z">1</property> | ||
|
||
<property type="string" key="state">floating</property> | ||
<anchors target="3D View"> | ||
<line own="left" target="left"/> | ||
<line own="bottom" target="bottom"/> | ||
</anchors> | ||
</ignition-gui> | ||
|
||
<play_pause>true</play_pause> | ||
<step>true</step> | ||
<start_paused>true</start_paused> | ||
<use_event>true</use_event> | ||
</plugin> | ||
|
||
<plugin filename="WorldStats" name="World stats"> | ||
<ignition-gui> | ||
<title>World stats</title> | ||
<property type="bool" key="showTitleBar">false</property> | ||
<property type="bool" key="resizable">false</property> | ||
<property type="double" key="height">110</property> | ||
<property type="double" key="width">290</property> | ||
<property type="double" key="z">1</property> | ||
|
||
<property type="string" key="state">floating</property> | ||
<anchors target="3D View"> | ||
<line own="right" target="right"/> | ||
<line own="bottom" target="bottom"/> | ||
</anchors> | ||
</ignition-gui> | ||
|
||
<sim_time>true</sim_time> | ||
<real_time>true</real_time> | ||
<real_time_factor>true</real_time_factor> | ||
<iterations>true</iterations> | ||
</plugin> | ||
|
||
<plugin filename="ComponentInspector" name="Component inspector"> | ||
<ignition-gui> | ||
<property type="string" key="state">docked</property> | ||
</ignition-gui> | ||
</plugin> | ||
|
||
<plugin filename="EntityTree" name="Entity tree"> | ||
<ignition-gui> | ||
<property type="string" key="state">docked</property> | ||
</ignition-gui> | ||
</plugin> | ||
</gui> | ||
|
||
<light type="directional" name="sun"> | ||
<cast_shadows>true</cast_shadows> | ||
<pose>0 0 10 0 0 0</pose> | ||
<diffuse>0.8 0.8 0.8 1</diffuse> | ||
<specular>0.2 0.2 0.2 1</specular> | ||
<attenuation> | ||
<range>1000</range> | ||
<constant>0.9</constant> | ||
<linear>0.01</linear> | ||
<quadratic>0.001</quadratic> | ||
</attenuation> | ||
<direction>-0.5 0.1 -0.9</direction> | ||
</light> | ||
|
||
<include> | ||
<uri> | ||
https://fuel.ignitionrobotics.org/1.0/jennuine/models/Monterey Bay | ||
</uri> | ||
</include> | ||
</world> | ||
</sdf> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,181 @@ | ||
<?xml version="1.0" ?> | ||
<!-- | ||
|
||
Demonstrates a Digital Elevation Model (DEM) heightmap of Mount St. Helens volcano | ||
|
||
--> | ||
<sdf version="1.9"> | ||
<world name="dem_heightmap"> | ||
<physics name="1ms" type="ignored"> | ||
<dart> | ||
<collision_detector>bullet</collision_detector> | ||
</dart> | ||
</physics> | ||
|
||
<gui fullscreen="0"> | ||
<plugin filename="MinimalScene" name="3D View"> | ||
<ignition-gui> | ||
<title>3D View</title> | ||
<property type="bool" key="showTitleBar">false</property> | ||
<property type="string" key="state">docked</property> | ||
</ignition-gui> | ||
|
||
<engine>ogre</engine> | ||
<scene>scene</scene> | ||
<ambient_light>0 0 0</ambient_light> | ||
<background_color>0.8 0.8 0.8</background_color> | ||
<camera_pose>-37.575569 82.272293 95.114960 0 0.566000 -0.981496</camera_pose> | ||
</plugin> | ||
|
||
<!-- Plugins that add functionality to the scene --> | ||
<plugin filename="EntityContextMenuPlugin" name="Entity context menu"> | ||
<ignition-gui> | ||
<property key="state" type="string">floating</property> | ||
<property key="width" type="double">5</property> | ||
<property key="height" type="double">5</property> | ||
<property key="showTitleBar" type="bool">false</property> | ||
</ignition-gui> | ||
</plugin> | ||
<plugin filename="GzSceneManager" name="Scene Manager"> | ||
<ignition-gui> | ||
<property key="resizable" type="bool">false</property> | ||
<property key="width" type="double">5</property> | ||
<property key="height" type="double">5</property> | ||
<property key="state" type="string">floating</property> | ||
<property key="showTitleBar" type="bool">false</property> | ||
</ignition-gui> | ||
</plugin> | ||
<plugin filename="InteractiveViewControl" name="Interactive view control"> | ||
<ignition-gui> | ||
<property key="resizable" type="bool">false</property> | ||
<property key="width" type="double">5</property> | ||
<property key="height" type="double">5</property> | ||
<property key="state" type="string">floating</property> | ||
<property key="showTitleBar" type="bool">false</property> | ||
</ignition-gui> | ||
</plugin> | ||
<plugin filename="CameraTracking" name="Camera Tracking"> | ||
<ignition-gui> | ||
<property key="resizable" type="bool">false</property> | ||
<property key="width" type="double">5</property> | ||
<property key="height" type="double">5</property> | ||
<property key="state" type="string">floating</property> | ||
<property key="showTitleBar" type="bool">false</property> | ||
</ignition-gui> | ||
</plugin> | ||
<plugin filename="WorldControl" name="World control"> | ||
<ignition-gui> | ||
<title>World control</title> | ||
<property type="bool" key="showTitleBar">false</property> | ||
<property type="bool" key="resizable">false</property> | ||
<property type="double" key="height">72</property> | ||
<property type="double" key="width">121</property> | ||
<property type="double" key="z">1</property> | ||
|
||
<property type="string" key="state">floating</property> | ||
<anchors target="3D View"> | ||
<line own="left" target="left"/> | ||
<line own="bottom" target="bottom"/> | ||
</anchors> | ||
</ignition-gui> | ||
|
||
<play_pause>true</play_pause> | ||
<step>true</step> | ||
<start_paused>true</start_paused> | ||
<use_event>true</use_event> | ||
|
||
</plugin> | ||
|
||
<plugin filename="WorldStats" name="World stats"> | ||
<ignition-gui> | ||
<title>World stats</title> | ||
<property type="bool" key="showTitleBar">false</property> | ||
<property type="bool" key="resizable">false</property> | ||
<property type="double" key="height">110</property> | ||
<property type="double" key="width">290</property> | ||
<property type="double" key="z">1</property> | ||
|
||
<property type="string" key="state">floating</property> | ||
<anchors target="3D View"> | ||
<line own="right" target="right"/> | ||
<line own="bottom" target="bottom"/> | ||
</anchors> | ||
</ignition-gui> | ||
|
||
<sim_time>true</sim_time> | ||
<real_time>true</real_time> | ||
<real_time_factor>true</real_time_factor> | ||
<iterations>true</iterations> | ||
</plugin> | ||
|
||
<plugin filename="ComponentInspector" name="Component inspector"> | ||
<ignition-gui> | ||
<property type="string" key="state">docked</property> | ||
</ignition-gui> | ||
</plugin> | ||
|
||
<plugin filename="EntityTree" name="Entity tree"> | ||
<ignition-gui> | ||
<property type="string" key="state">docked</property> | ||
</ignition-gui> | ||
</plugin> | ||
</gui> | ||
|
||
<light type="directional" name="sun"> | ||
<cast_shadows>true</cast_shadows> | ||
<pose>0 0 10 0 0 0</pose> | ||
<diffuse>0.8 0.8 0.8 1</diffuse> | ||
<specular>0.2 0.2 0.2 1</specular> | ||
<attenuation> | ||
<range>1000</range> | ||
<constant>0.9</constant> | ||
<linear>0.01</linear> | ||
<quadratic>0.001</quadratic> | ||
</attenuation> | ||
<direction>-0.5 0.1 -0.9</direction> | ||
</light> | ||
|
||
<model name="sphere"> | ||
<pose>0 15 70 0 0 0</pose> | ||
<link name="sphere_link"> | ||
<inertial> | ||
<inertia> | ||
<ixx>0.1</ixx> | ||
<ixy>0</ixy> | ||
<ixz>0</ixz> | ||
<iyy>0.1</iyy> | ||
<iyz>0</iyz> | ||
<izz>0.1</izz> | ||
</inertia> | ||
<mass>1.0</mass> | ||
</inertial> | ||
<collision name="sphere_collision"> | ||
<geometry> | ||
<sphere> | ||
<radius>2</radius> | ||
</sphere> | ||
</geometry> | ||
</collision> | ||
|
||
<visual name="sphere_visual"> | ||
<geometry> | ||
<sphere> | ||
<radius>2</radius> | ||
</sphere> | ||
</geometry> | ||
<material> | ||
<ambient>0 0 1 1</ambient> | ||
<diffuse>0 0 1 1</diffuse> | ||
<specular>0 0 1 1</specular> | ||
</material> | ||
</visual> | ||
</link> | ||
</model> | ||
|
||
<include> | ||
<uri> | ||
https://fuel.ignitionrobotics.org/1.0/jennuine/models/Volcano | ||
</uri> | ||
</include> | ||
</world> | ||
</sdf> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Any tips on how I would generate my own terrain DEM model? I don't see any docs added for the PR.
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.
Unfortunately, the only tutorial available is from gazebo-classic found here: https://classic.gazebosim.org/tutorials?tut=dem&cat=build_world
It is outdated but will hopefully get you in the right direction. If you'd like to contribute, feel free to open a PR for a newer tutorial on DEMs here: https://github.com/gazebosim/docs 😄