Loading new domain in ROSPlan

50 views
Skip to first unread message

Gabriele Sartor

unread,
Mar 27, 2019, 9:02:19 AM3/27/19
to ROSPlan
Hi guys,

if I understand correctly, in ROSPlan there is a service (/rosplan_knowledge_base/clear)  that removes the information related to the planning problem (problem.pddl) as well as another service (/rosplan_knowledge_base/update) that adds new goals and information about the current state.

Does ROSPlan have a similar service that allows to make modifications to the planning domain (domain.pddl) as well?

After a quick inspection of the code it seems that the domain is loaded when the KB's node starts, and it can't be "touched" again afterwards.

Thank you in advance for your answers!
Gabriele

Michael Cashmore

unread,
Mar 29, 2019, 5:29:34 AM3/29/19
to ROSPlan
Your inspection is correct. Currently the domain is fixed in the knowledge base. In order to load a different domain, it would be necessary to launch a new KB node.

In theory it should not be so hard to add new services to allow for modification of the domain. However, at the moment we use VAL to parse, validate, and store the domain structure. In order to modify it online I think it would be necessary to at least store it in an external data structure, in the same way as we do the state.

Best regards,
Michael

Gabriele Sartor

unread,
Mar 29, 2019, 6:26:15 AM3/29/19
to ROSPlan
Hi Michael, thank you for your prompt answer!


In your opinion, would it be a sufficiently "clean" solution to add the parameter respawn="true" in the launch file of the rosplan_knowledge_base node, and kill the node when the domain is updated?

If I understand correctly, in this way, when the node is killed its process would be created again, reading the new domain.pddl. But would the data of the previous knowledge base be cleanly overwritten by the new model, or do you foresee any inconsistency/instability?


Thank you very much


Gabriele

Michael Cashmore

unread,
Apr 1, 2019, 5:09:01 AM4/1/19
to ROSPlan
Hello Gabriele,

That sounds like it would probably work.

Some things to note:
1. The state would also need to be reloaded (and the representation might be different, depending on how you are changing the domain.)
2. If you are using them, the knowledge base keeps track of timed initial literals, and those will be cleaned out as well (and will need to be reloaded with correct times.)
3. Any already-generated problems and plans might no longer be valid with respect to the domain.
4. Action interfaces, which handle state-update in stead of some sensing nodes may also need to be relaunched to re-read the domain details for their PDDL operator.

I think 1&2 are probably of least concern to you.
3 should be OK, as long as you are careful how the rest of the system is used.
4 might cause strange effects (like new action effects not being applied to the state after the domain is relaunched.)

Best regards,
Michael

Gabriele Sartor

unread,
Apr 1, 2019, 8:36:29 AM4/1/19
to ROSPlan
Hi Michael,
thank you for your answer, it will be very useful!

Best regards,
Gabriele
Reply all
Reply to author
Forward
0 new messages