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

Error when Initialiser for non-existing class is generated #567

Open
christian-rauch opened this issue May 14, 2019 · 0 comments
Open

Error when Initialiser for non-existing class is generated #567

christian-rauch opened this issue May 14, 2019 · 0 comments

Comments

@christian-rauch
Copy link
Collaborator

If I created a task:

REGISTER_TASKMAP_TYPE("HeatMapScore", exotica::HeatMap);
class HeatMap : public TaskMap, public Instantiable<HeatMapInitializer> {
    ...
}

with

<class name="exotica/HeatMapScore" type="exotica::HeatMap" base_class_type="exotica::TaskMap">

and initialiser:

class HeatMap
extend <exotica_core/object>

It's impossible to create task exotica/HeatMapScore. It will fail with:

TypeError: create_problem(): incompatible function arguments. The following argument types are supported:
    1. (arg0: Initializer) -> exotica::PlanningProblem

Invoked with: ('exotica/UnconstrainedEndPoseProblem', {'PlanningScene': [('exotica/Scene', {...})], 'Maps': [('exotica/HeatMapScore', {'Name': 'HMS'})], 'Cost': [('exotica/Task', {'Task': 'HMS', 'Rho': '1'})], 'Name': 'problem'})

I.e. the initiliser must have the same name as the class that is registered with the class plugin system, no matter which one is used in the object inheritance.

There should be an error like:

Cannot create initializer for class HeatMap.
Available object classes are:
...
....
HeatMapScore
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant