strands-project / mongodb_store

MongoDB tools for storing and analysing runs of ROS systems.
BSD 3-Clause "New" or "Revised" License
49 stars 72 forks source link

Relating functions and predicates in PDDL #233

Closed NagaDinesh1194 closed 5 years ago

NagaDinesh1194 commented 5 years ago

Hi guys Iam new PDDL. So apologies if my question seems silly. I have robot which has to travel to destination through some waypoints. Iam able to create the waypoint and make the robot object traverse though it.

But i want to take it a step further and define the waypoints at particular coordinates. Ex: consider the the axis's of the field as LAT and LONG ... hence WP1 (waypoint) is at LAT=1 and LONG=0 ,,,or WP2 is at LAT=4 and LONG=5. And then ask the robot just to go to the waypoint.

Iam not sure as to what would be the correct logic to implement this. How do i achieve this using PDDL?

So far here is what i developed Domain file: (define (domain turtlebot) (:requirements :strips :typing :fluents) (:types waypoint robot coordinates ) (:predicates (robot_at ?v - robot ?wp - waypoint) (accessible ?v - robot ?wp1 ?wp2 - waypoint) ) (:functions (loc_lat ?lat - coordinates) (loc_long ?long - coordinates) ) (:action goto_waypoint :parameters (?v - robot ?from ?to - waypoint) :precondition (and (robot_at ?v ?from) (accessible ?v ?from ?to)) :effect (and (robot_at ?v ?to) (not (robot_at ?v ?from)) ) ))

Problem file: (define (problem task) (:domain turtlebot) (:objects wp0 wp1 wp2 wp3 - waypoint bunny - robot lat long - coordinates ) (:init (loc_of_waypoint wp0 ) (robot_at bunny wp3) (accessible bunny wp0 wp1) (accessible bunny wp1 wp2) (accessible bunny wp2 wp3) (accessible bunny wp3 wp0) ) (:goal (and (robot_at bunny wp2) ))) Thanks in advance

hawesie commented 5 years ago

This is in the wrong repo. You probably mean https://github.com/KCL-Planning/ROSPlan