Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to Edifice: deprecation warnings #312

Closed
3 tasks done
diegoferigo opened this issue Mar 29, 2021 · 1 comment · Fixed by #321
Closed
3 tasks done

Bump to Edifice: deprecation warnings #312

diegoferigo opened this issue Mar 29, 2021 · 1 comment · Fixed by #321

Comments

@diegoferigo
Copy link
Collaborator

diegoferigo commented Mar 29, 2021

I'm opening this issue because the Ignition distribution of our next release will be Edifice (#307), supporting among other things sdformat11. There are some non-trivial changes we have to perform before sdformat12, and I'd rather be doing them now so that we can test them more thoroughly. There are also other deprecations we should take care of.

Side note: the new sdformat supports model composition (models inside models) and frame semantics. These features could greatly simplify i) creating from the API and ii) loading from file complex worlds. They are not currently supported by gym-ignition (or, better, it was never tested, and the result could be undefined). We should understand what's missing and, if it's not too demanding, add the support.

Warnings
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/World.cpp: In member function 'bool scenario::gazebo::World::insertModel(const string&, const scenario::core::Pose&, const string&)':
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/World.cpp:292:34: warning: 'uint64_t sdf::v11::Root::ModelCount() const' is deprecated [-Wdeprecated-declarations]
  292 |     if (modelSdfRoot->ModelCount() != 1) {
      |                                  ^
In file included from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/include/scenario/gazebo/helpers.h:49,
                 from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/World.cpp:33:
/usr/local/src/workspace/install/include/sdformat-11.0/sdf/Root.hh:136:22: note: declared here
  136 |     public: uint64_t ModelCount() const SDF_DEPRECATED(11.0);
      |                      ^~~~~~~~~~
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/World.cpp:306:69: warning: 'const sdf::v11::Model* sdf::v11::Root::ModelByIndex(uint64_t) const' is deprecated [-Wdeprecated-declarations]
  306 |         finalModelEntityName = modelSdfRoot->ModelByIndex(ModelIndex)->Name();
      |                                                                     ^
In file included from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/include/scenario/gazebo/helpers.h:49,
                 from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/World.cpp:33:
/usr/local/src/workspace/install/include/sdformat-11.0/sdf/Root.hh:143:31: note: declared here
  143 |     public: const sdf::Model *ModelByIndex(const uint64_t _index) const
      |                               ^~~~~~~~~~~~
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/World.cpp:325:66: warning: 'const sdf::v11::Model* sdf::v11::Root::ModelByIndex(uint64_t) const' is deprecated [-Wdeprecated-declarations]
  325 |     const_cast<sdf::Model*>(modelSdfRoot->ModelByIndex(ModelIndex))
      |                                                                  ^
In file included from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/include/scenario/gazebo/helpers.h:49,
                 from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/World.cpp:33:
/usr/local/src/workspace/install/include/sdformat-11.0/sdf/Root.hh:143:31: note: declared here
  143 |     public: const sdf::Model *ModelByIndex(const uint64_t _index) const
      |                               ^~~~~~~~~~~~
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/World.cpp:345:46: warning: 'const sdf::v11::Model* sdf::v11::Root::ModelByIndex(uint64_t) const' is deprecated [-Wdeprecated-declarations]
  345 |         modelSdfRoot->ModelByIndex(ModelIndex));
      |                                              ^
In file included from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/include/scenario/gazebo/helpers.h:49,
                 from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/World.cpp:33:
/usr/local/src/workspace/install/include/sdformat-11.0/sdf/Root.hh:143:31: note: declared here
  143 |     public: const sdf::Model *ModelByIndex(const uint64_t _index) const
      |                               ^~~~~~~~~~~~
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/World.cpp:354:50: warning: 'const sdf::v11::Model* sdf::v11::Root::ModelByIndex(uint64_t) const' is deprecated [-Wdeprecated-declarations]
  354 |             modelSdfRoot->ModelByIndex(ModelIndex)->Name();
      |                                                  ^
In file included from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/include/scenario/gazebo/helpers.h:49,
                 from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/World.cpp:33:
/usr/local/src/workspace/install/include/sdformat-11.0/sdf/Root.hh:143:31: note: declared here
  143 |     public: const sdf::Model *ModelByIndex(const uint64_t _index) const
      |                               ^~~~~~~~~~~~
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/helpers.cpp: In function 'bool scenario::gazebo::utils::renameSDFModel(sdf::v11::Root&, const string&, size_t)':
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/helpers.cpp:327:57: warning: 'uint64_t sdf::v11::Root::ModelCount() const' is deprecated [-Wdeprecated-declarations]
  327 |     const size_t initialNrOfModels = sdfRoot.ModelCount();
      |                                                         ^
In file included from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/include/scenario/gazebo/helpers.h:49,
                 from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/helpers.cpp:27:
/usr/local/src/workspace/install/include/sdformat-11.0/sdf/Root.hh:136:22: note: declared here
  136 |     public: uint64_t ModelCount() const SDF_DEPRECATED(11.0);
      |                      ^~~~~~~~~~
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/helpers.cpp:336:40: warning: 'const sdf::v11::Model* sdf::v11::Root::ModelByIndex(uint64_t) const' is deprecated [-Wdeprecated-declarations]
  336 |         sdfRoot.ModelByIndex(modelIndex)->Element()->GetFirstElement();
      |                                        ^
In file included from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/include/scenario/gazebo/helpers.h:49,
                 from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/helpers.cpp:27:
/usr/local/src/workspace/install/include/sdformat-11.0/sdf/Root.hh:143:31: note: declared here
  143 |     public: const sdf::Model *ModelByIndex(const uint64_t _index) const
      |                               ^~~~~~~~~~~~
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/helpers.cpp:346:64: warning: 'const sdf::v11::Model* sdf::v11::Root::ModelByIndex(uint64_t) const' is deprecated [-Wdeprecated-declarations]
  346 |     auto originalModelElement = sdfRoot.ModelByIndex(modelIndex)->Element();
      |                                                                ^
In file included from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/include/scenario/gazebo/helpers.h:49,
                 from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/helpers.cpp:27:
/usr/local/src/workspace/install/include/sdformat-11.0/sdf/Root.hh:143:31: note: declared here
  143 |     public: const sdf::Model *ModelByIndex(const uint64_t _index) const
      |                               ^~~~~~~~~~~~
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/helpers.cpp:353:28: warning: 'uint64_t sdf::v11::Root::ModelCount() const' is deprecated [-Wdeprecated-declarations]
  353 |     if (sdfRoot.ModelCount() != initialNrOfModels) {
      |                            ^
In file included from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/include/scenario/gazebo/helpers.h:49,
                 from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/helpers.cpp:27:
/usr/local/src/workspace/install/include/sdformat-11.0/sdf/Root.hh:136:22: note: declared here
  136 |     public: uint64_t ModelCount() const SDF_DEPRECATED(11.0);
      |                      ^~~~~~~~~~
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/helpers.cpp:358:46: warning: 'bool sdf::v11::Root::ModelNameExists(const string&) const' is deprecated [-Wdeprecated-declarations]
  358 |     if (!sdfRoot.ModelNameExists(newModelName)) {
      |                                              ^
In file included from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/include/scenario/gazebo/helpers.h:49,
                 from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/helpers.cpp:27:
/usr/local/src/workspace/install/include/sdformat-11.0/sdf/Root.hh:149:18: note: declared here
  149 |     public: bool ModelNameExists(const std::string &_name) const
      |                  ^~~~~~~~~~~~~~~
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/utils.cpp: In function 'std::string scenario::gazebo::utils::getModelNameFromSdf(const string&, size_t)':
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/utils.cpp:125:26: warning: 'uint64_t sdf::v11::Root::ModelCount() const' is deprecated [-Wdeprecated-declarations]
  125 |     if (root->ModelCount() == 0) {
      |                          ^
In file included from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/include/scenario/gazebo/helpers.h:49,
                 from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/utils.cpp:29:
/usr/local/src/workspace/install/include/sdformat-11.0/sdf/Root.hh:136:22: note: declared here
  136 |     public: uint64_t ModelCount() const SDF_DEPRECATED(11.0);
      |                      ^~~~~~~~~~
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/utils.cpp:130:40: warning: 'uint64_t sdf::v11::Root::ModelCount() const' is deprecated [-Wdeprecated-declarations]
  130 |     if (modelIndex >= root->ModelCount()) {
      |                                        ^
In file included from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/include/scenario/gazebo/helpers.h:49,
                 from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/utils.cpp:29:
/usr/local/src/workspace/install/include/sdformat-11.0/sdf/Root.hh:136:22: note: declared here
  136 |     public: uint64_t ModelCount() const SDF_DEPRECATED(11.0);
      |                      ^~~~~~~~~~
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/utils.cpp:132:73: warning: 'uint64_t sdf::v11::Root::ModelCount() const' is deprecated [-Wdeprecated-declarations]
  132 |                << " not found. The model has only " << root->ModelCount()
      |                                                                         ^
In file included from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/include/scenario/gazebo/helpers.h:49,
                 from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/utils.cpp:29:
/usr/local/src/workspace/install/include/sdformat-11.0/sdf/Root.hh:136:22: note: declared here
  136 |     public: uint64_t ModelCount() const SDF_DEPRECATED(11.0);
      |                      ^~~~~~~~~~
/home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/utils.cpp:137:41: warning: 'const sdf::v11::Model* sdf::v11::Root::ModelByIndex(uint64_t) const' is deprecated [-Wdeprecated-declarations]
  137 |     return root->ModelByIndex(modelIndex)->Name();
      |                                         ^
In file included from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/include/scenario/gazebo/helpers.h:49,
                 from /home/dferigo/git/gym-ignition/cpp/scenario/gazebo/src/utils.cpp:29:
/usr/local/src/workspace/install/include/sdformat-11.0/sdf/Root.hh:143:31: note: declared here
  143 |     public: const sdf::Model *ModelByIndex(const uint64_t _index) const
      |                               ^~~~~~~~~~~~
/home/dferigo/git/gym-ignition/cpp/scenario/plugins/Physics/Physics.cpp: In lambda function:
/home/dferigo/git/gym-ignition/cpp/scenario/plugins/Physics/Physics.cpp:1561:67: warning: 'ignition::physics::LinkPtr<PolicyT, FeaturesT> ignition::physics::FindFreeGroupFeature::FreeGroup<PolicyT, FeaturesT>::CanonicalLink() [with PolicyT = ignition::physics::FeaturePolicy<double, 3>; FeaturesT = scenario::plugins::gazebo::Physics::Impl::MinimumFeatureList; ignition::physics::LinkPtr<PolicyT, FeaturesT> = ignition::physics::EntityPtr<ignition::physics::Link<ignition::physics::FeaturePolicy<double, 3>, scenario::plugins::gazebo::Physics::Impl::MinimumFeatureList> >]' is deprecated [-Wdeprecated-declarations]
 1561 |                 this->linkEntityMap.find(freeGroup->CanonicalLink());
      |                                                                   ^
In file included from /usr/local/src/workspace/install/include/ignition/physics4/ignition/physics/FreeGroup.hh:214,
                 from /home/dferigo/git/gym-ignition/cpp/scenario/plugins/Physics/Physics.h:36,
                 from /home/dferigo/git/gym-ignition/cpp/scenario/plugins/Physics/Physics.cpp:18:
/usr/local/src/workspace/install/include/ignition/physics4/ignition/physics/detail/FreeGroup.hh:90:5: note: declared here
   90 |     FindFreeGroupFeature::FreeGroup<PolicyT, FeaturesT>::CanonicalLink()
      |     ^~~~~~~~~~~~~~~~~~~~
@diegoferigo
Copy link
Collaborator Author

Closed via #318 and #321.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant