Code Monkey home page Code Monkey logo

ros-behavior-scripting's Introduction

Eva Robot ROS Sensory+Motor API

This repo contains ROS nodes for sensory input (vision, audio) and motor movements for the Hanson Robotics Eva robot. Previously, this repo used to contain more of the subsystem, but all of that code has been moved to the main OpenCog repo:

https://github.com/opencog/opencog/tree/master/opencog/eva

What is left here is an assortment of ROS nodes that subscribe to ROS visual and audio sensory inputs, and forward these to the OpenCog spactime server (performing the needed format conversion).

Design goals

Provide a convenient, flexible interface between ROS and the OpenCog servers.

Current Architecture and Design

At this time, the code here provides a perception subsystem:

  • Several ROS nodes that forward visual and sound data to the OpenCog spacetime server. This includes 3D locations of visible faces, the names of any recognized faces (as recognized by some external software), the direction from which sounds are coming from, and audio-power samples.

    (This needs to be replaced by a (much) better visual system.)

Some things it currently doesn't do, but should:

  • Integrate superior face-tracking and face recognition tools. Right now, the face tracker is recognizes known faces only with difficulty.

  • Additional sensory systems and sensory inputs. A perception synthesizer to coordinate all sensory input. High priority:

++ Audio power envelope (half-done, see sensors/audio_power.py), fundamental frequency (of voice), rising/falling tone. Background audio power. Length of silent pauses. Detection of applause, laughter, loud voices in the background, loud bangs.

++ Video-chaos: Is it light or dark? Is there lots of random motion in the visual field, or are things visually settled?

Status

It works and is in regular (daily) use (2015, 2016, 2017...).

Setup

Initial setup, only needed to be run once.

bash scripts/setup.sh

Install

Run the following commands.

bash scripts/install.sh

Running

Run the following commands.

bash scripts/run.sh <robot-name>

could be han or sophia10

TODO

  • Need major overhaul of the time-space server API's. Need to be able to query them with pattern matcher
  • Need to create time-query atoms
  • Need to place sound-source direction into the space-server. (i.e. currently in time-map.scm map-sound)

ros-behavior-scripting's People

Contributors

amebel avatar bgoertzel avatar eddiemonroe avatar leungmanhin avatar linas avatar misgeatgit avatar ngeiswei avatar vytasrgl avatar wenwei-dev avatar yantrabuddhi avatar yenat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ros-behavior-scripting's Issues

Got error when running the behavior scripts with the latest opencog code

This is the error we got when running the behavior scripts with the latest cogutils, atomspace and opencog code:

----- Behavior pub: Waking up
scheme@(guile-user)> Publish soma state: normal intensity: 0.1
Backtrace:
In ice-9/boot-9.scm:
 157: 2 [catch #t #<catch-closure 1cec2c0> ...]
In unknown file:
   ?: 1 [apply-smob/1 #<catch-closure 1cec2c0>]
   ?: 0 [opencog-extension cog-evaluate! ((DefinedPredicateNode "main loop")
)]

ERROR: In procedure opencog-extension:
ERROR: Throw to key `C++-EXCEPTION' with args `("cog-evaluate!" "Expecting a number, got this: (GetLink\n  (VariableNode \"$int-min\") ; [1449][1]\n  (StateLink\n    (ListLink\n      (ConceptNode \"wake-up\") ; [609][1]\n      (SetLink\n        (ListLink\n          (NumberNode \"0.600000\") ; [475][1]\n          (ConceptNode \"happy\") ; [513][1]\n        ) ; [3838][1]\n        (ListLink\n          (NumberNode \"0.100000\") ; [572][1]\n          (ConceptNode \"irritated\") ; [635][1]\n        ) ; [3839][1]\n        (ListLink\n          (NumberNode \"0.300000\") ; [490][1]\n          (ConceptNode \"surprised\") ; [446][1]\n        ) ; [3840][1]\n      ) ; [3841][1]\n      (SchemaNode \"duration-min\") ; [460][1]\n    ) ; [18446744073709551615][18446744073709551615]\n    (VariableNode \"$int-min\") ; [1449][1]\n  ) ; [18446744073709551615][18446744073709551615]\n) ; [18446744073709551615][18446744073709551615]\n (/home/mh/hansonrobotics/opencog/atomspace/opencog/atoms/core/RandomNumber.cc:84)")'.

Problem with synchronizing the weights of the psi-controlled-rules?

When refactoring the opencog-wholeshow code, a problem surfaced that keeps assigning incorrect weights to different psi-controlled-rules. For example when we are in the PLN demo mode, it's expected that only the PLN related psi-controlled-rules will have a non-zero weight, but that it's not always the case. This happens in other situations as well

random exception (StateLink race)

ERROR: In procedure opencog-extension:
ERROR: Throw to key `C++-EXCEPTION' with args `("cog-evaluate!" "Backtrace:\n
In ice-9/boot-9.scm:\n
 157: 16 [catch #t #<catch-closure 391bf80> ...]\n
In unknown file:\n
   ?: 15 [apply-smob/1 #<catch-closure 391bf80>]\n
   ?: 14 [opencog-extension cog-evaluate! ((DefinedPredicateNode \"OpenPsi: loop\")\n)]\n
In ice-9/boot-9.scm:\n
 157: 13 [catch #t #<catch-closure 11facc0> ...]\n
In unknown file:\n
   ?: 12 [apply-smob/1 #<catch-closure 11facc0>]\n
In ice-9/boot-9.scm:\n
 157: 11 [catch #t #<catch-closure 11fab40> ...]\n
In unknown file:\n
   ?: 10 [apply-smob/1 #<catch-closure 11fab40>]\n
In opencog/openpsi/main.scm:\n
 126: 9 [psi-step]\nIn srfi/srfi-1.scm:\n
 576: 8 [map #<procedure 11fa5a0 at opencog/openpsi/main.scm:127:8 (d)> (# # # ...)]\n
In opencog/openpsi/main.scm:\n 134: 7 [#<procedure 11fa5a0 at opencog/openpsi/main.scm:127:8 (d)> #]\n
In opencog/openpsi/action-selector.scm:\n
 239: 6 [default-per-demand-action-selector #]\n
In unknown file:\n
   ?: 5 [filter #<procedure 11b4100 at opencog/openpsi/rule.scm:387:8 (x)> #]\n
In opencog/openpsi/rule.scm:\n
 347: 4 [is-satisfiable? #]\n
 334: 3 [psi-satisfiable? #]\n
In unknown file:\n
   ?: 2 [opencog-extension cog-evaluate! (#)]\n
In ice-9/boot-9.scm:\n
 102: 1 [#<procedure 1e61d00 at ice-9/boot-9.scm:97:6 (thrown-k . args)> C++-EXCEPTION ...]\n
In unknown file:\n
   ?: 0 [apply-smob/1 #<catch-closure 11fab00> C++-EXCEPTION ...]\n
\n
ERROR: In procedure apply-smob/1:\n
ERROR: In procedure cog-evaluate!: Don't know how to do arithmetic with this: (SetLink\n) ; [9223565550901260237][0]\n
 (/home/hr/hansonrobotics/opencog/atomspace/opencog/atoms/execution/EvaluationLink.cc:86)\n
ABORT: C++-EXCEPTION\n
 (/home/hr/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:1226)")'.

Implement rules for combining saliency detection with face tracking

  • We want to distinguish “salient face events” from “salient non-face events" so, then, if there are no faces present, the behavior can be just to do saliency tracking and look around at salient events.

  • At the moment the system cannot recognize anything but faces — when we integrate object recognition software, then maybe it should have some tendency to look at objects it can recognize, as well as the tendency to look at salient stuff. But if there are faces present, then in general the face-tracking behavior should overrule the saliency tracking, unless something REALLY salient pops up.

  • When we make the statement “Han, look at this!” (or in general "ROBOTNAME, look at this!”) cause it to temporarily prioritize looking at salient events nearby the robot. And, “Look at that!” cause it to temporarily prioritize looking at salient events anywhere.

netcat still times out in face_atomic.py

In face track if I update cogserver at 30 hz or 15 hz, netcat starts blocking and times out. I tries doing this by also just sending "(ConceptNode "12345678")" at 15 hz and it still causes netcat to time out and btree to stop

Segmentation fault when attempting to interact with the REST server in private_ws

A segfault is happening when attempting to interact with the REST server in the private_ws hanson stack. Here is how to reproduce it.

  • Run the private_ws hanson stack
  • Enter to the python shell and load the restapi server by typing the following commands
import web.api.restapi
web.api.restapi.Start().run(None, ATOMSPACE)
  • Now, go to your browser or other http client and type the following GET request
   http://localhost:5000/api/v1.1/atoms? 

OR anyother supported request and you should see a segfault.

NOTE: The REST server works fine when run with bare opencog system. i.e no btree...etc
Below is a stack trace of the segfault.

#0  0x00007fa5da75c8c5 in opencog::AtomTable::getHandlesByType<std::back_insert_iterator<std::vector<opencog::Handle, std::allocator<opencog::Handle> > > >(std::back_insert_iterator<std::vector<opencog::Handle, std::allocator<opencog::Handle> > >, unsigned short, bool, bool) const [clone .local.32] (this=0x0, result=..., result@entry=..., type=type@entry=4, subclass=<optimized out>, 
    parent=parent@entry=true) at /home/mandeep/hr/opencog/atomspace/opencog/atomspace/AtomTable.h:220
#1  0x00007fa5da75319c in get_handles_by_type (this=<optimized out>, result=..., type=<optimized out>, subclass=<optimized out>) at /home/mandeep/hr/opencog/atomspace/opencog/atomspace/AtomSpace.h:494
#2  __pyx_pf_7opencog_9atomspace_9AtomSpace_30get_atoms_by_type (__pyx_v_subtype=<optimized out>, __pyx_v_t=4, __pyx_v_self=0x7fa5e803a0b0)
    at /home/mandeep/hr/opencog/atomspace/build/opencog/cython/opencog/atomspace.cpp:5682
#3  __pyx_pw_7opencog_9atomspace_9AtomSpace_31get_atoms_by_type(_object*, _object*, _object*) [clone .14797] (__pyx_v_self=0x7fa5e803a0b0, __pyx_args=<optimized out>, __pyx_kwds=<optimized out>)
    at /home/mandeep/hr/opencog/atomspace/build/opencog/cython/opencog/atomspace.cpp:5646
#4  0x00007fa5df7f30d4 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#5  0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#6  0x00007fa5df7f2dd8 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#7  0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#8  0x00007fa5df8297a5 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#9  0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#10 0x00007fa5df7ef3b1 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#11 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#12 0x00007fa5df8297a5 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#13 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#14 0x00007fa5df7ef3b1 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#15 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#16 0x00007fa5df8297a5 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#17 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#18 0x00007fa5df7ef3b1 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#19 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#20 0x00007fa5df8297a5 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#21 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#22 0x00007fa5df7ef3b1 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#23 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#24 0x00007fa5df8297a5 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#25 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#26 0x00007fa5df7ef3b1 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#27 0x00007fa5df7f3059 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#28 0x00007fa5df7f3059 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#29 0x00007fa5df7f3059 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#30 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#31 0x00007fa5df8296d0 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#32 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#33 0x00007fa5df7217bd in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#34 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#35 0x00007fa5df79a7e5 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#36 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#37 0x00007fa5df7f0816 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#38 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#39 0x00007fa5df7f2dd8 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#40 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#41 0x00007fa5df7f2dd8 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#42 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#43 0x00007fa5df7f2dd8 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#44 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#45 0x00007fa5df8296d0 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#46 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#47 0x00007fa5df7217bd in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#48 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#49 0x00007fa5df7f0816 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#50 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#51 0x00007fa5df7f2dd8 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#52 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#53 0x00007fa5df8296d0 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#54 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#55 0x00007fa5df7217bd in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#56 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#57 0x00007fa5df79a67f in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#58 0x00007fa5df79868f in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#59 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#60 0x00007fa5df7f0816 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#61 0x00007fa5df7f3059 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#62 0x00007fa5df7f3059 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#63 0x00007fa5df7f3059 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#64 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#65 0x00007fa5df8296d0 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#66 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#67 0x00007fa5df7217bd in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#68 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#69 0x00007fa5df7f0816 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#70 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#71 0x00007fa5df7f2dd8 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#72 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#73 0x00007fa5df7f2dd8 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#74 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#75 0x00007fa5df8297a5 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#76 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#77 0x00007fa5df7ef3b1 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#78 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#79 0x00007fa5df7f2dd8 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#80 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#81 0x00007fa5df7f2dd8 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#82 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#83 0x00007fa5df8297a5 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#84 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#85 0x00007fa5df7ef3b1 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#86 0x00007fa5df7f3059 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#87 0x00007fa5df7f3059 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#88 0x00007fa5df7f454d in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#89 0x00007fa5df8296d0 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#90 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#91 0x00007fa5df7217bd in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#92 0x00007fa5df795d43 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#93 0x00007fa5df80e577 in PyEval_CallObjectWithKeywords () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#94 0x00007fa5df776f92 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#95 0x00007fa5f1056182 in start_thread (arg=0x7fa4ab7f6700) at pthread_create.c:312
#96 0x00007fa5f0d8347d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
=======================
0x00007fa5da75c8c5 in opencog::AtomTable::getHandlesByType<std::back_insert_iterator<std::vector<opencog::Handle, std::allocator<opencog::Handle> > > >(std::back_insert_iterator<std::vector<opencog::Handle, std::allocator<opencog::Handle> > >, unsigned short, bool, bool) const [clone .local.32] (this=0x0, result=..., result@entry=..., type=type@entry=4, subclass=<optimized out>, 
    parent=parent@entry=true) at /home/mandeep/hr/opencog/atomspace/opencog/atomspace/AtomTable.h:220
220         if (parent && _environ)

Unbound variable "chat-state"

Run this to reproduce the error
rostopic pub -1 /robot/speech_events std_msgs/String "start"

ERROR: In procedure apply-smob/1:
ERROR: Unbound variable: chat-state
ABORT: unbound-variable

pull req #91 broke something.

After merging pull req #91, I get the following being printed, as fast as possible, when I run

guile -l btree-psi.scm

This:

(Eva expresses amused emotion for 3.0 seconds, with intensity 0.5 )
(Eva expresses amused emotion for 3.0 seconds, with intensity 0.5 )
(Eva expresses amused emotion for 3.0 seconds, with intensity 0.5 )
(Eva expresses amused emotion for 3.0 seconds, with intensity 0.5 )
(Eva expresses amused emotion for 3.0 seconds, with intensity 0.5 )

which clearly comes from this:
https://github.com/yenat/ros-behavior-scripting/blob/117954b7e4301223d6bf8c9997e99c0025d1364f/src/orchestrate.scm#L235-L249

I will try to disable this

Close eyes during sleep

There is a sleep sequence, where, if the room is empty, and she is bored for long enough, she falls asleep. However, there does not seem to be any close-the-eyelids animation to go with this. This needs fixing.

Another segfault

Similar to #98 but with a different backtrace, gdb stops responding after printing these:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `guile -l btree-psi.scm'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007feedcc7c68d in std::_Hashtable<unsigned long, std::pair<unsigned long const, opencog::Handle>, std::allocator<std::pair<unsigned long const, opencog::Handle> >, std::__detail::_Select1st, std::equal_to<unsigned long>, std::hash<unsigned long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node(unsigned long, unsigned long const&, unsigned long) const [clone .isra.448] (__k=<optimized out>, __n=<optimized out>, 
    this=<optimized out>) at /usr/include/c++/4.8/bits/hashtable.h:1159
1159          __node_base* __prev_p = _M_buckets[__n];
(gdb) bt
#0  0x00007feedcc7c68d in std::_Hashtable<unsigned long, std::pair<unsigned long const, opencog::Handle>, std::allocator<std::pair<unsigned long const, opencog::Handle> >, std::__detail::_Select1st, std::equal_to<unsigned long>, std::hash<unsigned long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node(unsigned long, unsigned long const&, unsigned long) const [clone .isra.448] (__k=<optimized out>, __n=<optimized out>, 
    this=<optimized out>) at /usr/include/c++/4.8/bits/hashtable.h:1159
#1  _M_find_node (this=<optimized out>, __bkt=<optimized out>, __key=<optimized out>, 
    __c=<optimized out>) at /usr/include/c++/4.8/bits/hashtable.h:604

Fail to run `psi-step` manually

After starting the whole stack, telnet to cogserver and then execute (psi-step) (or if the psi-loop has been started, run (psi-halt) followed by (psi-step)), it will crash:

terminate called after throwing an instance of 'opencog::AssertionException'
  what():   (/home/manhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:686)
/home/manhin/hansonrobotics/private_ws/scripts/btree.sh: line 20: 32601 Aborted                 (core dumped) $cmd

and found these in the log:

[2017-02-06 09:11:14:938] [INFO] [OpenPsi] Taking one psi-step, loop-count = 251
[2017-02-06 09:11:14:948] [ERROR] Python error in ros_is_running: maximum recursion depth exceeded while calling a Python object. (/home/manhin/hansonrobotics/opencog/atomspace/opencog/cython/PythonEval.cc:824)
	Stack Trace:
	2: basic_string.h:293	  std::string::_M_data() const
	3: Logger.cc:493	  opencog::Logger::Error::operator()(char const*, ...)
	4: exceptions.cc:55	  opencog::StandardException::parse_error_message(char const*, __va_list_tag*, bool)
	5: exceptions.cc:81	  opencog::StandardException::parse_error_message(char const*, char const*, __va_list_tag*, bool)
	6: exceptions.cc:150	  opencog::RuntimeException::RuntimeException(char const*, char const*, ...)
	7: PythonEval.cc:824	  opencog::PythonEval::call_user_function(std::string const&, opencog::Handle)
	8: shared_ptr_base.h:545	__base_dtor ()
	9: basic_string.h:539	  std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
	10: shared_ptr_base.h:545	__base_dtor ()
	11: EvaluationLink.cc:453	  opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool)
	12: EvaluationLink.cc:283	  opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool)
	13: shared_ptr_base.h:545	__base_dtor ()
	14: EvaluationLink.cc:483	  opencog::EvaluationLink::do_evaluate(opencog::AtomSpace*, opencog::Handle const&, bool)
	15: ExecSCM.cc:42	_ZL11ss_evaluatePN7opencog9AtomSpaceERKNS_6HandleE.84716()
	16: SchemeModule.cc:55	  opencog::FunctionWrap::as_wrapper_p_h(opencog::Handle)
	17: shared_ptr_base.h:545	__base_dtor ()
	18: SchemePrimitive.cc:162	  opencog::PrimitiveEnviron::do_call(scm_unused_struct*, scm_unused_struct*)
	19: ??:0	scm_vm_engine()
	20: ??:0	scm_call_1()
	21: ??:0	scm_filter()
	22: ??:0	scm_vm_engine()
	23: ??:0	scm_call_1()
	24: ??:0	scm_vm_engine()
	25: ??:0	scm_call_3()
	26: ??:0	scm_vm_engine()
	27: ??:0	scm_call_4()
	28: SchemeEval.cc:565	  opencog::SchemeEval::do_eval(std::string const&)
	29: SchemeEval.h:168	eval()
	30: basic_string.h:583	  std::string::operator=(std::string&&)
	31: ??:0	PyEval_EvalFrameEx()
	32: ??:0	PyEval_EvalFrameEx()
	33: ??:0	PyEval_EvalFrameEx()
	34: ??:0	PyEval_EvalCodeEx()
	35: ??:0	initcPickle()
	36: ??:0	PyObject_Call()
	37: ??:0	PyEval_CallObjectWithKeywords()
	38: PythonEval.cc:815	  opencog::PythonEval::call_user_function(std::string const&, opencog::Handle)
	39: shared_ptr_base.h:545	__base_dtor ()
	40: basic_string.h:539	  std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
	41: shared_ptr_base.h:545	__base_dtor ()
	42: EvaluationLink.cc:483	  opencog::EvaluationLink::do_evaluate(opencog::AtomSpace*, opencog::Handle const&, bool)
	43: shared_ptr_base.h:545	__base_dtor ()
	44: Instantiator.cc:475	  opencog::Instantiator::instantiate(opencog::Handle const&, std::map<opencog::Handle, opencog::Handle, std::less<opencog::Handle>, std::allocator<std::pair<opencog::Handle const, opencog::Handle> > > const&)
	45: stl_tree.h:671	__base_dtor ()
	46: EvaluationLink.cc:403	  opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool)
	47: EvaluationLink.cc:314	  opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool)
	48: EvaluationLink.cc:453	  opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool)
	49: EvaluationLink.cc:483	  opencog::EvaluationLink::do_evaluate(opencog::AtomSpace*, opencog::Handle const&, bool)

[2017-02-06 09:11:15:180] [ERROR] Scheme: Failed to execute 'psi-prefix-str'
Backtrace:
In srfi/srfi-1.scm:
 578: 19 [map #<procedure 224a280 at opencog/openpsi/main.scm:127:8 (d)> (# # # ...)]
In ice-9/threads.scm:
  97: 18 [loop ((#))]
In opencog/openpsi/main.scm:
 104: 17 [act-and-evaluate #]
In unknown file:
   ?: 16 [opencog-extension cog-evaluate! ((DefinedPredicateNode "update-web-ui")
)]
In ice-9/boot-9.scm:
 157: 15 [catch #t #<catch-closure 2001820> ...]
In unknown file:
   ?: 14 [apply-smob/1 #<catch-closure 2001820>]
   ?: 13 [call-with-input-string "(psi-step)\npsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strpsi-prefix-strps
	Stack Trace:
	2: basic_string.h:293	  std::string::_M_data() const
	3: Logger.cc:493	  opencog::Logger::Error::operator()(char const*, ...)
	4: exceptions.cc:55	  opencog::StandardException::parse_error_message(char const*, __va_list_tag*, bool)
	5: exceptions.cc:81	  opencog::StandardException::parse_error_message(char const*, char const*, __va_list_tag*, bool)
	6: exceptions.cc:150	  opencog::RuntimeException::RuntimeException(char const*, char const*, ...)
	7: PyScheme.cc:43	  opencog::eval_scheme(opencog::AtomSpace&, std::string const&)
	8: basic_string.h:583	  std::string::operator=(std::string&&)
	9: ??:0	PyEval_EvalFrameEx()
	10: ??:0	PyEval_EvalFrameEx()
	11: ??:0	PyEval_EvalFrameEx()
	12: ??:0	PyEval_EvalCodeEx()
	13: ??:0	initcPickle()
	14: ??:0	PyObject_Call()
	15: ??:0	PyEval_CallObjectWithKeywords()
	16: PythonEval.cc:815	  opencog::PythonEval::call_user_function(std::string const&, opencog::Handle)
	17: shared_ptr_base.h:545	__base_dtor ()
	18: basic_string.h:539	  std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
	19: shared_ptr_base.h:545	__base_dtor ()
	20: EvaluationLink.cc:483	  opencog::EvaluationLink::do_evaluate(opencog::AtomSpace*, opencog::Handle const&, bool)
	21: shared_ptr_base.h:545	__base_dtor ()
	22: Instantiator.cc:475	  opencog::Instantiator::instantiate(opencog::Handle const&, std::map<opencog::Handle, opencog::Handle, std::less<opencog::Handle>, std::allocator<std::pair<opencog::Handle const, opencog::Handle> > > const&)
	23: stl_tree.h:671	__base_dtor ()
	24: EvaluationLink.cc:403	  opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool)
	25: EvaluationLink.cc:314	  opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool)
	26: EvaluationLink.cc:453	  opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool)
	27: EvaluationLink.cc:483	  opencog::EvaluationLink::do_evaluate(opencog::AtomSpace*, opencog::Handle const&, bool)
	28: ExecSCM.cc:42	_ZL11ss_evaluatePN7opencog9AtomSpaceERKNS_6HandleE.84716()
	29: SchemeModule.cc:55	  opencog::FunctionWrap::as_wrapper_p_h(opencog::Handle)
	30: shared_ptr_base.h:545	__base_dtor ()
	31: SchemePrimitive.cc:162	  opencog::PrimitiveEnviron::do_call(scm_unused_struct*, scm_unused_struct*)
	32: ??:0	scm_vm_engine()
	33: ??:0	scm_call_1()
	34: ??:0	scm_vm_engine()
	35: ??:0	scm_call_3()
	36: ??:0	scm_vm_engine()
	37: ??:0	scm_call_4()
	38: SchemeEval.cc:565	  opencog::SchemeEval::do_eval(std::string const&)
	39: SchemeEval.h:168	eval()
	40: basic_string.h:583	  std::string::operator=(std::string&&)
	41: ??:0	PyEval_EvalFrameEx()
	42: ??:0	PyEval_EvalFrameEx()
	43: ??:0	PyEval_EvalFrameEx()
	44: ??:0	PyEval_EvalCodeEx()
	45: ??:0	initcPickle()
	46: ??:0	PyObject_Call()
	47: ??:0	PyEval_CallObjectWithKeywords()
	48: PythonEval.cc:815	  opencog::PythonEval::call_user_function(std::string const&, opencog::Handle)
	49: shared_ptr_base.h:545	__base_dtor ()

Interestingly, (psi-run) (which executes (psi-step) under the hood) works just fine...

EvaControl instance has no attribute 'running'

It can't respond to "btree_on" behavior_switch command. Is there anything blocking the initialization of running attribute?

@yantrabuddhi This line looks suspicious: https://github.com/opencog/ros-behavior-scripting/blob/master/src/ros_commo.py#L527

[rosout][ERROR] [1473127414.176234]: bad callback: <bound method EvaControl.behavior_switch_callback of <ros_commo.EvaControl instance at 0x7fdf53be1b48>>
Traceback (most recent call last):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/topics.py", line 720, in _invoke_callback
    cb(msg)
  File "ros_commo.py", line 375, in behavior_switch_callback
    if not self.running:
AttributeError: EvaControl instance has no attribute 'running'

Some sort of a deadlock in the cogserver

The total number of sockets opened increases gradually over time (the eval thread seems to be stuck at some state even if the actual evaluation is done, so that particular sockets never get destroyed), and eventually the system stops when it reaches the limit

Seems that it happens more promptly if we are sending two messages to the same socket at a high frequency, for example this as in https://github.com/opencog/ros-behavior-scripting/blob/master/ros_bridge/atomic_msgs.py#L145-L152

def saliency(self,x,y,z,deg):
	sal = '(StateLink (AnchorNode "locations")' + \
		'(List (NumberNode '+ str(x)+ ')' + \
		'(NumberNode '+ str(y)+ ')' + \
		'(NumberNode '+ str(z) + ')))\n' + \
		'(StateLink (AnchorNode "Degree value")' + \
		'(NumberNode '+ str(deg)+'))\n'
	netcat(self.hostname,self.port,sal)

Sending this as one message, i.e. removing the first '\n' in the message, could alleviate this problem quite significantly, but still it's increasing (may be for a different reason in a different place? Not sure yet)

Unbound variable: request-eye-contact-state

I rebuilt everything from scratch today, and, on powering up, I get this crash:

2981: 9 [try-module-autoload (opencog eva-behavior) #f]
2320: 8 [save-module-excursion #<procedure 2019cf0 at ice-9/boot-9.scm:2982:17 ()>]
3001: 7 [#<procedure 2019cf0 at ice-9/boot-9.scm:2982:17 ()>]
In unknown file:
   ?: 6 [primitive-load-path "opencog/eva-behavior" ...]
In ice-9/boot-9.scm:
2320: 5 [save-module-excursion #<procedure 242fbc0 at ice-9/boot-9.scm:3961:3 ()>]
3970: 4 [#<procedure 242fbc0 at ice-9/boot-9.scm:3961:3 ()>]
1645: 3 [%start-stack load-stack #<procedure 21c4440 at ice-9/boot-9.scm:1666:2 ()>]
1650: 2 [#<procedure 24bc3f0 ()>]
In unknown file:
   ?: 1 [primitive-load-path "opencog/eva-behavior/behavior.scm"]
In opencog/eva-behavior/behavior.scm:
 136: 0 [#<procedure 2462960 ()>]

opencog/eva-behavior/behavior.scm:136:24: In procedure #<procedure 2462960 ()>:
opencog/eva-behavior/behavior.scm:136:24: In procedure module-lookup: Unbound variable: request-eye-contact-state

Yet another segfault

From the latest code today, I get another segfault...

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `guile -l btree-psi.scm'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  opencog::AtomTable::getHandle (this=0x7f1774ff7800, uuid=uuid@entry=0)
    at /usr/include/c++/4.8/bits/hashtable.h:1038
1038        find(const key_type& __k) const
(gdb) bt
#0  opencog::AtomTable::getHandle (this=0x7f1774ff7800, uuid=uuid@entry=0)
    at /usr/include/c++/4.8/bits/hashtable.h:1038
#1  0x00007f186338ef96 in do_res (uuid=0)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/base/Handle.cc:121
#2  opencog::Handle::Handle(unsigned long) (this=0x7f16e8079ae0, u=0)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/base/Handle.cc:39
#3  0x00007f1852500170 in octomap::OccupancyOcTreeBase<octomap::AtomOcTreeNode>::updateNode (
    this=0x6e5f000, key=..., log_odds_update=0.847297847, lazy_eval=<optimized out>)
    at /home/leungmanhin/hansonrobotics/opencog/opencog/opencog/timeoctomap/AtomOcTreeNode.h:46
#4  0x00007f18524fc88b in octomap::OccupancyOcTreeBase<octomap::AtomOcTreeNode>::updateNode (
    this=0x6e5f000, value=..., occupied=occupied@entry=true, lazy_eval=lazy_eval@entry=false)
    at /opt/ros/indigo/include/octomap/OccupancyOcTreeBase.hxx:354
#5  0x00007f1852503fb8 in TimeOctomap::put_atom_at_current_time (this=0x5a10ff0, 
    location=..., ato=...)
    at /home/leungmanhin/hansonrobotics/opencog/opencog/opencog/timeoctomap/TimeOctomap.cc:154
#6  0x00007f185271e5ac in opencog::ato::PointMemorySCM::map_ato (this=<optimized out>, 
    map_name=..., ato=..., x=<optimized out>, y=<optimized out>, z=<optimized out>)
    at /home/leungmanhin/hansonrobotics/opencog/opencog/opencog/timeoctomap/pointmemory/PointMemorySCM.cc:177
#7  0x00007f1852727dbd in opencog::SchemePrimitive<opencog::ato::PointMemorySCM>::invoke (
    this=0x208e330, args=<optimized out>)
    at /usr/local/include/opencog/guile/SchemePrimitive.h:283
#8  0x00007f1863c9f928 in opencog::PrimitiveEnviron::do_call (sfe=0x1e68480, 
    arglist=0xc0373a0)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemePrimitive.cc:150
#9  0x00007f186646612a in ?? () from /usr/lib/libguile-2.0.so.22
#10 0x00007f18663e8747 in scm_call_1 () from /usr/lib/libguile-2.0.so.22
#11 0x00007f186646612a in ?? () from /usr/lib/libguile-2.0.so.22
#12 0x00007f18663e881e in scm_call_3 () from /usr/lib/libguile-2.0.so.22
#13 0x00007f186646612a in ?? () from /usr/lib/libguile-2.0.so.22
#14 0x00007f18663e8863 in scm_call_4 () from /usr/lib/libguile-2.0.so.22
#15 0x00007f1863c9dea1 in opencog::SchemeEval::do_eval (this=0x7f16fc1d3470, expr=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:655
#16 0x00007f1863c9dfc3 in opencog::SchemeEval::c_wrap_eval (p=0x7f16fc1d3470)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:583
#17 0x00007f18663df2ca in ?? () from /usr/lib/libguile-2.0.so.22
#18 0x00007f186646612a in ?? () from /usr/lib/libguile-2.0.so.22
#19 0x00007f18663e8863 in scm_call_4 () from /usr/lib/libguile-2.0.so.22
#20 0x00007f18663df9ff in ?? () from /usr/lib/libguile-2.0.so.22
#21 0x00007f18663dfa95 in scm_c_with_continuation_barrier () from /usr/lib/libguile-2.0.so.22
#22 0x00007f1865b53950 in GC_call_with_gc_active () from /usr/lib/x86_64-linux-gnu/libgc.so.1
#23 0x00007f18664587d1 in ?? () from /usr/lib/libguile-2.0.so.22
#24 0x00007f1865b4dfe2 in GC_call_with_stack_base () from /usr/lib/x86_64-linux-gnu/libgc.so.1
#25 0x00007f1866458b48 in scm_with_guile () from /usr/lib/libguile-2.0.so.22
#26 0x00007f1863c9df6e in opencog::SchemeEval::eval_expr (this=0x7f16fc1d3470, expr=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:551
#27 0x00007f1862eeba60 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#28 0x00007f186616e182 in start_thread (arg=0x7f184707f700) at pthread_create.c:312
#29 0x00007f1865e9b47d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

sound/audioclass.py is wrong.

The implementation of sound/audioclass.py is not quite right; it skips the behavior tree.

The correct implementation would be to finish the TODO on line 42:
https://github.com/opencog/ros-behavior-scripting/blob/master/sound/audioclass.py#L42

That is, delete lines https://github.com/opencog/ros-behavior-scripting/blob/master/sound/audioclass.py#L42-L84 and lines https://github.com/opencog/ros-behavior-scripting/blob/master/sound/audioclass.py#L111-L115 and replace those by psi-rules.

Crash with segfault

Similar to #92, it sometimes segfault, this is the backtrace

(gdb) bt
#0  opencog::AtomTable::getHandle (this=0x7f24dcff7800, uuid=uuid@entry=18446744073709551615)
    at /usr/include/c++/4.8/bits/hashtable.h:1038
#1  0x00007f2642bf5f86 in do_res (uuid=<optimized out>)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/base/Handle.cc:120
#2  opencog::Handle::Handle(unsigned long) (this=this@entry=0x7f2514ff5970, 
    u=18446744073709551615)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/base/Handle.cc:39
#3  0x00007f26434f944e in opencog::SchemeSmob::ss_atom (suuid=<optimized out>)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeSmobNew.cc:199
#4  0x00007f2645ccd13f in ?? () from /usr/lib/libguile-2.0.so.22
#5  0x00007f2645c4fdc3 in scm_primitive_eval () from /usr/lib/libguile-2.0.so.22
#6  0x00007f2645c4fe23 in scm_eval () from /usr/lib/libguile-2.0.so.22
#7  0x00007f2645ccd12a in ?? () from /usr/lib/libguile-2.0.so.22
#8  0x00007f2645c4f863 in scm_call_4 () from /usr/lib/libguile-2.0.so.22
#9  0x00007f26434fbdbf in opencog::SchemeEval::do_scm_eval(scm_unused_struct*, scm_unused_struct* (*)(void*)) (this=this@entry=0x7f25600009d0, sexpr=0x712b530, 
    evo=0x7f2643502610 <thunk_scm_eval(void*) [clone .11153]>)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:833
#10 0x00007f26434fc209 in opencog::SchemeEval::do_apply_scm(std::string const&, opencog::Handle const&) (this=this@entry=0x7f25600009d0, func=..., varargs=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:1163
#11 0x00007f2643501c21 in opencog::SchemeEval::apply_tv (this=this@entry=0x7f25600009d0, 
    func=..., varargs=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:1181
#12 0x00007f263c482813 in opencog::EvaluationLink::do_evaluate (as=as@entry=0x8e6b10, pn=..., 
    cargs=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/EvaluationLink.cc:588
#13 0x00007f263c47664f in opencog::EvaluationLink::do_eval_scratch (as=<optimized out>, 
    evelnk=..., scratch=0x8e6b10, silent=silent@entry=true)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/EvaluationLink.cc:260
#14 0x00007f263c4825d0 in opencog::EvaluationLink::do_evaluate (as=<optimized out>, 
    evelnk=..., silent=silent@entry=true)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/EvaluationLink.cc:484
#15 0x00007f263c47532b in opencog::Instantiator::walk_tree (this=this@entry=0x7f2514ff6430, 
    expr=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/Instantiator.cc:227
#16 0x00007f263c482d52 in opencog::Instantiator::instantiate (this=this@entry=0x7f2514ff6430, 
    expr=..., vars=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/Instantiator.cc:477
#17 0x00007f263c482e7d in opencog::Instantiator::execute(opencog::Handle const&) [clone .local.665] (this=this@entry=0x7f2514ff6430, expr=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/Instantiator.h:101
#18 0x00007f263c477710 in opencog::EvaluationLink::do_eval_scratch (as=as@entry=0x8e6b10, 
    evelnk=..., scratch=scratch@entry=0x8e6b10, silent=silent@entry=false)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/EvaluationLin---Type <return> to continue, or q <return> to quit---
k.cc:404
#19 0x00007f263c476f87 in opencog::EvaluationLink::do_eval_scratch (as=as@entry=0x8e6b10, 
    evelnk=..., scratch=scratch@entry=0x8e6b10, silent=silent@entry=false)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/EvaluationLink.cc:315
#20 0x00007f263c4776b9 in opencog::EvaluationLink::do_eval_scratch (as=as@entry=0x8e6b10, 
    evelnk=..., scratch=scratch@entry=0x8e6b10, silent=silent@entry=false)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/EvaluationLink.cc:455
#21 0x00007f263c476f87 in opencog::EvaluationLink::do_eval_scratch (as=as@entry=0x8e6b10, 
    evelnk=..., scratch=scratch@entry=0x8e6b10, silent=silent@entry=false)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/EvaluationLink.cc:315
#22 0x00007f263c4776b9 in opencog::EvaluationLink::do_eval_scratch (as=0x8e6b10, evelnk=..., 
    scratch=0x8e6b10, silent=silent@entry=false)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/EvaluationLink.cc:455
#23 0x00007f263c4825d0 in opencog::EvaluationLink::do_evaluate (as=<optimized out>, 
    evelnk=..., silent=silent@entry=false)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/EvaluationLink.cc:484
#24 0x00007f263c48140b in ss_evaluate(opencog::AtomSpace*, opencog::Handle const&) [clone .93437] (atomspace=<optimized out>, h=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/ExecSCM.cc:41
#25 0x00007f2643503492 in opencog::FunctionWrap::as_wrapper_p_h (this=0x8e61e0, h=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeModule.cc:54
#26 0x00007f26434f4e7c in opencog::SchemePrimitive<opencog::FunctionWrap>::invoke(scm_unused_struct*) [clone .local.289] (this=0x11402f0, args=<optimized out>)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemePrimitive.h:634
#27 0x00007f26435068f8 in opencog::PrimitiveEnviron::do_call (sfe=0x191fe40, 
    arglist=0x712b560)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemePrimitive.cc:150
#28 0x00007f2645ccd12a in ?? () from /usr/lib/libguile-2.0.so.22
#29 0x00007f2645c4fdc3 in scm_primitive_eval () from /usr/lib/libguile-2.0.so.22
#30 0x00007f2645c4fe23 in scm_eval () from /usr/lib/libguile-2.0.so.22
#31 0x00007f2645ccd12a in ?? () from /usr/lib/libguile-2.0.so.22
#32 0x00007f2645c4f863 in scm_call_4 () from /usr/lib/libguile-2.0.so.22
#33 0x00007f26434fbdbf in opencog::SchemeEval::do_scm_eval(scm_unused_struct*, scm_unused_struct* (*)(void*)) (this=0x7f25600009d0, sexpr=0x712b720, 
    evo=0x7f2643502610 <thunk_scm_eval(void*) [clone .11153]>)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:833
#34 0x00007f26434fc209 in opencog::SchemeEval::do_apply_scm(std::string const&, opencog::Handle const&) (this=<optimized out>, func=..., varargs=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:1163
#35 0x00007f26434fc222 in opencog::SchemeEval::do_apply(std::string const&, opencog::Handle const&) (this=<optimized out>, func=..., varargs=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:1127
#36 0x00007f26434fc315 in opencog::SchemeEval::apply(std::string const&, opencog::Handle) (
    this=this@entry=0x7f25600009d0, func=..., varargs=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:1088
---Type <return> to continue, or q <return> to quit---
#37 0x00007f263c47e98d in opencog::ExecutionOutputLink::do_execute (as=0x8e6b10, gsn=..., 
    cargs=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/ExecutionOutputLink.cc:154
#38 0x00007f263c47f09d in opencog::ExecutionOutputLink::execute (this=<optimized out>, 
    as=<optimized out>)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/ExecutionOutputLink.cc:118
#39 0x00007f263c47528d in opencog::Instantiator::walk_tree (this=this@entry=0x7f2514ff7790, 
    expr=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/Instantiator.cc:317
#40 0x00007f263c4752ef in opencog::Instantiator::walk_tree (this=this@entry=0x7f2514ff7790, 
    expr=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/Instantiator.cc:131
#41 0x00007f263c482d52 in opencog::Instantiator::instantiate (this=this@entry=0x7f2514ff7790, 
    expr=..., vars=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/Instantiator.cc:477
#42 0x00007f263c482e7d in opencog::Instantiator::execute(opencog::Handle const&) [clone .local.665] (this=this@entry=0x7f2514ff7790, expr=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/Instantiator.h:101
#43 0x00007f263c48099e in ss_execute(opencog::AtomSpace*, opencog::Handle const&) [clone .93441] (atomspace=0x8e6b10, h=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/ExecSCM.cc:30
#44 0x00007f2643503422 in opencog::FunctionWrap::as_wrapper_h_h (this=0x8e61b0, h=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeModule.cc:40
#45 0x00007f26434f5dd2 in opencog::SchemePrimitive<opencog::FunctionWrap>::invoke(scm_unused_struct*) [clone .local.289] (this=0x1153c50, args=0x712b750)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemePrimitive.h:347
#46 0x00007f26435068f8 in opencog::PrimitiveEnviron::do_call (sfe=0x18ed290, 
    arglist=0x712b750)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemePrimitive.cc:150
#47 0x00007f2645ccd12a in ?? () from /usr/lib/libguile-2.0.so.22
#48 0x00007f2645c4fdc3 in scm_primitive_eval () from /usr/lib/libguile-2.0.so.22
#49 0x00007f2645c4fe23 in scm_eval () from /usr/lib/libguile-2.0.so.22
#50 0x00007f2645ccd12a in ?? () from /usr/lib/libguile-2.0.so.22
#51 0x00007f2645c4f863 in scm_call_4 () from /usr/lib/libguile-2.0.so.22
#52 0x00007f26434fbdbf in opencog::SchemeEval::do_scm_eval(scm_unused_struct*, scm_unused_struct* (*)(void*)) (this=this@entry=0x7f25600009d0, sexpr=0x8430cf0, 
    evo=0x7f2643502610 <thunk_scm_eval(void*) [clone .11153]>)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:833
#53 0x00007f26434fc209 in opencog::SchemeEval::do_apply_scm(std::string const&, opencog::Handle const&) (this=this@entry=0x7f25600009d0, func=..., varargs=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:1163
#54 0x00007f2643501b79 in opencog::SchemeEval::c_wrap_apply_tv (p=0x7f25600009d0)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:1213
#55 0x00007f2645c462ca in ?? () from /usr/lib/libguile-2.0.so.22
---Type <return> to continue, or q <return> to quit---
#56 0x00007f2645ccd12a in ?? () from /usr/lib/libguile-2.0.so.22
#57 0x00007f2645c4f863 in scm_call_4 () from /usr/lib/libguile-2.0.so.22
#58 0x00007f2645c469ff in ?? () from /usr/lib/libguile-2.0.so.22
#59 0x00007f2645c46a95 in scm_c_with_continuation_barrier () from /usr/lib/libguile-2.0.so.22
#60 0x00007f26453b4fe2 in GC_call_with_stack_base () from /usr/lib/x86_64-linux-gnu/libgc.so.1
#61 0x00007f2645cbfb48 in scm_with_guile () from /usr/lib/libguile-2.0.so.22
#62 0x00007f2643501cb0 in opencog::SchemeEval::apply_tv (this=this@entry=0x7f25600009d0, 
    func=..., varargs=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:1194
#63 0x00007f263c482813 in opencog::EvaluationLink::do_evaluate (as=as@entry=0x8e6b10, pn=..., 
    cargs=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/EvaluationLink.cc:588
#64 0x00007f263c47664f in opencog::EvaluationLink::do_eval_scratch (as=as@entry=0x8e6b10, 
    evelnk=..., scratch=scratch@entry=0x8e6b10, silent=silent@entry=false)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/EvaluationLink.cc:260
#65 0x00007f263c4769fc in opencog::EvaluationLink::do_eval_scratch (as=as@entry=0x8e6b10, 
    evelnk=..., scratch=scratch@entry=0x8e6b10, silent=silent@entry=false)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/EvaluationLink.cc:315
#66 0x00007f263c476f17 in opencog::EvaluationLink::do_eval_scratch (as=as@entry=0x8e6b10, 
    evelnk=..., scratch=scratch@entry=0x8e6b10, silent=silent@entry=false)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/EvaluationLink.cc:421
#67 0x00007f263c4776b9 in opencog::EvaluationLink::do_eval_scratch (as=0x8e6b10, evelnk=..., 
    scratch=0x8e6b10, silent=silent@entry=false)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/EvaluationLink.cc:455
#68 0x00007f263c4825d0 in opencog::EvaluationLink::do_evaluate (as=<optimized out>, 
    evelnk=..., silent=silent@entry=false)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/EvaluationLink.cc:484
#69 0x00007f263c48140b in ss_evaluate(opencog::AtomSpace*, opencog::Handle const&) [clone .93437] (atomspace=<optimized out>, h=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/ExecSCM.cc:41
#70 0x00007f2643503492 in opencog::FunctionWrap::as_wrapper_p_h (this=0x8e61e0, h=...)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeModule.cc:54
#71 0x00007f26434f4e7c in opencog::SchemePrimitive<opencog::FunctionWrap>::invoke(scm_unused_struct*) [clone .local.289] (this=0x11402f0, args=<optimized out>)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemePrimitive.h:634
#72 0x00007f26435068f8 in opencog::PrimitiveEnviron::do_call (sfe=0x191fe40, 
    arglist=0x790f0f0)
    at /home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemePrimitive.cc:150
#73 0x00007f2645ccd12a in ?? () from /usr/lib/libguile-2.0.so.22
#74 0x00007f2645cbff80 in ?? () from /usr/lib/libguile-2.0.so.22
#75 0x00007f2645c462ca in ?? () from /usr/lib/libguile-2.0.so.22
#76 0x00007f2645ccd12a in ?? () from /usr/lib/libguile-2.0.so.22
#77 0x00007f2645c4f863 in scm_call_4 () from /usr/lib/libguile-2.0.so.22
#78 0x00007f2645c469ff in ?? () from /usr/lib/libguile-2.0.so.22
---Type <return> to continue, or q <return> to quit---
#79 0x00007f2645c46a95 in scm_c_with_continuation_barrier () from /usr/lib/libguile-2.0.so.22
#80 0x00007f2645cbf78c in ?? () from /usr/lib/libguile-2.0.so.22
#81 0x00007f26453b4fe2 in GC_call_with_stack_base () from /usr/lib/x86_64-linux-gnu/libgc.so.1
#82 0x00007f2645cbf14c in ?? () from /usr/lib/libguile-2.0.so.22
#83 0x00007f26453b9d93 in GC_inner_start_routine () from /usr/lib/x86_64-linux-gnu/libgc.so.1
#84 0x00007f26453b4fe2 in GC_call_with_stack_base () from /usr/lib/x86_64-linux-gnu/libgc.so.1
#85 0x00007f26459d5182 in start_thread (arg=0x7f2514ff9700) at pthread_create.c:312
#86 0x00007f264570247d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

netcat to cogserver in btree is failing too often

I updated and repeated with @amen and found netcat blocking and cogserver crash happening regularly. @linas told a way to see things with gdb to @Misgana . We observed that when we run btree-psi from gdb at the end after launching all other nodes the problem disappears (face_track.py needs to be killed and restarted once for some reasons). However gdb runs the stuff very slowly and gets slower over time (maybe due to loading lots of atoms?) but nothing crashes for as long as I observed [60 minutes or so]

All the above happens and problems are observed by running ./dev.sh --oc --cmt in HEAD repository scripts folder, running normally with updated ros-behavior-scripting master branch.
I have so far not found the changes I made over last working state to cause this. So far my guess is some problem with cogserver with netcat. Also running guile -l btree-psi.scm at end without gdb at times make the system work without problem. if we add clear face trackers ros message for face tracker and run btree at end it can solve the problem

Btree can't handle message from topic "chatbot_affect_express"

[rosout][ERROR] [1458036392.794756]: bad callback: <bound method EvaControl.chatbot_affect_perceive_cb of <ros_commo.EvaControl instance at 0x7f3fd32acea8>>
Traceback (most recent call last):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/topics.py", line 720, in _invoke_callback
    cb(msg)
  File "ros_commo.py", line 243, in chatbot_affect_perceive_cb
    self.puta.chatbot_affect_negative()
  File "put_atoms.py", line 68, in chatbot_affect_negative
    scheme_eval_h(self.atomspace, "(State chat-affect chat-negative)")
  File "scheme_wrapper.pyx", line 47, in opencog.scheme_wrapper.scheme_eval_h (/home/wenwei/workspace/hansonrobotics/opencog/atomspace/build/opencog/cython/opencog/scheme_wrapper.cpp:1148)
RuntimeError: Backtrace:
In ice-9/boot-9.scm:
 157: 12 [catch #t #<catch-closure 25541e0> ...]
In unknown file:
   ?: 11 [apply-smob/1 #<catch-closure 25541e0>]
In ice-9/boot-9.scm:
 157: 10 [catch #t #<catch-closure 25540c0> ...]
In unknown file:
   ?: 9 [apply-smob/1 #<catch-closure 25540c0>]
   ?: 8 [call-with-input-string "(State chat-affect chat-negative)" ...]
In ice-9/boot-9.scm:
2320: 7 [save-module-excursion #<procedure 23b0cf0 at ice-9/eval-string.scm:65:9 ()>]
In ice-9/eval-string.scm:
  44: 6 [read-and-eval #<input: string 2557680> #:lang ...]
  37: 5 [lp (State chat-affect chat-negative)]
In ice-9/eval.scm:
 387: 4 [eval # ()]
 393: 3 [eval #<memoized chat-affect> ()]
In unknown file:
   ?: 2 [memoize-variable-access! #<memoized chat-affect> #<directory # 1088c60>]
In ice-9/boot-9.scm:
 102: 1 [#<procedure 26a5800 at ice-9/boot-9.scm:97:6 (thrown-k . args)> unbound-variable ...]
In unknown file:
   ?: 0 [apply-smob/1 #<catch-closure 2554080> unbound-variable ...]

ERROR: In procedure apply-smob/1:
ERROR: Unbound variable: chat-affect
ABORT: unbound-variable
 (/home/wenwei/workspace/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:885)

Behavior tree (and actually the whole Guile) crashes with a Floating point exception

This keeps happening today when we try to run it for a demo, everything are the latest on master branches, and we do all the code updating, cleaning, building and installing by using the hrtool in private_ws/scripts

To reproduce the error

  • Start the stack, with a webcam plugged in, using robot.sh in the same directory
./robot.sh han --oc --cmt -s
  • Wait for the rule loading process to finish at tmux window 6
  • Sometimes it crashes at this point, with a Floating point exception(core dumped)
  • If it hasn't, open a Chrome browser, go to http://localhost:8000/#/interactions and chat with it, it usually crashes with the same error after sending two to three messages to it.
  • We tried to get the backtrace using gdb, but gdb stops responding after printing these:
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `guile -l btree-psi.scm'.
Program terminated with signal SIGFPE, Arithmetic exception.
#0  0x00007fb94e2c6685 in operator() (this=<optimized out>, __num=<optimized out>, 
    __den=<optimized out>) at /usr/include/c++/4.8/bits/hashtable_policy.h:345
345     { return __num % __den; }
(gdb) bt
#0  0x00007fb94e2c6685 in operator() (this=<optimized out>, __num=<optimized out>, 
    __den=<optimized out>) at /usr/include/c++/4.8/bits/hashtable_policy.h:345
#1  _M_bucket_index (this=<optimized out>, __c=<optimized out>, __n=<optimized out>)
    at /usr/include/c++/4.8/bits/hashtable_policy.h:1023
#2  _M_bucket_index (this=<optimized out>, __k=<optimized out>, __c=<optimized out>)
    at /usr/include/c++/4.8/bits/hashtable.h:593

cog-delete always consistently found in random btree crash

Hi Linas,
I checked the string it was (cog-delete (NumberNode "16405")). We tried several runs and problem was always with cog-delete. We removed cog-delete netcats from face-atomic.py and the system did not crash for 20 minutes of total test time.
Below is stack trace when cog-delete was being sent
stack trace:
#0 opencog::AtomTable::getHandle (this=this@entry=0x0, t=t@entry=8,

name=<incomplete type>) at /usr/include/c++/4.8/bits/stl_vector.h:791

#1 0x00007feaa44d6a24 in opencog::AtomSpace::add_node (this=0x0, t=t@entry=8,

name=..., async=async@entry=false)
at /home/hr/hansonrobotics/opencog/atomspace/opencog/atomspace/AtomSpace.cc:313

#2 0x00007feaa471949d in opencog::SchemeSmob::ss_new_node (

stype=<optimized out>, sname=0x1d3c9c0, kv_pairs=0x304)
at /home/hr/hansonrobotics/opencog/atomspace/opencog/guile/SchemeSmobNew.cc:370

#3 0x00007feaa6c19111 in ?? () from /usr/lib/libguile-2.0.so.22
#4 0x00007feaa6b9b747 in scm_call_1 () from /usr/lib/libguile-2.0.so.22
#5 0x00007feaa6c1912a in ?? () from /usr/lib/libguile-2.0.so.22
#6 0x00007feaa6b9b81e in scm_call_3 () from /usr/lib/libguile-2.0.so.22
#7 0x00007feaa6c1912a in ?? () from /usr/lib/libguile-2.0.so.22
#8 0x00007feaa6b9b863 in scm_call_4 () from /usr/lib/libguile-2.0.so.22
#9 0x00007feaa471ae71 in opencog::SchemeEval::do_eval (this=0x7fe968061540,

expr=...)
at /home/hr/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:655

#10 0x00007feaa471af93 in opencog::SchemeEval::c_wrap_eval (p=0x7fe968061540)

at /home/hr/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:583

---Type to continue, or q to quit---q
Quit
(gdb) bt
#0 opencog::AtomTable::getHandle (this=this@entry=0x0, t=t@entry=8,

name=<incomplete type>) at /usr/include/c++/4.8/bits/stl_vector.h:791

#1 0x00007feaa44d6a24 in opencog::AtomSpace::add_node (this=0x0, t=t@entry=8,

name=..., async=async@entry=false)
at /home/hr/hansonrobotics/opencog/atomspace/opencog/atomspace/AtomSpace.cc:313

#2 0x00007feaa471949d in opencog::SchemeSmob::ss_new_node (

stype=<optimized out>, sname=0x1d3c9c0, kv_pairs=0x304)
at /home/hr/hansonrobotics/opencog/atomspace/opencog/guile/SchemeSmobNew.cc:370

#3 0x00007feaa6c19111 in ?? () from /usr/lib/libguile-2.0.so.22
#4 0x00007feaa6b9b747 in scm_call_1 () from /usr/lib/libguile-2.0.so.22
#5 0x00007feaa6c1912a in ?? () from /usr/lib/libguile-2.0.so.22
#6 0x00007feaa6b9b81e in scm_call_3 () from /usr/lib/libguile-2.0.so.22
#7 0x00007feaa6c1912a in ?? () from /usr/lib/libguile-2.0.so.22
#8 0x00007feaa6b9b863 in scm_call_4 () from /usr/lib/libguile-2.0.so.22
#9 0x00007feaa471ae71 in opencog::SchemeEval::do_eval (this=0x7fe968061540,

expr=...)
at /home/hr/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:655

#10 0x00007feaa471af93 in opencog::SchemeEval::c_wrap_eval (p=0x7fe968061540)

at /home/hr/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:583

#11 0x00007feaa6b922ca in ?? () from /usr/lib/libguile-2.0.so.22
#12 0x00007feaa6c1912a in ?? () from /usr/lib/libguile-2.0.so.22
#13 0x00007feaa6b9b863 in scm_call_4 () from /usr/lib/libguile-2.0.so.22
#14 0x00007feaa6b929ff in ?? () from /usr/lib/libguile-2.0.so.22
#15 0x00007feaa6b92a95 in scm_c_with_continuation_barrier ()

from /usr/lib/libguile-2.0.so.22
#16 0x00007feaa6c0b78c in ?? () from /usr/lib/libguile-2.0.so.22
#17 0x00007feaa6300fe2 in GC_call_with_stack_base ()

from /usr/lib/x86_64-linux-gnu/libgc.so.1
#18 0x00007feaa6c0bb48 in scm_with_guile () from /usr/lib/libguile-2.0.so.22
#19 0x00007feaa471af3e in opencog::SchemeEval::eval_expr (this=0x7fe968061540,

expr=...)
at /home/hr/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:551

#20 0x00007feaa3991a60 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#21 0x00007feaa6921184 in start_thread (arg=0x7fe97e7fc700)

at pthread_create.c:312

#22 0x00007feaa664e37d in clone ()

at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

sta

audio_stream.msg

within the audio_power.py has the audio_stream.msg error been fixed?
or can someone point me to where it is defined?

thanks

Jen

Crash with an exception

It eventually crashed, with this:

Backtrace:
In ice-9/boot-9.scm:
 157: 2 [catch #t #<catch-closure 969d5a0> ...]
In unknown file:
   ?: 1 [apply-smob/1 #<catch-closure 969d5a0>]
   ?: 0 [opencog-extension cog-evaluate! ((DefinedPredicateNode "OpenPsi: loop")
)]

ERROR: In procedure opencog-extension:
ERROR: Throw to key `C++-EXCEPTION' with args `("cog-evaluate!" "Backtrace:\nIn ice-9/boot-9.scm:\n 157: 13 [catch #t #<catch-closure 969d5a0> ...]\nIn unknown file:\n   ?: 12 [apply-smob/1 #<catch-closure 969d5a0>]\n   ?: 11 [opencog-extension cog-evaluate! ((DefinedPredicateNode \"OpenPsi: loop\")\n)]\nIn ice-9/boot-9.scm:\n 157: 10 [catch #t #<catch-closure 98091a0> ...]\nIn unknown file:\n   ?: 9 [apply-smob/1 #<catch-closure 98091a0>]\nIn ice-9/boot-9.scm:\n 157: 8 [catch #t #<catch-closure 9809080> ...]\nIn unknown file:\n   ?: 7 [apply-smob/1 #<catch-closure 9809080>]\nIn opencog/openpsi/main.scm:\n  97: 6 [psi-step]\nIn srfi/srfi-1.scm:\n 578: 5 [map #<procedure 3398560 at opencog/openpsi/main.scm:98:8 (d)> (# # # #)]\n 578: 4 [map #<procedure act-and-evaluate (rule)> (#)]\nIn opencog/openpsi/main.scm:\n  85: 3 [act-and-evaluate #]\nIn unknown file:\n   ?: 2 [opencog-extension cog-execute! (#)]\nIn ice-9/boot-9.scm:\n 102: 1 [#<procedure 93ea140 at ice-9/boot-9.scm:97:6 (thrown-k . args)> C++-EXCEPTION ...]\nIn unknown file:\n   ?: 0 [apply-smob/1 #<catch-closure 9809040> C++-EXCEPTION ...]\n\nERROR: In procedure apply-smob/1:\nERROR: In procedure cog-execute!: Failed evaluation; see logfile for stack trace. (/home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/ExecutionOutputLink.cc:159)\nABORT: C++-EXCEPTION\n (/home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:1201)")'.

and from opencog.log:

[2016-09-08 10:24:08:842] [WARN] ServerSocket::Send(): Socket operation on non-socket on thread 0x7afd7700
[2016-09-08 10:24:08:842] [WARN] ServerSocket::Send(): Socket operation on non-socket on thread 0x7afd7700
[2016-09-08 11:01:54:184] [ERROR] Failed evaluation; see logfile for stack trace. (/home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/ExecutionOutputLink.cc:159)
    Stack Trace:
    2: /usr/local/lib/libcogutil.so (opencog::Logger::logva(opencog::Logger::Level, char const*, __va_list_tag*) +0xa7) [0x7fa599b2b457]
    3: /usr/local/lib/libcogutil.so (opencog::Logger::Error::operator()(char const*, ...) +0x92) [0x7fa599b2b5f2]
    4: /usr/local/lib/libcogutil.so (opencog::StandardException::parse_error_message(char const*, __va_list_tag*, bool) +0x63) [0x7fa599b1d663]
    5: /usr/local/lib/libcogutil.so (opencog::StandardException::parse_error_message(char const*, char const*, __va_list_tag*, bool) +0x9a) [0x7fa599b1d73a]
    6: /usr/local/lib/libcogutil.so (opencog::RuntimeException::RuntimeException(char const*, char const*, ...) +0xb4) [0x7fa599b1d854]
    7: /usr/local/lib/opencog/libexecution.so (opencog::ExecutionOutputLink::do_execute(opencog::AtomSpace*, opencog::Handle const&, opencog::Handle const&) +0xad3) [0x7fa58b5eaf03]
    8: /usr/local/lib/opencog/libexecution.so (opencog::ExecutionOutputLink::execute(opencog::AtomSpace*) const +0x1d) [0x7fa58b5eb09d]
    9: /usr/local/lib/opencog/libexecution.so (opencog::Instantiator::walk_tree(opencog::Handle const&) +0xd2d) [0x7fa58b5e128d]
    10: /usr/local/lib/opencog/libexecution.so (opencog::Instantiator::walk_tree(opencog::Handle const&) +0xd8f) [0x7fa58b5e12ef]
    11: /usr/local/lib/opencog/libexecution.so (opencog::Instantiator::walk_tree(opencog::Handle const&) +0x739) [0x7fa58b5e0c99]
    12: /usr/local/lib/opencog/libexecution.so (opencog::Instantiator::instantiate(opencog::Handle const&, std::map<opencog::Handle, opencog::Handle, std::less<opencog::Handle>, std::allocator<std::pair<opencog::Handle const, opencog::Handle> > > const&) +0x32) [0x7fa58b5eed52]
    13: /usr/local/lib/opencog/libexecution.so (x� +0x19e7d) [0x7fa58b5eee7d]
    14: /usr/local/lib/opencog/libexecution.so (opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool) +0x1420) [0x7fa58b5e3710]
    15: /usr/local/lib/opencog/libexecution.so (opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool) +0xc97) [0x7fa58b5e2f87]
    16: /usr/local/lib/opencog/libexecution.so (opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool) +0x13c9) [0x7fa58b5e36b9]
    17: /usr/local/lib/opencog/libexecution.so (opencog::EvaluationLink::do_evaluate(opencog::AtomSpace*, opencog::Handle const&, bool) +0x10) [0x7fa58b5ee5d0]
    18: /usr/local/lib/opencog/libexecution.so (x� +0x1840b) [0x7fa58b5ed40b]
    19: /usr/local/lib/opencog/libsmob.so (opencog::FunctionWrap::as_wrapper_p_h(opencog::Handle) +0x22) [0x7fa599fcc542]
    20: /usr/local/lib/opencog/libsmob.so (x� +0xde5c) [0x7fa599fbde5c]
    21: /usr/local/lib/opencog/libsmob.so (opencog::PrimitiveEnviron::do_call(scm_unused_struct*, scm_unused_struct*) +0x28) [0x7fa599fcf9a8]
    22: /usr/lib/libguile-2.0.so.22 (x� +0xe212a) [0x7fa59c79612a]
    23: /usr/lib/libguile-2.0.so.22 (x� +0x33) [0x7fa59c718dc3]
    24: /usr/lib/libguile-2.0.so.22 (x� +0x53) [0x7fa59c718e23]
    25: /usr/lib/libguile-2.0.so.22 (x� +0xe212a) [0x7fa59c79612a]
    26: /usr/lib/libguile-2.0.so.22 (x� +0x33) [0x7fa59c718863]
    27: /usr/local/lib/opencog/libsmob.so (opencog::SchemeEval::do_scm_eval(scm_unused_struct*, scm_unused_struct* (*)(void*)) +0xbf) [0x7fa599fc5daf]
    28: /usr/local/lib/opencog/libsmob.so (opencog::SchemeEval::do_apply(std::string const&, opencog::Handle const&) +0x12) [0x7fa599fc6212]
    29: /usr/local/lib/opencog/libsmob.so (opencog::SchemeEval::apply(std::string const&, opencog::Handle) +0xd5) [0x7fa599fc6305]
    30: /usr/local/lib/opencog/libexecution.so (opencog::ExecutionOutputLink::do_execute(opencog::AtomSpace*, opencog::Handle const&, opencog::Handle const&) +0x55d) [0x7fa58b5ea98d]
    31: /usr/local/lib/opencog/libexecution.so (opencog::ExecutionOutputLink::execute(opencog::AtomSpace*) const +0x1d) [0x7fa58b5eb09d]
    32: /usr/local/lib/opencog/libexecution.so (opencog::Instantiator::walk_tree(opencog::Handle const&) +0xd2d) [0x7fa58b5e128d]
    33: /usr/local/lib/opencog/libexecution.so (opencog::Instantiator::walk_tree(opencog::Handle const&) +0xd8f) [0x7fa58b5e12ef]
    34: /usr/local/lib/opencog/libexecution.so (opencog::Instantiator::instantiate(opencog::Handle const&, std::map<opencog::Handle, opencog::Handle, std::less<opencog::Handle>, std::allocator<std::pair<opencog::Handle const, opencog::Handle> > > const&) +0x32) [0x7fa58b5eed52]
    35: /usr/local/lib/opencog/libexecution.so (x� +0x19e7d) [0x7fa58b5eee7d]
    36: /usr/local/lib/opencog/libexecution.so (x� +0x1799e) [0x7fa58b5ec99e]
    37: /usr/local/lib/opencog/libsmob.so (opencog::FunctionWrap::as_wrapper_h_h(opencog::Handle) +0x22) [0x7fa599fcc4d2]
    38: /usr/local/lib/opencog/libsmob.so (x� +0xedb2) [0x7fa599fbedb2]
    39: /usr/local/lib/opencog/libsmob.so (opencog::PrimitiveEnviron::do_call(scm_unused_struct*, scm_unused_struct*) +0x28) [0x7fa599fcf9a8]
    40: /usr/lib/libguile-2.0.so.22 (x� +0xe212a) [0x7fa59c79612a]
    41: /usr/lib/libguile-2.0.so.22 (x� +0x33) [0x7fa59c718dc3]
    42: /usr/lib/libguile-2.0.so.22 (x� +0x53) [0x7fa59c718e23]
    43: /usr/lib/libguile-2.0.so.22 (x� +0xe212a) [0x7fa59c79612a]
    44: /usr/lib/libguile-2.0.so.22 (x +0x33) [0x7fa59c718863]
    45: /usr/local/lib/opencog/libsmob.so (opencog::SchemeEval::do_scm_eval(scm_unused_struct*, scm_unused_struct* (*)(void*)) +0xbf) [0x7fa599fc5daf]
    46: /usr/local/lib/opencog/libsmob.so (opencog::SchemeEval::c_wrap_apply_tv(void*) +0x19) [0x7fa599fcb899]
    47: /usr/lib/libguile-2.0.so.22 (x +0x5b2ca) [0x7fa59c70f2ca]
    48: /usr/lib/libguile-2.0.so.22 (x +0xe212a) [0x7fa59c79612a]
    49: /usr/lib/libguile-2.0.so.22 (x +0x33) [0x7fa59c718863]

[2016-09-08 11:01:54:335] [ERROR] Failed evaluation; see logfile for stack trace. (/home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/ExecutionOutputLink.cc:159)
    Stack Trace:
    2: /usr/local/lib/libcogutil.so (opencog::Logger::logva(opencog::Logger::Level, char const*, __va_list_tag*) +0xa7) [0x7fa599b2b457]
    3: /usr/local/lib/libcogutil.so (opencog::Logger::Error::operator()(char const*, ...) +0x92) [0x7fa599b2b5f2]
    4: /usr/local/lib/libcogutil.so (opencog::StandardException::parse_error_message(char const*, __va_list_tag*, bool) +0x63) [0x7fa599b1d663]
    5: /usr/local/lib/libcogutil.so (opencog::StandardException::parse_error_message(char const*, char const*, __va_list_tag*, bool) +0x9a) [0x7fa599b1d73a]
    6: /usr/local/lib/libcogutil.so (opencog::RuntimeException::RuntimeException(char const*, char const*, ...) +0xb4) [0x7fa599b1d854]
    7: /usr/local/lib/opencog/libexecution.so (opencog::ExecutionOutputLink::do_execute(opencog::AtomSpace*, opencog::Handle const&, opencog::Handle const&) +0xad3) [0x7fa58b5eaf03]
    8: /usr/local/lib/opencog/libexecution.so (opencog::ExecutionOutputLink::execute(opencog::AtomSpace*) const +0x1d) [0x7fa58b5eb09d]
    9: /usr/local/lib/opencog/libexecution.so (opencog::Instantiator::walk_tree(opencog::Handle const&) +0xd2d) [0x7fa58b5e128d]
    10: /usr/local/lib/opencog/libexecution.so (opencog::Instantiator::walk_tree(opencog::Handle const&) +0xd8f) [0x7fa58b5e12ef]
    11: /usr/local/lib/opencog/libexecution.so (opencog::Instantiator::instantiate(opencog::Handle const&, std::map<opencog::Handle, opencog::Handle, std::less<opencog::Handle>, std::allocator<std::pair<opencog::Handle const, opencog::Handle> > > const&) +0x32) [0x7fa58b5eed52]
    12: /usr/local/lib/opencog/libexecution.so (x� +0x19e7d) [0x7fa58b5eee7d]
    13: /usr/local/lib/opencog/libexecution.so (x� +0x1799e) [0x7fa58b5ec99e]
    14: /usr/local/lib/opencog/libsmob.so (opencog::FunctionWrap::as_wrapper_h_h(opencog::Handle) +0x22) [0x7fa599fcc4d2]
    15: /usr/local/lib/opencog/libsmob.so (x� +0xedb2) [0x7fa599fbedb2]
    16: /usr/local/lib/opencog/libsmob.so (opencog::PrimitiveEnviron::do_call(scm_unused_struct*, scm_unused_struct*) +0x28) [0x7fa599fcf9a8]
    17: /usr/lib/libguile-2.0.so.22 (x� +0xe212a) [0x7fa59c79612a]
    18: /usr/lib/libguile-2.0.so.22 (x� +0x33) [0x7fa59c718dc3]
    19: /usr/lib/libguile-2.0.so.22 (x� +0x53) [0x7fa59c718e23]
    20: /usr/lib/libguile-2.0.so.22 (x� +0xe212a) [0x7fa59c79612a]
    21: /usr/lib/libguile-2.0.so.22 (x� +0x33) [0x7fa59c718863]
    22: /usr/local/lib/opencog/libsmob.so (opencog::SchemeEval::do_scm_eval(scm_unused_struct*, scm_unused_struct* (*)(void*)) +0xbf) [0x7fa599fc5daf]
    23: /usr/local/lib/opencog/libsmob.so (opencog::SchemeEval::c_wrap_apply_tv(void*) +0x19) [0x7fa599fcb899]
    24: /usr/lib/libguile-2.0.so.22 (x� +0x5b2ca) [0x7fa59c70f2ca]
    25: /usr/lib/libguile-2.0.so.22 (x� +0xe212a) [0x7fa59c79612a]
    26: /usr/lib/libguile-2.0.so.22 (x� +0x33) [0x7fa59c718863]
    27: /usr/lib/libguile-2.0.so.22 (x� +0x5b9ff) [0x7fa59c70f9ff]
    28: /usr/lib/libguile-2.0.so.22 (x� +0x35) [0x7fa59c70fa95]
    29: /usr/lib/x86_64-linux-gnu/libgc.so.1 (x� +0x12) [0x7fa59be7dfe2]
    30: /usr/lib/libguile-2.0.so.22 (x� +0x28) [0x7fa59c788b48]
    31: /usr/local/lib/opencog/libsmob.so (opencog::SchemeEval::apply_tv(std::string const&, opencog::Handle) +0xb0) [0x7fa599fcb9d0]
    32: /usr/local/lib/opencog/libexecution.so (opencog::EvaluationLink::do_evaluate(opencog::AtomSpace*, opencog::Handle const&, opencog::Handle const&) +0x233) [0x7fa58b5ee813]
    33: /usr/local/lib/opencog/libexecution.so (opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool) +0x35f) [0x7fa58b5e264f]
    34: /usr/local/lib/opencog/libexecution.so (opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool) +0x70c) [0x7fa58b5e29fc]
    35: /usr/local/lib/opencog/libexecution.so (opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool) +0xc27) [0x7fa58b5e2f17]
    36: /usr/local/lib/opencog/libexecution.so (opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool) +0x13c9) [0x7fa58b5e36b9]
    37: /usr/local/lib/opencog/libexecution.so (opencog::EvaluationLink::do_evaluate(opencog::AtomSpace*, opencog::Handle const&, bool) +0x10) [0x7fa58b5ee5d0]
    38: /usr/local/lib/opencog/libexecution.so (x� +0x1840b) [0x7fa58b5ed40b]
    39: /usr/local/lib/opencog/libsmob.so (opencog::FunctionWrap::as_wrapper_p_h(opencog::Handle) +0x22) [0x7fa599fcc542]
    40: /usr/local/lib/opencog/libsmob.so (x� +0xde5c) [0x7fa599fbde5c]
    41: /usr/local/lib/opencog/libsmob.so (opencog::PrimitiveEnviron::do_call(scm_unused_struct*, scm_unused_struct*) +0x28) [0x7fa599fcf9a8]
    42: /usr/lib/libguile-2.0.so.22 (x� +0xe212a) [0x7fa59c79612a]
    43: /usr/lib/libguile-2.0.so.22 (x� +0xd4f80) [0x7fa59c788f80]
    44: /usr/lib/libguile-2.0.so.22 (x� +0x5b2ca) [0x7fa59c70f2ca]
    45: /usr/lib/libguile-2.0.so.22 (x� +0xe212a) [0x7fa59c79612a]
    46: /usr/lib/libguile-2.0.so.22 (x +0x33) [0x7fa59c718863]
    47: /usr/lib/libguile-2.0.so.22 (x +0x5b9ff) [0x7fa59c70f9ff]
    48: /usr/lib/libguile-2.0.so.22 (x +0x35) [0x7fa59c70fa95]
    49: /usr/lib/libguile-2.0.so.22 (x +0xd478c) [0x7fa59c78878c]

[2016-09-08 11:01:54:385] [ERROR] Backtrace:
In ice-9/boot-9.scm:
 157: 13 [catch #t #<catch-closure 969d5a0> ...]
In unknown file:
   ?: 12 [apply-smob/1 #<catch-closure 969d5a0>]
   ?: 11 [opencog-extension cog-evaluate! ((DefinedPredicateNode "OpenPsi: loop")
)]
In ice-9/boot-9.scm:
 157: 10 [catch #t #<catch-closure 98091a0> ...]
In unknown file:
   ?: 9 [apply-smob/1 #<catch-closure 98091a0>]
In ice-9/boot-9.scm:
 157: 8 [catch #t #<catch-closure 9809080> ...]
In unknown file:
   ?: 7 [apply-smob/1 #<catch-closure 9809080>]
In opencog/openpsi/main.scm:
  97: 6 [psi-step]
In srfi/srfi-1.scm:
 578: 5 [map #<procedure 3398560 at opencog/openpsi/main.scm:98:8 (d)> (# # # #)]
 578: 4 [map #<procedure act-and-evaluate (rule)> (#)]
In opencog/openpsi/main.scm:
  85: 3 [act-and-evaluate #]
In unknown file:
   ?: 2 [opencog-extension cog-execute! (#)]
In ice-9/boot-9.scm:
 102: 1 [#<procedure 93ea140 at ice-9/boot-9.scm:97:6 (thrown-k . args)> C++-EXCEPTION ...]
In unknown file:
   ?: 0 [apply-smob/1 #<catch-closure 9809040> C++-EXCEPTION ...]

ERROR: In procedure apply-smob/1:
ERROR: In procedure cog-execute!: Failed evaluation; see logfile for stack trace. (/home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/atoms/execution/ExecutionOutputLink.cc:159)
ABORT: C++-EXCEPTION
 (/home/leungmanhin/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:1201)
    Stack Trace:
    2: /usr/local/lib/libcogutil.so (opencog::Logger::logva(opencog::Logger::Level, char const*, __va_list_tag*) +0xa7) [0x7fa599b2b457]
    3: /usr/local/lib/libcogutil.so (opencog::Logger::Error::operator()(char const*, ...) +0x92) [0x7fa599b2b5f2]
    4: /usr/local/lib/libcogutil.so (opencog::StandardException::parse_error_message(char const*, __va_list_tag*, bool) +0x63) [0x7fa599b1d663]
    5: /usr/local/lib/libcogutil.so (opencog::StandardException::parse_error_message(char const*, char const*, __va_list_tag*, bool) +0x9a) [0x7fa599b1d73a]
    6: /usr/local/lib/libcogutil.so (opencog::RuntimeException::RuntimeException(char const*, char const*, ...) +0xb4) [0x7fa599b1d854]
    7: /usr/local/lib/opencog/libsmob.so (opencog::SchemeEval::apply_tv(std::string const&, opencog::Handle) +0x13f) [0x7fa599fcba5f]
    8: /usr/local/lib/opencog/libexecution.so (opencog::EvaluationLink::do_evaluate(opencog::AtomSpace*, opencog::Handle const&, opencog::Handle const&) +0x233) [0x7fa58b5ee813]
    9: /usr/local/lib/opencog/libexecution.so (opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool) +0x35f) [0x7fa58b5e264f]
    10: /usr/local/lib/opencog/libexecution.so (opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool) +0x70c) [0x7fa58b5e29fc]
    11: /usr/local/lib/opencog/libexecution.so (opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool) +0xc27) [0x7fa58b5e2f17]
    12: /usr/local/lib/opencog/libexecution.so (opencog::EvaluationLink::do_eval_scratch(opencog::AtomSpace*, opencog::Handle const&, opencog::AtomSpace*, bool) +0x13c9) [0x7fa58b5e36b9]
    13: /usr/local/lib/opencog/libexecution.so (opencog::EvaluationLink::do_evaluate(opencog::AtomSpace*, opencog::Handle const&, bool) +0x10) [0x7fa58b5ee5d0]
    14: /usr/local/lib/opencog/libexecution.so (x� +0x1840b) [0x7fa58b5ed40b]
    15: /usr/local/lib/opencog/libsmob.so (opencog::FunctionWrap::as_wrapper_p_h(opencog::Handle) +0x22) [0x7fa599fcc542]
    16: /usr/local/lib/opencog/libsmob.so (x� +0xde5c) [0x7fa599fbde5c]
    17: /usr/local/lib/opencog/libsmob.so (opencog::PrimitiveEnviron::do_call(scm_unused_struct*, scm_unused_struct*) +0x28) [0x7fa599fcf9a8]
    18: /usr/lib/libguile-2.0.so.22 (x� +0xe212a) [0x7fa59c79612a]
    19: /usr/lib/libguile-2.0.so.22 (x� +0xd4f80) [0x7fa59c788f80]
    20: /usr/lib/libguile-2.0.so.22 (x� +0x5b2ca) [0x7fa59c70f2ca]
    21: /usr/lib/libguile-2.0.so.22 (x� +0xe212a) [0x7fa59c79612a]
    22: /usr/lib/libguile-2.0.so.22 (x� +0x33) [0x7fa59c718863]
    23: /usr/lib/libguile-2.0.so.22 (x� +0x5b9ff) [0x7fa59c70f9ff]
    24: /usr/lib/libguile-2.0.so.22 (x� +0x35) [0x7fa59c70fa95]
    25: /usr/lib/libguile-2.0.so.22 (x� +0xd478c) [0x7fa59c78878c]
    26: /usr/lib/x86_64-linux-gnu/libgc.so.1 (x� +0x12) [0x7fa59be7dfe2]
    27: /usr/lib/libguile-2.0.so.22 (x� +0xd414c) [0x7fa59c78814c]
    28: /usr/lib/x86_64-linux-gnu/libgc.so.1 (x� +0x53) [0x7fa59be82d93]
    29: /usr/lib/x86_64-linux-gnu/libgc.so.1 (x� +0x12) [0x7fa59be7dfe2]
    30: /lib/x86_64-linux-gnu/libpthread.so.0 (x� +0x8182) [0x7fa59c49e182]
    31: /lib/x86_64-linux-gnu/libc.so.6 (x� +0x6d) [0x7fa59c1cb47d]

netcat times out

I made pull request for octomap integration, however the netcat function times out and breaks face follow function. I did it another hacky way using the same scheme function in a thread in ros_commo and that way the robot functions okay.

tracking stops in case of single detected face after face being lost and re-detected

When we run the behavior tree from hanson HEAD repository, initially the robot detects the face and tracks it. However on loosing the track of face and re-detecting any single face the tracking does not happen. When there are more faces detected however the tracking starts working while blender head moves in strange way.
An observation is that this happens when face is re-detected and exactly after the glance at new face happens a someone left rule is triggered and then the tracking does not happen

crash in btree-psi after scm_unprotect_object called on unprotected object

Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `guile -l btree-psi.scm'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007effd8efec37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007effd8efec37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007effd8f02028 in __GI_abort () at abort.c:89
#2  0x00007effd951d66a in scm_gc_unprotect_object () from /usr/lib/libguile-2.0.so.22
#3  0x00007effd708df4f in opencog::SchemeEval::do_eval (this=0x7efe500023c0, expr=...)
    at /home/hr/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:649
#4  0x00007effd708e0a3 in opencog::SchemeEval::c_wrap_eval (p=0x7efe500023c0)
    at /home/hr/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:583
#5  0x00007effd95062ca in ?? () from /usr/lib/libguile-2.0.so.22
#6  0x00007effd958d12a in ?? () from /usr/lib/libguile-2.0.so.22
#7  0x00007effd950f863 in scm_call_4 () from /usr/lib/libguile-2.0.so.22
#8  0x00007effd95069ff in ?? () from /usr/lib/libguile-2.0.so.22
#9  0x00007effd9506a95 in scm_c_with_continuation_barrier () from /usr/lib/libguile-2.0.so.22
#10 0x00007effd8c7a950 in GC_call_with_gc_active () from /usr/lib/x86_64-linux-gnu/libgc.so.1
#11 0x00007effd957f7d1 in ?? () from /usr/lib/libguile-2.0.so.22
#12 0x00007effd8c74fe2 in GC_call_with_stack_base () from /usr/lib/x86_64-linux-gnu/libgc.so.1
#13 0x00007effd957fb48 in scm_with_guile () from /usr/lib/libguile-2.0.so.22
#14 0x00007effd708e04e in opencog::SchemeEval::eval_expr (this=0x7efe500023c0, expr=...)
    at /home/hr/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:551
#15 0x00007effd6300a60 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#16 0x00007effd9295184 in start_thread (arg=0x7effb6045700) at pthread_create.c:312
#17 0x00007effd8fc237d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

(gdb) frame 3
#3  0x00007effd708df4f in opencog::SchemeEval::do_eval (this=0x7efe500023c0, expr=...)
    at /home/hr/hansonrobotics/opencog/atomspace/opencog/guile/SchemeEval.cc:649
649     scm_gc_unprotect_object(_rc);
(gdb) print expr
$1 = (const std::string &) @0x7efe7c0ca470: <incomplete type>
(gdb) print (char*)0x7efe7c0ca470
$2 = 0x7efe7c0ca470 "H\331\006|\376~"
(gdb) print *(char**)0x7efe7c0ca470
$3 = 0x7efe7c06d948 "\n"

crash in ros-behavior-scripting

in time-map.scm, car wrong pair error

stack trace :
[2016-12-13 10:55:18:996] [ERROR] Backtrace:
In ice-9/boot-9.scm:
 157: 16 [catch #t #<catch-closure 8ff79a0> ...]
In unknown file:
   ?: 15 [apply-smob/1 #<catch-closure 8ff79a0>]
   ?: 14 [opencog-extension cog-evaluate! ((DefinedPredicateNode "OpenPsi: loop$
)
)]
In ice-9/boot-9.scm:
 157: 13 [catch #t #<catch-closure 8f47f60> ...]
In unknown file:
   ?: 12 [apply-smob/1 #<catch-closure 8f47f60>]
In ice-9/boot-9.scm:
 157: 11 [catch #t #<catch-closure 8f47e00> ...]
In unknown file:
   ?: 10 [apply-smob/1 #<catch-closure 8f47e00>]
In opencog/openpsi/main.scm:
 126: 9 [psi-step]
In srfi/srfi-1.scm:
 576: 8 [map #<procedure 1774e00 at opencog/openpsi/main.scm:127:8 (d)> (# # # $
..)]
In ice-9/threads.scm:
  97: 7 [loop ((#))]
In opencog/openpsi/main.scm:
 104: 6 [act-and-evaluate #]
In unknown file:
   ?: 5 [opencog-extension cog-evaluate! (#)]
In ice-9/boot-9.scm:
 157: 4 [catch #t #<catch-closure 99de940> ...]
In unknown file:
   ?: 3 [apply-smob/1 #<catch-closure 99de940>]
In /home/mandeep/hr/opencog/ros-behavior-scripting/src/time-map.scm:
  56: 2 [look-turn-at-face (NumberNode "95213.000000")
 "gaze_at_face_point"]
In ice-9/boot-9.scm:
 102: 1 [#<procedure 8f9d740 at ice-9/boot-9.scm:97:6 (thrown-k . args)> wrong-$
ype-arg ...]
In unknown file:
   ?: 0 [apply-smob/1 #<catch-closure 99de900> wrong-type-arg ...]
ERROR: In procedure apply-smob/1:
ERROR: In procedure car: Wrong type argument in position 1 (expecting pair): ()
ABORT: wrong-type-arg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.