ipab-slmc / exotica

Extensible Optimization Framework
https://ipab-slmc.github.io/exotica
BSD 3-Clause "New" or "Revised" License
149 stars 70 forks source link

Python warning exotica/Frame: Ignoring property ... #719

Closed VladimirIvan closed 3 years ago

VladimirIvan commented 4 years ago

When loading extended Initializer types in python, exo.Setup.create_problem() prints "Ignoring property" warnings (also see #608 ), e.g.:

solver_config, problem_config = exo.Initializers.load_xml_full('{exotica_examples}/resources/configs/example_sphere_collision.xml')
problem = exo.Setup.create_problem(problem_config)

prints:

[EXOTica]: exotica/Frame: Ignoring property 'Group'
[EXOTica]: exotica/Frame: Ignoring property 'Radius'

This is most probably caused by casting the python dict types where they don't have to be cast. This may be unavoidable though. TODO: investigate.

The following code performs the initialization in c++ and doesn't print any warnings:

solver = exo.Setup.load_solver('{exotica_examples}/resources/configs/example_sphere_collision.xml')
problem = solver.get_problem()
wxmerkt commented 3 years ago

I believe this is due to this commit https://github.com/ipab-slmc/exotica/commit/1facf3320592b6cc0759f70759151844ccfbb525 which explicitly checks whether a property is part of a known initializer. Since SphereCollision and a few others locally change the type by explicit casting inside the task-maps for instance, this fails under the new behaviour.