Beispiel #1
0
    def post(self, *args):
        #inp = self.get_argument('data')
        dta = json.loads(self.request.body)
        start = dta['start']
        goal = dta['goal']
        s = gsp.state_2_conjunct(start)
        g = gsp.state_2_conjunct(goal)
        print "BLOCKSLIST", gsp.generate_and_set_blocks_list(start)
        #print gsp.blockList
        ps = gsp.gsp_recursive(s, g, [])
        states_list = None
        if ps:
            plan, state = ps
            states_list = gsp.plan_to_states_list(plan, s)
        else:
            states_list = []
        response = json.dumps(states_list)

        #self.write({"Response":"Done"})
        self.write(response)
        self.finish()
Beispiel #2
0
 def post(self, *args):
     #inp = self.get_argument('data')
     dta = json.loads(self.request.body)
     start = dta['start']
     goal = dta['goal']
     s = gsp.state_2_conjunct(start)
     g = gsp.state_2_conjunct(goal)
     print "BLOCKSLIST", gsp.generate_and_set_blocks_list(start)
     #print gsp.blockList
     ps = gsp.gsp_recursive(s, g, [])
     states_list = None
     if ps:
         plan, state = ps
         states_list = gsp.plan_to_states_list(plan, s)
     else:
         states_list = []
     response = json.dumps(states_list)
     
     
     #self.write({"Response":"Done"})
     self.write(response)
     self.finish()
Beispiel #3
0
import gsp
import json
import sys

print json.dumps(gsp.ss)
sys.exit()

s, g = gsp.state_2_conjunct(gsp.ss), gsp.state_2_conjunct(gsp.gg)
plan, state = gsp.gsp_recursive(s, g, [])
state = gsp.conjunct_2_state(state)

print state