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

Same goal could be stored in KB multiple times #258

Open
dgerod opened this issue Jul 17, 2020 · 1 comment
Open

Same goal could be stored in KB multiple times #258

dgerod opened this issue Jul 17, 2020 · 1 comment
Assignees

Comments

@dgerod
Copy link
Contributor

dgerod commented Jul 17, 2020

It is possible to a set same goal in the KB in some situation, but it should not be as they should be unique.

In this case it works well:

object-at o=item_0 p=b1
object-at o=item_0 p=b1

The second goal is not stored in the KB. However, in case of:

object-at p=b1 o=item_0
object-at o=item_0 p=b1

Two goals are stored, the information stored in the KB is:

[knowledge_type: 1
initial_time: 
  secs: 0
  nsecs:         0
is_negative: False
instance_type: ''
instance_name: ''
attribute_name: "object-at"
values: 
  - 
    key: "p"
    value: "b1"
  - 
    key: "o"
    value: "item_0"
function_value: 0.0
optimization: ''
expr: 
  tokens: []
ineq: 
  comparison_type: 0
  LHS: 
    tokens: []
  RHS: 
    tokens: []
  grounded: False]
[knowledge_type: 1
initial_time: 
  secs: 0
  nsecs:         0
is_negative: False
instance_type: ''
instance_name: ''
attribute_name: "object-at"
values: 
  - 
    key: "o"
    value: "item_0"
  - 
    key: "p"
    value: "b1"
function_value: 0.0
optimization: ''
expr: 
  tokens: []
ineq: 
  comparison_type: 0
  LHS: 
    tokens: []
  RHS: 
    tokens: []
  grounded: False]

The number of repeated goals depends on the number of "values" of a knowledge item, in this example it is two.

This issue is related to #253 because it is not considering that the "values" of an knowledge item could be stored in a different order. But, here the fix should be done before storing the data in KB while in the other the fix should be done when data is retrieved from KB.

Although I have not checked predicates and others, I think that this situation happens to all them.

@dgerod dgerod changed the title It is possible to store same goal in KB multiple times, but it should not be. Same goal could be stored in KB multiple times Jul 17, 2020
@m312z
Copy link
Contributor

m312z commented Apr 1, 2021

In the knowledge comparitor I think we must have been lazy and assumed the ROS messages use the PDDL parameter order. We should check this.

Michael

@oscar-lima oscar-lima self-assigned this Apr 1, 2021
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