Skip to content

Commit 6b77f1a

Browse files
committed
Merge branch 'new-psi-rules' of github.com:yantrabuddhi/ros-behavior-scripting into mrg
2 parents 3fd059a + 92540b5 commit 6b77f1a

File tree

5 files changed

+993
-3
lines changed

5 files changed

+993
-3
lines changed

src/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ INSTALL (FILES
77
# Install the Eva and Sophia config files; however, the scheme module
88
# will not load the config parameters -- that has to be done by hand.
99
INSTALL (FILES
10-
behavior.scm
10+
psi-behavior.scm
11+
# behavior.scm
1112
express.scm
1213
primitives.scm
1314
cfg-tools.scm

src/btree.scm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
(use-modules (opencog))
3030
(use-modules (opencog query)) ; XXX work-around relex2logic bug
3131

32+
(use-modules (opencog exec))
33+
(use-modules (opencog openpsi))
3234
; Start the cogsserver. It is used by the face-tracker to poke data
3335
; into the atomspace.
3436
(use-modules (opencog cogserver))

src/eva-behavior.scm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
(load "eva-behavior/cfg-eva.scm")
1717
(load "eva-behavior/express.scm")
1818
(load "eva-behavior/primitives.scm")
19-
(load "eva-behavior/behavior.scm")
19+
(load "eva-behavior/psi-behavior.scm")

src/primitives.scm

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
(use-modules (opencog) (opencog query) (opencog exec))
1515
(use-modules (opencog atom-types))
1616
(use-modules (opencog python))
17+
(use-modules (opencog openpsi))
1718

1819
; Try loading the python code from this directory;
1920
; else go for the install directory. This is kind-of hacky;
@@ -181,6 +182,16 @@ except:
181182
;; Main loop control
182183
(define do-run-loop #t)
183184

185+
;(define-public (behavior-tree-run)
186+
;"
187+
; behavior-tree-run
188+
189+
; Run the Eva behavior tree main loop (in a new thread),
190+
; Call (behavior-tree-halt) to exit the loop.
191+
;"
192+
; (set! do-run-loop #t)
193+
; (call-with-new-thread
194+
; (lambda () (cog-evaluate! (DefinedPredicateNode "main loop")))))
184195
(define-public (behavior-tree-run)
185196
"
186197
behavior-tree-run
@@ -190,7 +201,11 @@ except:
190201
"
191202
(set! do-run-loop #t)
192203
(call-with-new-thread
193-
(lambda () (cog-evaluate! (DefinedPredicateNode "main loop")))))
204+
(lambda () (cog-evaluate! (DefinedPredicateNode "main loop"))))
205+
(psi-run)
206+
;(while #t ((usleep 100000)(psi-step)) ) causes crash
207+
208+
)
194209

195210
(define-public (behavior-tree-halt)
196211
"

0 commit comments

Comments
 (0)