diff --git a/src/systems/set_model_state/SetModelState.cc b/src/systems/set_model_state/SetModelState.cc index 5a8a25817c..1451cd992a 100644 --- a/src/systems/set_model_state/SetModelState.cc +++ b/src/systems/set_model_state/SetModelState.cc @@ -67,9 +67,7 @@ void SetModelState::Configure(const Entity &_entity, return; } - auto sdfClone = _sdf->Clone(); - - auto modelStateElem = sdfClone->FindElement("model_state"); + auto modelStateElem = _sdf->FindElement("model_state"); if (!modelStateElem) { gzerr << "No specified; the model state is unchanged.\n"; @@ -113,7 +111,7 @@ void SetModelState::Configure(const Entity &_entity, std::vector jointVelocity; auto parseScalarWithDegrees = - [](math::Angle &_scalar, sdf::ElementPtr _elem) -> bool + [](math::Angle &_scalar, sdf::ElementConstPtr _elem) -> bool { if (_elem) {