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

Using subtypes for domain predicates produces issues for sensing interface #251

Open
mdmdmd987 opened this issue Jun 23, 2020 · 1 comment
Assignees

Comments

@mdmdmd987
Copy link

mdmdmd987 commented Jun 23, 2020

Hi everyone,

I am currently trying to make use of the sensing interface in one of my projects. The problem is that I defined predicates which should work with several types and therefore defined them as sub-types as demonstrated in the following example:

(:types a b - a c - a)
(:predicates (pred1 ?x - a))

(:objects b1 - b c1 - c)

As described in Tutorial 11, I want to define my own "def pred1(msg, params)” function, which requires the usage of ‘*’ wildcards. However because I use the super-type in the predicates definition, params returns an empty list. I guess the problem is that the GetInstanceService is used to get hold of the instances (l. 154 in the ROSPlan/rosplan_sensing_interface/scripts/sensing_interface.py), which does not loop through sub-types.

Is this something you would like to include into ROSPlan?

Thank you and best regards,
Maxi

@m312z
Copy link
Contributor

m312z commented Apr 1, 2021

The issue is in the knowledge base. Types/supertypes are stored correctly, but at this line (of get instances) only the objects of the specific sub/super-type are returned.

iit = model_instances.find(req.type_name);

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

No branches or pull requests

3 participants