-
Notifications
You must be signed in to change notification settings - Fork 39
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
Geospatial component for heightmap & DEMs #267
Conversation
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.
Great work! It would be good to test compiling a downstream library that uses heightmap against this branch to make sure all the includes are found and everything links correctly.
There are some CI failures, probably due to a different GDAL version on Bionic?
geospatial/src/Dem.cc
Outdated
math::SphericalCoordinates::Distance(upLeftLat, upLeftLong, | ||
lowLeftLat, lowLeftLong); | ||
try | ||
{ |
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 know this was ported straight from Gazebo classic, but can this try block be narrower, including just the lines that throw an exception?
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've gone ahead and removed the try/catch
block and replaced it with an error instead. Also, instead of continuing through the code, it returns when the error is reached 6f6769a
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.
yeah we had to throw an exception in gazebo11 since the GeoReference
method returned void
and its API was already frozen. I notice that you changed that API to return bool
in this PR, which is much better. 👍
geospatial/src/Dem.cc
Outdated
gzthrow("Illegal coordinates. You are asking for the elevation in (" << | ||
_x << "," << _y << ") but the terrain is [" << this->Width() << | ||
" x " << this->Height() << "]\n"); | ||
throw std::invalid_argument( |
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 should consider getting rid of these exceptions and printing errors instead. We don't throw exceptions often.
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've updated it to an error instead and am returning inf
if reached. What do you think? 6f6769a
Thanks for the review!
I was able to run
Yes, this is the likely cause but are we dropping Bionic support for Garden? |
Cool! So you updated all locally libraries to use
Ahh good call. I didn't realize that would bear fruit so early. We need to update CI |
Yup, specifically
Should I create an issue somewhere? |
I created some issues:
Also see #270 |
Signed-off-by: Jenn Nguyen <[email protected]>
Signed-off-by: Jenn Nguyen <[email protected]>
Signed-off-by: Jenn Nguyen <[email protected]>
I think it definitely makes sense to move |
That makes sense. @chapulina do you have any thoughts before I make the changes? |
I agree that requiring GDAL to use image heightmaps may be undesired, but when we have a The reason to add the I'm leaning towards being more semantically precise instead of trying to reduce the dependency surface for hypothetical users. |
I agree, I think this will avoid confusion for users. |
if users depend on the |
Ok, that's a good point, users currently depending on At least this PR is targeting |
so we should update the migration guide? |
That seems the most natural thing to me. When users update their |
Signed-off-by: Jenn Nguyen <[email protected]>
I have updated |
Signed-off-by: Ian Chen <[email protected]>
…-common into jennuine/geospatial
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.
One comment about error messages
Signed-off-by: Jenn Nguyen <[email protected]>
I think this will require an update to https://github.com/ignition-release/ign-common5-release when it is merged |
Please wait to merge, I may add a small update. |
Decided not to add the update. Going to merge. Thanks for the reviews! |
Follow-up to gazebosim/gz-common#267 Signed-off-by: Steve Peters <[email protected]>
This reverts commit 28eb6c7. Signed-off-by: Steve Peters <[email protected]>
* Revert "Move geospatial headers to subfolder (#289)" This reverts commit e0a5490. Signed-off-by: Steve Peters <[email protected]> * Revert "Geospatial component for heightmap & DEMs (#267)" This reverts commit 28eb6c7. Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Jenn Nguyen <[email protected]> Co-authored-by: Steve Peters <[email protected]> Co-authored-by: Ian Chen <[email protected]>
* geospatial component Follow-up to gazebosim/gz-common#267 Signed-off-by: Steve Peters <[email protected]> * Remove geospatial.hh from -core-dev package Signed-off-by: Steve Peters <[email protected]> * fix dependencies in control file Signed-off-by: Steve Peters <[email protected]> * common5-dev package depend on geospatial-dev Signed-off-by: Steve Peters <[email protected]>
🎉 New feature
Summary
gazebo11
except for DemTest.NegDem since Dem size is not computed correctly for extraterrestrial celestial bodies gazebo-classic#2881 is still an issue and will hopefully be resolved in a future PRTest it
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge