NavSat::ToElement() method
🦟 Bug fix
Fixes #<NUMBER>
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)
- [ ]
codecheckpassed (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.
Have you seen https://github.com/gazebosim/sdformat/pull/1538?
Have you seen #1538?
No
UPD: I tried to use python bindings to generate sdf files and got error msg, which bring me to missing implementation. Now I see this PR is duplicates implementation of already opened PR
Have you seen #1538?
What would you suggest to do in this case? Fortunately we rewrote sdf generation on a pure python and don't constrained by this PR, but I'd like to wrap up this topic in any way.