Commit 9e15ac0a authored by Christian Willms's avatar Christian Willms
Browse files

initial commit

parent 8c7b9705
FROM openjdk:11
# Set environment
RUN apt -q -qq update && \
DEBIAN_FRONTEND=noninteractive apt install -y \
apt-utils \
libasound2 \
libdbus-glib-1-2 \
libgtk-3-0 \
libgl1-mesa-dri \
libgl1-mesa-glx \
libxrender1 \
libx11-xcb-dev \
libx11-xcb1 \
libxt6 \
libpulse0 \
libcanberra-gtk-module \
libcanberra-gtk3-module \
xz-utils \
--no-install-recommends
ENV JAVA_HOME /opt/jdk
ENV PATH ${PATH}:${JAVA_HOME}/bin
COPY data data
COPY src/main/resources src/main/resources
#COPY config.yml config.yml
COPY target/rolli-jar-with-dependencies.jar rolli-jar-with-dependencies.jar
EXPOSE 8000
ENTRYPOINT ["java", "-jar", "rolli-jar-with-dependencies.jar"]
\ No newline at end of file
##[Diverse Notizen, Implementierungsfahrplan, etc.](./doc/notes.md)
# Installation of the Intuitiv project (including Vonda for Rolli compilation)
#install apache thrift (version 0.12.0 or higher) on your machine
#for linux:
git clone https://github.com/bkiefer/vonda.git
cd vonda
git checkout developer
./install_locallibs.sh
mvn clean install
# make sure bin/vondac is in PATH
cd..
git clone git@mlt-gitlab.sb.dfki.de:willms/Intuitiv.git
cd Intuitiv
git checkout developer
git submodule init
git submodule update
./install_submodules.sh
#Test
./compile
./run.sh
# Conversion of .osm files into .owl resp .nt files
First, clone and compile (`mvn install`) the osm2owl project:
git clone git@mlt-gitlab.sb.dfki.de:chbi02/osm2owl.git
Use the `convert.sh` to do the conversion, for the DFKI test data like this.
./convert.sh ~/data/ontology/osm/osm.owl ~/code/src/test/resources/DFKI-3.osm osmdatadfki
**Attention, your path to osm.owl or \*.osm may vary.**
It will put the resulting `.owl` file into the place where the `osm.owl` lives,
it's a good idea to supply the (optional) output name (here: `osmdatadfki`) so
it ends up in its own directory.
# Instructions for Rolland-Simulation
### Setup
First, setup ubuntu repositories for ROS according to:
<http://wiki.ros.org/melodic/Installation/Ubuntu>
(And possibly also for [gazebo](<http://www.gazebosim.org/tutorials?tut=install_ubuntu>), should not be necessary)
sudo apt install ros-melodic-desktop-full
sudo apt install ros-melodic-ddynamic-reconfigure
sudo apt install ros-melodic-depthimage-to-laserscan
sudo apt install gazebo
git clone git@github.com:bkiefer/audio_common.git
git clone git@git-int.hb.dfki.de:intuitiv/intuitiv_simulation.git
git clone <https://github.com/IntelRealSense/realsense-ros.git>
git clone <https://github.com/pal-robotics/ddynamic_reconfigure.git>
git clone <https://github.com/srl-freiburg/pedsim_ros.git> *branch* melodic-dev
Visit this site and install the developer and debug packages,
`dkms` and `de.dfki.intuitiv.utils` are **not** needed:
<https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md>
On this page, check installing the packages:
sudo apt-get install librealsense2-dev
sudo apt-get install librealsense2-dbg
### Build the Intuitiv simulation etc.
cd catkin_ws
source devel/setup.bash
catkin_make
Start the simulator (gazebo) with
`roslaunch intuitiv_simulation saarschleife_og.launch`
to start localisation:
`roslaunch intuitiv_simulation localisation.launch`
Now set the initial pose in Rviz, so that the localisation guess is aecceptable.
To do so, you have to select the Fixed Frame map in rviz. To steer the robot,
you can use, e.g.:
`rosrun rqt_robot_steering rqt_robot_steering`
## Testing dialogues
First compile all rules, then start the test interface using `./run.sh`.
Source your RosWorkspace and start all components using `ŗos launch spreechprocessing speechprocessing.launch`
Enter the following statements into the test interface:
setDestination(-17.62, -2.45)
setTask(-17.22, 0.91)
setLocation(-17.619, -2.45)
## Setup ROS Interface
To setup the ROS components of this project
1. Install `catkin_virtualenv` in our ros repository http://wiki.ros.org/catkin_virtualenv
2. Download and install the deepspeech speechrecognizer package for python
git clone https://github.com/fossasia/speech_recognition.git
make sure to checkout the deepspeech branch
to install the package just navigate to its root directory and run `python3 setup.py install`
3. please move the `ros\speech_processing` folder into your ros workspace.
The resulting structure should look similar to:
catkin_ws\
- devel\..
- build\..
+ src\
- speech_processing\
- launch\
- scripts\
CMakeList.txt
package.xml
requirements.txt
##[Dialogue acts provided by the NLU](./doc/dialogueActs.md)
## Docker Images
To start the Vonda Docker run
docker run --net=host --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw" test_intuitiv:latest
find sound outputs: `cat /proc/asound/modules` then test sound `speaker-test -c2 -twav -l7 -D plughw:1,0`
docker docker run -t -i --privileged -v /dev/bus/usb:/dev/bus/usb tts_intuitiv:latest
if you encounter any errors related to X11 try to run `xhost +"local:docker@"` on your host system
## Use the GUI to test
1. create a task setTask(Valerie Poser, POI_1, POI_2, Blutabnahme)
setTask(Valerie Poser, POI_J1, POI_J2, Blutabnahme)
setLocation(2.53, -0.175, 0)
// the robot should now drive to POI_1
2. set location setLocation(12.0, 33.0, 0)
3. set POI reached reachedPOI()
// trigger the greeting dialogue
538703c6f1a54a10a239f9218427a61d
\ No newline at end of file
#!/bin/sh
script_dir=`dirname $0`
echo "mvn clean ..."
mvn clean
echo "vonda compile ..."
vondac "$@" -c "$script_dir/config.yml"
echo "mvn install"
mvn install
\ No newline at end of file
inputFile: src/main/rudi/Example.rudi
outputDirectory: src/main/gen-java
wrapperClass: de.dfki.vondabase.BaseAgent
ontologyFile: data/ini/example.ini
floor: 1
checkTypes: true
failOnError: false
verbose: false
GUI_enabled: true
REST_enabled: true
tts_blocking: true # set to false if you don't want that the tts output and speech bubbles on the avatar are synchronized
rootPackage: de.dfki.vondabase
serversocket: 11666
RestAPI:
Port: 8086
DataLoc: "src/main/resources/static" #tested
#KoffiURI: "http://192.168.182.5:8888" #gestalt
KoffiURI: "http://172.16.100.124:8089" #dfki
R3: "/workflow/cancel" #teste
R4: "/workflow/goto" #tested
R5: "/workflow/memorize_person" #tested
R10: "/workflow/follow_memorized_person" #tested
R11: "/workflow/go_home" #tested
ROSBridge:
EwalkerGoal: 11116
nameToURI:
Agent : <dom:Actor>
Robot : <dom:Robot>
defaultCompileCommand: compile
customCompileCommands:
Compile without maven: vondac -c config.yml
debugPort : 9999
TTS:
voice: dfki-pavoque-neutral-hsmm
backup: false
NLG:
de:
mapperProject: src/main/resources/grammars/cplanner/allrules-mapper
generationProject: src/main/resources/grammars/cplanner/allrules
NLU:
de:
class: de.dfki.vondabase.nlu.CombinedNLU
grammar: src/main/resources/grammars/srgs/rolli.gram
command: "NDSP_APP_CMD"
languageCode: "deu-DEU"
codec: "audio/L16;rate=16000"
context_tag: "A553_C1"
appKey: "548871ADCA4610ECFCF29EDC6E098516975E7D6DB4BBB0368E943CCA6E8DFA3E20962C6129D34944E1817AE04791B6D15A520D6A6AF9320ACCE92EA15206489B"
nmaid: "NMDPTRIAL_chwi02_dfki_de20180108105402"
hostname: "wss://autotesting-azure-use2-cvt1-voice-ws.nuancemobility.net/v2"
#
# this simulates OWLIM's owl-horst_partialRDFS_builtin.pie rule file that builds
# on the rule semantics for OWL as published by ter Horst which is based on Hayes'
# work for axiomatizing RDF Schema;
# I have split up rule $owl_FunctProp into $owl_FunctPropObject and
# $owl_FunctPropDatatype, since the nature of the object of the triple either
# leads to a owl:sameAs statement or to the bottom type owl:Nothing;
#
# NOTE: this file should only be used with HFC when the Boolean flag
# equivalenceClassReduction in class TupleStore is turned on (default = off);
# this file thus does NOT contain the rules copying over information
# from subject, predicate, and object position as originally specified by
# o $owl_sameAsCopySubj
# o $owl_equivalentPropertyCopyPred
# o $owl_sameAsCopyObj
#
# @see TupleStore.equivalenceClassReduction
#
# @author Hans-Ulrich Krieger
# @version Mon Jul 5 16:29:39 CEST 2010
#
# NOTE: $rdf1_rdfs4a_4b (= rdf1 & rdfs4a & rdfs4b) modified;
# not interested that ?s, ?p, and ?o are all of rdf:type rdfs:Resource;
# only add that ?p is of rdf:type rdf:Property
$rdf1_rdfs4a_4b
?_s ?p ?_o "0"^^<xsd:long>
->
?p <rdf:type> <rdf:Property> "0"^^<xsd:long>
$rdfs2
?s ?p ?_o "0"^^<xsd:long>
?p <rdfs:domain> ?dom "0"^^<xsd:long>
->
?s <rdf:type> ?dom "0"^^<xsd:long>
@test
?p != <rdf:type>
# added second clause (HUK)
$rdfs3
?_s ?p ?o "0"^^<xsd:long>
?p <rdf:type> <owl:ObjectProperty> "0"^^<xsd:long>
?p <rdfs:range> ?rng "0"^^<xsd:long>
->
?o <rdf:type> ?rng "0"^^<xsd:long>
# NOTE: redundant rule -- implemented through owl:TransitiveProperty
#$rdfs5
#?p <rdfs:subPropertyOf> ?q "0"^^<xsd:long>
#?q <rdfs:subPropertyOf> ?r "0"^^<xsd:long>
#->
#?p <rdfs:subPropertyOf> ?r "0"^^<xsd:long>
#@test
#?p != ?q
#?p != ?r
#?q != ?r
$rdfs6
?p <rdf:type> <rdf:Property> "0"^^<xsd:long>
->
?p <rdfs:subPropertyOf> ?p "0"^^<xsd:long>
$rdfs7
?s ?p ?o "0"^^<xsd:long>
?p <rdfs:subPropertyOf> ?q "0"^^<xsd:long>
->
?s ?q ?o "0"^^<xsd:long>
@test
?p != ?q
# replaced rdfs:Class by owl:Class;
# or we add a further axiom that owl:Class is a subclass of rdfs:Class as it is
# enforced for OWL Lite and OWL DL
# NOTE: this rule only implements rdfs10 (note that ?c is a subclass of rdfs:Resource)
$rdfs8_10
?c <rdf:type> <owl:Class> "0"^^<xsd:long>
->
?c <rdfs:subClassOf> ?c "0"^^<xsd:long>
# universal instantiation
$rdfs9
?i <rdf:type> ?c "0"^^<xsd:long>
?c <rdfs:subClassOf> ?d "0"^^<xsd:long>
->
?i <rdf:type> ?d "0"^^<xsd:long>
@test
?c != ?d
# NOTE: redundant rule -- implemented through owl:TransitiveProperty
# NOTE: no rule defined for rdfs:subPropertyOf -- again redundant through
# the characterization as being a transitive property
#$rdfs11
#?c <rdfs:subClassOf> ?d "0"^^<xsd:long>
#?d <rdfs:subClassOf> ?e "0"^^<xsd:long>
#->
#?c <rdfs:subClassOf> ?e "0"^^<xsd:long>
#@test
#?c != ?d
#?c != ?e
#?d != ?e
# NOTE: $rdfs12 omitted -- deals with rdfs:member
# will not fire for our OWL ontologies
# NOTE: $rdfs13 omitted -- deals with rdfs:Literal
# will not fire for our OWL ontologies
$owl_invOf
?s ?p ?o "0"^^<xsd:long>
?p <owl:inverseOf> ?q "0"^^<xsd:long>
->
?o ?q ?s "0"^^<xsd:long>
$owl_invOfBySymProp
?p <rdf:type> <owl:SymmetricProperty> "0"^^<xsd:long>
->
?p <owl:inverseOf> ?p "0"^^<xsd:long>
$owl_SymPropByInverse
?p <owl:inverseOf> ?p "0"^^<xsd:long>
->
?p <rdf:type> <owl:SymmetricProperty> "0"^^<xsd:long>
# original rule name is: rdfp3;
# rule was _not_ part of the OWLIM definition (why?)
$owl_SymmetricProperty
?p <rdf:type> <owl:SymmetricProperty> "0"^^<xsd:long>
?s ?p ?o "0"^^<xsd:long>
->
?o ?p ?s "0"^^<xsd:long>
$owl_TransProp
?p <rdf:type> <owl:TransitiveProperty> "0"^^<xsd:long>
?x ?p ?y "0"^^<xsd:long>
?y ?p ?z "0"^^<xsd:long>
->
?x ?p ?z "0"^^<xsd:long>
@test
?x != ?y
?y != ?z
# second clause has been added to guarantee proper application context
# note: rule will be automatically rewritten
$owl_FunctPropObject
?p <rdf:type> <owl:FunctionalProperty> "0"^^<xsd:long>
?p <rdf:type> <owl:ObjectProperty> "0"^^<xsd:long>
?x ?p ?y "0"^^<xsd:long>
?x ?p ?z "0"^^<xsd:long>
->
?y <owl:sameAs> ?z "0"^^<xsd:long>
@test
?y != ?z
?p != <rdf:type>
# NOT part of the original rule set, a kind of integrity constraint, deriving
# that an individual is of type owl:Nothing;
# NOTE: currently commented out !!!!!!!!!!!!!!
#$owl_FunctPropDatatype
#?p <rdf:type> <owl:FunctionalProperty> "0"^^<xsd:long>
#?p <rdf:type> <owl:DatatypeProperty> "0"^^<xsd:long>
#?x ?p ?y "0"^^<xsd:long>
#?x ?p ?z "0"^^<xsd:long>
#->
#?x <rdf:type> <owl:Nothing> "0"^^<xsd:long>
#@test
#?y != ?z
#?p != <rdf:type>
# holds for both datatype and object properties
# note: rule will be automatically rewritten
$owl_InvFunctProp
?p <rdf:type> <owl:InverseFunctionalProperty> "0"^^<xsd:long>
?y ?p ?x "0"^^<xsd:long>
?z ?p ?x "0"^^<xsd:long>
->
?y <owl:sameAs> ?z "0"^^<xsd:long>
@test
?y != ?z
?p != <rdf:type>
# note: rule will be automatically rewritten
$owl_EquivClassBySubClass
?x <rdfs:subClassOf> ?y "0"^^<xsd:long>
?y <rdfs:subClassOf> ?x "0"^^<xsd:long>
->
?x <owl:equivalentClass> ?y "0"^^<xsd:long>
@test
?x != ?y
# note: rule will be automatically rewritten
$owl_EquivPropBySubProp
?p <rdfs:subPropertyOf> ?q "0"^^<xsd:long>
?q <rdfs:subPropertyOf> ?p "0"^^<xsd:long>
->
?p <owl:equivalentProperty> ?q "0"^^<xsd:long>
@test
?p != ?q
$owl_typeByAllVal
?x <owl:onProperty> ?p "0"^^<xsd:long>
?u <rdf:type> ?x "0"^^<xsd:long>
?x <owl:allValuesFrom> ?y "0"^^<xsd:long>
?u ?p ?v "0"^^<xsd:long>
->
?v <rdf:type> ?y "0"^^<xsd:long>
$owl_typeByHasVal
?r <owl:onProperty> ?p "0"^^<xsd:long>
?r <owl:hasValue> ?v "0"^^<xsd:long>
?i ?p ?v "0"^^<xsd:long>
->
?i <rdf:type> ?r "0"^^<xsd:long>
$owl_AttrByHasVal
?x <owl:hasValue> ?y "0"^^<xsd:long>
?x <owl:onProperty> ?p "0"^^<xsd:long>
?u <rdf:type> ?x "0"^^<xsd:long>
->
?u ?p ?y "0"^^<xsd:long>
$owl_typeBySomeVal
?q <rdf:type> ?c "0"^^<xsd:long>
?r <owl:onProperty> ?p "0"^^<xsd:long>
?r <owl:someValuesFrom> ?c "0"^^<xsd:long>
?i ?p ?q "0"^^<xsd:long>
->
?i <rdf:type> ?r "0"^^<xsd:long>
$owl_subClassByInters1
?c <owl:intersectionOf> ?x "0"^^<xsd:long>
?x <rdf:first> ?y "0"^^<xsd:long>
->
?c <rdfs:subClassOf> ?x "0"^^<xsd:long>
?c <rdfs:subClassOf> ?y "0"^^<xsd:long>
$owl_subClassByInters2
?x <rdf:rest> ?y "0"^^<xsd:long>
?c <owl:intersectionOf> ?x "0"^^<xsd:long>
->
?x <owl:intersectionOf> ?y "0"^^<xsd:long>
@test
?y != <rdf:nil>
$owl_typeByIntersect_1
?b <rdf:first> ?c "0"^^<xsd:long>
?b <rdf:rest> <rdf:nil> "0"^^<xsd:long>
?z <owl:intersectionOf> ?b "0"^^<xsd:long>
?i <rdf:type> ?c "0"^^<xsd:long>
->
?i <rdf:type> ?b "0"^^<xsd:long>
$owl_typeByIntersect_2
?b <rdf:first> ?c "0"^^<xsd:long>
?i <rdf:type> ?c "0"^^<xsd:long>
?i <rdf:type> ?b "0"^^<xsd:long>
?n <owl:intersectionOf> ?b "0"^^<xsd:long>
->
?i <rdf:type> ?n "0"^^<xsd:long>
#
# this simulates OWLIM's owl-horst_partialRDFS_builtin.pie rule file that builds
# on the rule semantics for OWL as published by ter Horst which is based on Hayes'
# work for axiomatizing RDF Schema;
# I have split up rule $owl_FunctProp into $owl_FunctPropObject and
# $owl_FunctPropDatatype, since the nature of the object of the triple either
# leads to a owl:sameAs statement or to the bottom type owl:Nothing;
#
# NOTE: this file should only be used with HFC when the Boolean flag
# equivalenceClassReduction in class TupleStore is turned on (default = off);
# this file thus does NOT contain the rules copying over information
# from subject, predicate, and object position as originally specified by
# o $owl_sameAsCopySubj
# o $owl_equivalentPropertyCopyPred
# o $owl_sameAsCopyObj
#
# @see TupleStore.equivalenceClassReduction
#
# @author Hans-Ulrich Krieger
# @version Mon Jul 5 16:29:39 CEST 2010
#
# NOTE: $rdf1_rdfs4a_4b (= rdf1 & rdfs4a & rdfs4b) modified;
# not interested that ?s, ?p, and ?o are all of rdf:type rdfs:Resource;
# only add that ?p is of rdf:type rdf:Property
$rdf1_rdfs4a_4b
?_s ?p ?_o
->
?p <rdf:type> <rdf:Property>
$rdfs2
?s ?p ?_o
?p <rdfs:domain> ?dom
->
?s <rdf:type> ?dom
@test
?p != <rdf:type>
# added second clause (HUK)
$rdfs3
?_s ?p ?o
?p <rdf:type> <owl:ObjectProperty>
?p <rdfs:range> ?rng
->
?o <rdf:type> ?rng
# NOTE: redundant rule -- implemented through owl:TransitiveProperty
#$rdfs5
#?p <rdfs:subPropertyOf> ?q
#?q <rdfs:subPropertyOf> ?r
#->
#?p <rdfs:subPropertyOf> ?r
#@test
#?p != ?q
#?p != ?r
#?q != ?r
$rdfs6
?p <rdf:type> <rdf:Property>
->
?p <rdfs:subPropertyOf> ?p
$rdfs7
?s ?p ?o
?p <rdfs:subPropertyOf> ?q
->
?s ?q ?o
@test
?p != ?q
# replaced rdfs:Class by owl:Class;
# or we add a further axiom that owl:Class is a subclass of rdfs:Class as it is
# enforced for OWL Lite and OWL DL
# NOTE: this rule only implements rdfs10 (note that ?c is a subclass of rdfs:Resource)
$rdfs8_10
?c <rdf:type> <owl:Class>
->
?c <rdfs:subClassOf> ?c
# universal instantiation
$rdfs9
?i <rdf:type> ?c
?c <rdfs:subClassOf> ?d
->
?i <rdf:type> ?d