Skip to content

NavSat::ToElement() method (backport #1585)#1639

Merged
scpeters merged 1 commit intosdf15from
mergify/bp/sdf15/pr-1585
Apr 17, 2026
Merged

NavSat::ToElement() method (backport #1585)#1639
scpeters merged 1 commit intosdf15from
mergify/bp/sdf15/pr-1585

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Mar 3, 2026

🦟 Bug fix

Fixes #

Summary

sdf::NavSat didn't have a ToElement() method which prevent to convert sensor-specific information back to sdf format.

This PR include such changes:

  • Introduce sdf::NavSat::ToElement() method
  • Added this method call to dispatcher in Sensor::ToElement()
  • Also same dispatcher had misleading error msg: if user tried to convert sensor w/o sensor-specific information it will get error message about lack of this feature, but actually it's not correct. Dispatcher logic changed to avoid such misleading (split apart type check and pointer check)
  • And message was w/o trailing new_line symbol which makes console output harder to read
  • Added test for new ToElement() method; valgrind is happy
  • Couple of typos fixed

This PR was developed on top of sdf15 and retargeted to sdf16 due to sdf16 do not have dev packages.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • 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
  • Was GenAI used to generate this PR? If so, make sure to add "Generated-by" to your commits. (See this policy for more info.)

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


This is an automatic backport of pull request #1585 done by Mergify.

@mergify mergify Bot requested review from azeey and scpeters as code owners March 3, 2026 19:38
@mergify mergify Bot added the conflicts label Mar 3, 2026
@mergify
Copy link
Copy Markdown
Contributor Author

mergify Bot commented Mar 3, 2026

Cherry-pick of 8ccc60c has failed:

On branch mergify/bp/sdf15/pr-1585
Your branch is up to date with 'origin/sdf15'.

You are currently cherry-picking commit 8ccc60cd.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   include/sdf/Error.hh
	modified:   include/sdf/NavSat.hh
	modified:   src/Geometry.cc
	modified:   src/NavSat.cc
	modified:   src/NavSat_TEST.cc
	modified:   src/ScopedGraph.hh
	modified:   src/Sensor.cc

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/Surface.cc

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@github-actions github-actions Bot added the 🏛️ ionic Gazebo Ionic label Mar 3, 2026
@mergify mergify Bot mentioned this pull request Mar 3, 2026
9 tasks
`sdf::NavSat` didn't have a `ToElement()` method which prevent to convert sensor-specific information back to sdf format.

This PR include such changes:
* Introduce `sdf::NavSat::ToElement()` method
* Added this method call to dispatcher in `Sensor::ToElement()`
* Also same dispatcher had misleading error msg: if user tried to convert sensor w/o sensor-specific information it will get error message about lack of this feature, but actually it's not correct. Dispatcher logic changed to avoid such misleading (split apart type check and pointer check)
* And message was w/o trailing new_line symbol which makes console output harder to read
* Added test for new ToElement() method; valgrind is happy
* Couple of typos fixed

---------

Signed-off-by: Maksim Derbasov <ntfs.hard@gmail.com>
(cherry picked from commit 8ccc60c)
@scpeters scpeters force-pushed the mergify/bp/sdf15/pr-1585 branch from 32bf99d to 978a9a5 Compare April 17, 2026 21:16
@scpeters
Copy link
Copy Markdown
Member

I rebased and resolved conflicts

@github-project-automation github-project-automation Bot moved this from Inbox to In review in Core development Apr 17, 2026
@scpeters scpeters enabled auto-merge (rebase) April 17, 2026 21:43
@scpeters scpeters merged commit d488945 into sdf15 Apr 17, 2026
16 checks passed
@scpeters scpeters deleted the mergify/bp/sdf15/pr-1585 branch April 17, 2026 21:43
@github-project-automation github-project-automation Bot moved this from In review to Done in Core development Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏛️ ionic Gazebo Ionic

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants