Replace calls to Getlement with FindElement in examples#508
Merged
ahcorde merged 1 commit intogazebosim:mainfrom Mar 24, 2025
Merged
Replace calls to Getlement with FindElement in examples#508ahcorde merged 1 commit intogazebosim:mainfrom
ahcorde merged 1 commit intogazebosim:mainfrom
Conversation
ahcorde
requested changes
Mar 21, 2025
|
|
||
| // Load custom sensor params | ||
| auto customElem = _sdf.Element()->GetElement("gz:odometer"); | ||
| auto customElem = _sdf.Element()->FindElement("gz:odometer"); |
Contributor
There was a problem hiding this comment.
you should check here if customElem is different to nullptr
Suggested change
| auto customElem = _sdf.Element()->FindElement("gz:odometer"); | |
| auto customElem = _sdf.Element()->FindElement("gz:odometer"); | |
| if (customElem) | |
| { |
same below
Contributor
There was a problem hiding this comment.
actually there is a HasElement("gz:odometer") check above already so should be fine. Same for the one below.
Contributor
|
please fix DCO. Yu can find info here on how to fix DCO here: https://github.com/gazebosim/gz-sensors/pull/508/checks?check_run_id=39152245654 I'll wait until that's fixed before merging. |
iche033
approved these changes
Mar 21, 2025
…dometer.cc Signed-off-by: Nishu <nishanthravichandran12@gmail.com>
daa1891 to
879686d
Compare
ahcorde
approved these changes
Mar 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🦟 Bug fix
Fixes #502
Summary
Replaced calls to GetElement with FindElement in examples