-
Notifications
You must be signed in to change notification settings - Fork 342
Digital Elevation Model (DEM) tutorial #2985
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
base: gz-sim10
Are you sure you want to change the base?
Conversation
Signed-off-by: Jenn Nguyen <[email protected]>
Signed-off-by: Jenn Nguyen <[email protected]>
Signed-off-by: Jenn Nguyen <[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.
nice! I did a first pass review and added some comments
The Ubuntu github CI also picked up some minor lint issues.
|
||
Meshes were the format used for the [Darpa Subterranean Challenge (SubT) simulation](https://github.com/osrf/subt/wiki) | ||
and most were created from point cloud converted data (check out this [tutorial on how to convert point cloud data to a 3D mesh model for Gazebo](http://gazebosim.org/api/sim/10/pointcloud.html)). | ||
These heightmap meshes can be found [here on fuel](https://app.gazebosim.org/OpenRobotics/fuel/collections/SubT%20Tech%20Repo). |
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.
These heightmap meshes can be found [here on fuel](https://app.gazebosim.org/OpenRobotics/fuel/collections/SubT%20Tech%20Repo). | |
These heightmap meshes can be found [here on Fuel](https://app.gazebosim.org/OpenRobotics/fuel/collections/SubT%20Tech%20Repo). |
### Meshes | ||
|
||
Another format used for realistic topography are meshes, which are 3D polygonal models. | ||
The supported file formats for meshes in Gazebo are DAE, FBX, GLTF, OBJ, and STL. |
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 removed FBX because it's not very well tested in Gazebo
The supported file formats for meshes in Gazebo are DAE, FBX, GLTF, OBJ, and STL. | |
The supported file formats for meshes in Gazebo include DAE, GLTF, OBJ, and STL, and more. |
### Image heightmaps | ||
|
||
Image heightmaps use a 2D grayscale image, where each pixel coresponds to the elevation at that point. Black (or `0`) represents the lowest point and while (or `255`) represents the highest. | ||
This is a simple and efficient way to store elevation data because less memory compared to meshes and DEMs. |
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 is a simple and efficient way to store elevation data because less memory compared to meshes and DEMs. | |
This is a simple and efficient way to store elevation data because it can use less memory compared to meshes and DEMs. |
For fields like robotics, accurate topography can be beneficial for develop algorithms and/or models for autonomous navigation, motion planning, task planning, and control because they can provide cost effective, rapid development cycles. | ||
Engineers can develop and test algorithms in these environments before physical deployment. | ||
|
||
In this tutorial we'll dive deeper into what makes heightmaps, where to get them, and how to process them to use for simulation in modern Gazebo. |
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.
In this tutorial we'll dive deeper into what makes heightmaps, where to get them, and how to process them to use for simulation in modern Gazebo. | |
In this tutorial we'll dive deeper into what makes heightmaps, where to get them, and how to process them to use for simulation in Gazebo. |
|
||
## Gazebo's supported heightmap types | ||
|
||
Modern Gazebo supports image heightmaps, meshes, and Digital Elevation Models (DEMs). |
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.
Modern Gazebo supports image heightmaps, meshes, and Digital Elevation Models (DEMs). | |
Gazebo supports creating a terrain from image heightmaps, meshes, and Digital Elevation Models (DEMs). |
* If the Processing Toolbox panel isn't open, click the gear icon in the top toolbar | ||
|
||
* Search for "Clip raster by extent" and double click to open the dialog | ||
* Input layer: should be the imported geotif |
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.
capitalized for consistency
* Input layer: should be the imported geotif | |
* Input layer: should be the imported GeoTiff |
<visual name="visual"> | ||
<geometry> | ||
<heightmap> | ||
<use_terrain_paging>false</use_terrain_paging> |
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.
we can remove this line as it's no longer used
<use_terrain_paging>false</use_terrain_paging> |
</model> | ||
``` | ||
|
||
Launch Gazebo and it should look something like this: |
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.
Add some instructions?
I think the users will need to be in the half_dome_example
for the textures to load
cd tutorials/files/digital_elevation_models/half_dome_example
gz sim -v 4 half_dome.sdf
<visual name="visual"> | ||
<geometry> | ||
<heightmap> | ||
<use_terrain_paging>false</use_terrain_paging> |
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.
no longer necessary
<use_terrain_paging>false</use_terrain_paging> |
<diffuse>materials/textures/rocks_diffuse.png</diffuse> | ||
<normal>materials/textures/rocks_normal.png</normal> |
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 these are placed in the textures
directory (no parent materials
dir) inside half_dome_example
. So we probably needs to either:
- update these to
textures/rocks_diffuse.png
, or - add a parent
materials
directory
🎉 New feature
Summary
Tutorial on preparing DEMs and using them in Gazebo.
Test it
Checklist
codecheck
passed (See contributing)Generated-by: Remove this if GenAI was not used.
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
andGenerated-by
messages.