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

Polyline geometry DOM #1000

Merged
merged 12 commits into from
Apr 26, 2022
Merged

Polyline geometry DOM #1000

merged 12 commits into from
Apr 26, 2022

Conversation

chapulina
Copy link
Contributor

@chapulina chapulina commented Apr 22, 2022

🎉 New feature

Summary

Expose polylines through the C++ API.

Polyline is different from other geometries because the user can specify more than one of them. So I'm proposing here an API that's slightly different and returns an std::vector<> as opposed to the raw pointers returned for the other geometries. The API will look slightly different from other geometries, but I think it would need to be different anyway.

Test it

See the added tests.

There's also this Gazebo PR:

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
@github-actions github-actions bot added Gazebo 1️1️ Dependency of Gazebo classic version 11 🏰 citadel Ignition Citadel labels Apr 22, 2022
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
@codecov-commenter
Copy link

codecov-commenter commented Apr 22, 2022

Codecov Report

Merging #1000 (51c7ead) into sdf9 (0f9b771) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             sdf9    #1000   +/-   ##
=======================================
  Coverage   43.47%   43.47%           
=======================================
  Files           1        1           
  Lines          23       23           
=======================================
  Hits           10       10           
  Misses         13       13           

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 0f9b771...51c7ead. Read the comment docs.

Signed-off-by: Louise Poubel <louise@openrobotics.org>
@scpeters
Copy link
Member

Polyline is different from other geometries because the user can specify more than one of them.

This is correct, but I noticed that the required attribute is 0 instead of * in the spec where the poly line is included:

I guess this shows that we aren't following that attribute very closely, but perhaps we can update the spec to match the actual usage? (ie. I'm suggesting we change the required value from 0 to * on that line and in the other sdf/1.* folders)

Signed-off-by: Louise Poubel <louise@openrobotics.org>
@chapulina
Copy link
Contributor Author

This is correct, but I noticed that the required attribute is 0 instead of * in the spec where the poly line is included:

I noticed that too. I think the required symbols can be a bit confusing, because * means "zero or more elements are required". I guess it would be clearer if it didn't have the word "required" 🤔

https://github.com/ignitionrobotics/sdformat/blob/12e77821af7c2810c4d9d532ee8cb833cbb8e318/include/sdf/Element.hh#L109-L113

@chapulina chapulina linked an issue Apr 22, 2022 that may be closed by this pull request
@chapulina
Copy link
Contributor Author

I think the required symbols can be a bit confusing,

I'm suggesting we change the required value from 0 to * on that line

@scpeters , after you read that issue, I'd appreciate some feedback on whether you still think we should go ahead with this or if we should improve those required symbols before making any large changes like that.

@scpeters
Copy link
Member

I think the required symbols can be a bit confusing,

I'm suggesting we change the required value from 0 to * on that line

@scpeters , after you read that issue, I'd appreciate some feedback on whether you still think we should go ahead with this or if we should improve those required symbols before making any large changes like that.

that's a fair point; let's not make any changes here to the spec

include/sdf/Polyline.hh Show resolved Hide resolved
include/sdf/Polyline.hh Outdated Show resolved Hide resolved
Signed-off-by: Louise Poubel <louise@openrobotics.org>
…t into chapulina/9/polylines

Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
@chapulina chapulina mentioned this pull request Apr 25, 2022
8 tasks
@chapulina chapulina added the MBARI buoy Sponsored by MBARI buoy sim project: https://github.com/osrf/buoy_sim label Apr 26, 2022
chapulina and others added 2 commits April 26, 2022 11:31
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Copy link
Member

@scpeters scpeters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed minor spelling error in 7a34fab; thanks for iterating, looks good

@chapulina chapulina enabled auto-merge (squash) April 26, 2022 21:01
@chapulina chapulina merged commit 52ce8fb into sdf9 Apr 26, 2022
@chapulina chapulina deleted the chapulina/9/polylines branch April 26, 2022 21:15
chapulina added a commit that referenced this pull request Apr 27, 2022
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Co-authored-by: Steve Peters <scpeters@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel Gazebo 1️1️ Dependency of Gazebo classic version 11 MBARI buoy Sponsored by MBARI buoy sim project: https://github.com/osrf/buoy_sim
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Load polylines into SDF DOM
4 participants