robotology / gym-ignition

Framework for developing OpenAI Gym robotics environments simulated with Ignition Gazebo

Home Page:https://robotology.github.io/gym-ignition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bump to Edifice: deprecation warnings

diegoferigo opened this issue · comments

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.

  • After gazebosim/sdformat#395, sdf::Root objects must wrap only a single model. (#321)
  • After gazebosim/gz-physics#234, the FindFreeGroupFeature changed and we should update the Physics system. (#318)
  • Related to the previous item, I would take advantage of this update to align the Physics system with upstream. (#318)

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()
      |     ^~~~~~~~~~~~~~~~~~~~

Closed via #318 and #321.