gazebosim / gazebosim/sdformat
Const accessors in sdformat.
- Dominant language
- C++
- Stars
- 216
- Forks
- 125
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 14
Description
**Original report ([archived issue](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/issues/188)) by Alejandro Castro (Bitbucket: [amcastro0622](https://bitbucket.org/%7Bf78f4af9-eed7-49c4-b222-5b3dc10d5093%7D/)).**
----------------------------------------
We had a [use case in our Drake code base](https://reviewable.io/reviews/robotlocomotion/drake/8828#-LD2bp_9--hRPdZXTAQL) in which we only needed const access to an `sdf::Element`. Right now the current API only offers `sdf::Element::GetElement()` which returns a mutable shared pointer to a mutable element object.
Ideally we'd also like having `const Element& GetElement(const std::string&)`.
Most likely similar const access would be needed in other places.
Contributor guide
Research direction
Start at the sdf::Element::GetElement() API described in the issue and inspect related accessors for places where const access is currently unavailable. Add the requested const Element& access and determine whether similar const accessors are needed elsewhere; done means const-only callers can access elements without mutable pointers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100