Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
VisLab Técnico Lisboa committed Mar 31, 2016
2 parents 7eac1c7 + 77c2b87 commit cfe4126
Show file tree
Hide file tree
Showing 75 changed files with 130,079 additions and 1,430 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@ Speech recognition dependencies:

### Linux

Installation of the core POETICON++ build:

git clone https://github.com/robotology/poeticon
cd poeticon && mkdir build && cd build && cmake .. && make

Instructions to install libPRADA, required by the probabilistic planner:
First install libPRADA, required by the probabilistic planner:

cd poeticon
tar xzvf 3rdparty/libPRADA.tgz && cd libPRADA
Expand All @@ -49,6 +44,13 @@ Instructions to install libPRADA, required by the probabilistic planner:
make
cp test/relational_plan/x.exe ../app/conf/planner.exe

Then install the core POETICON++ build:

git clone https://github.com/robotology/poeticon
cd poeticon && mkdir build && cd build && cmake .. && make

Note: the modules belonging to the probabilistic planner part (planningCycle, affordanceCommunication, geometricGrounding, goalCompiler) must have access to the same "contexts/poeticon" directory. One way to accomplish this is to run them on the same machine.

## Documentation

Please refer to the documentation inside each module, and to the help commands available via RPC interfaces.
Expand Down
20 changes: 16 additions & 4 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,18 @@ set(APPNAME poeticon)
file(GLOB conf ${CMAKE_CURRENT_SOURCE_DIR}/conf/*.ini)
file(GLOB scripts ${CMAKE_CURRENT_SOURCE_DIR}/scripts/*.template)

file(GLOB prada ${CMAKE_CURRENT_SOURCE_DIR}/conf/planner.exe)
file(GLOB pradaFiles ${CMAKE_CURRENT_SOURCE_DIR}/conf/config ${CMAKE_CURRENT_SOURCE_DIR}/conf/*.dat)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/conf/planner.exe")
set(prada_FOUND ON)
message(STATUS "libPRADA found")
else()
set(prada_FOUND OFF)
message(WARNING "libPRADA not found")
endif()

if(prada_FOUND)
file(GLOB prada ${CMAKE_CURRENT_SOURCE_DIR}/conf/planner.exe)
file(GLOB pradaFiles ${CMAKE_CURRENT_SOURCE_DIR}/conf/config ${CMAKE_CURRENT_SOURCE_DIR}/conf/*.dat)
endif()

set(lua_fsm ${CMAKE_CURRENT_SOURCE_DIR}/lua/poeticon_root_fsm.lua)
set(lua_bin ${CMAKE_CURRENT_SOURCE_DIR}/lua/poeticon_main.lua)
Expand All @@ -25,8 +35,10 @@ icubcontrib_set_default_prefix()
yarp_install(FILES ${conf} DESTINATION ${ICUBCONTRIB_CONTEXTS_INSTALL_DIR}/${APPNAME})
yarp_install(FILES ${scripts} DESTINATION ${ICUBCONTRIB_APPLICATIONS_TEMPLATES_INSTALL_DIR})

yarp_install(PROGRAMS ${prada} DESTINATION ${ICUBCONTRIB_CONTEXTS_INSTALL_DIR}/${APPNAME})
yarp_install(FILES ${pradaFiles} DESTINATION ${ICUBCONTRIB_CONTEXTS_INSTALL_DIR}/${APPNAME})
if(prada_FOUND)
yarp_install(PROGRAMS ${prada} DESTINATION ${ICUBCONTRIB_CONTEXTS_INSTALL_DIR}/${APPNAME})
yarp_install(FILES ${pradaFiles} DESTINATION ${ICUBCONTRIB_CONTEXTS_INSTALL_DIR}/${APPNAME})
endif()

yarp_install(PROGRAMS ${lua_fsm} DESTINATION ${ICUBCONTRIB_CONTEXTS_INSTALL_DIR}/${APPNAME}/lua)

Expand Down
2 changes: 1 addition & 1 deletion app/conf/pre_rules.dat
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ OUTCOMES:
ACTION:
grasp__obj_with__hand()
CONTEXT:
-_obj_ishand() _hand_clearhand() _hand_ishand() _obj_isreachable_with__hand() -_ALL_on__obj()
-_obj_ishand() _hand_clearhand() _hand_ishand() _obj_isreachable_with__hand() -_ALL_on__obj() -_obj_inhand__OTHERHAND()
OUTCOMES:
0.95 _obj_inhand__hand() -_hand_clearhand()
0.05 <noise>
Expand Down
2 changes: 1 addition & 1 deletion app/lua/poeticon_main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ object_port = yarp.Port()
poeticon_port = yarp.Port()

-- defining objects and actions vocabularies
objects = {"rake", "meat", "cheese", "tomato", "stick", "bun-bottom", "bun-top"}
objects = {"Rake", "Stick", "Ham", "Tomato", "Bun-bottom", "Bun-top"}
actions = {"{point at}", "{what is this}"}

-- defining speech grammar for Menu
Expand Down
97 changes: 97 additions & 0 deletions app/scripts/classifyRoi.xml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<application>
<name>Classify Observe ROI </name>

<dependencies>
<port>/icub/camcalib/left/out</port>
<port>/icub/camcalib/right/out</port>
<port>/iKinGazeCtrl/rpc</port>
</dependencies>

<module>
<name>dispBlobber</name>
<parameters>--minBlobSize 1000</parameters>
<node>icub21</node>
</module>
<module>
<name>caffeCoder</name>
<parameters>--name caffeCoderRoi</parameters>
<node>icub-tesla</node>
</module>
<module>
<name>linearClassifierModule</name>
<parameters>--name linearClassifierModuleRoi --BufferSize 1 --CSVM 1.0 --databaseFolder ROIDatabase --WeightedSVM 1</parameters>
<node>icub-b1</node>
</module>
<module>
<name>himrepClassifier</name>
<parameters>--name himrepClassifierRoi</parameters>
<node>icub21</node>
</module>
<module>
<name>objectsPropertiesCollector</name>
<parameters>--name memoryRoi --db memory_CAFFE_ROI.ini</parameters>
<node>icub-b2</node>
</module>
<module>
<name>yarpview</name>
<parameters>--name /roiViewer/nearBlob --compact</parameters>
<node>icub22</node>
</module>

<connection>
<from>/activityInterface/imgClassifier:o</from>
<to>/himrepClassifierRoi/img:i</to>
<protocol>tcp</protocol>
</connection>
<connection>
<from>/activityInterface/classify:rpc</from>
<to>/himrepClassifierRoi/rpc</to>
<protocol>tcp</protocol>
</connection>

<connection>
<from>/himrepClassifierRoi/img:o</from>
<to>/caffeCoderRoi/img:i</to>
<protocol>tcp</protocol>
</connection>
<connection>
<from>/caffeCoderRoi/code:o</from>
<to>/himrepClassifierRoi/features:i</to>
<protocol>tcp</protocol>
</connection>
<connection>
<from>/himrepClassifierRoi/features:o</from>
<to>/linearClassifierModuleRoi/features:i</to>
<protocol>tcp</protocol>
</connection>
<connection>
<from>/linearClassifierModuleRoi/scores:o</from>
<to>/himrepClassifierRoi/scores:i</to>
<protocol>tcp</protocol>
</connection>
<connection>
<from>/himrepClassifierRoi/classify:rpc</from>
<to>/linearClassifierModuleRoi/rpc</to>
<protocol>tcp</protocol>
</connection>
<connection>
<from>/caffeCoderRoi/img:o</from>
<to>/himrepClassifierRoi/SIFTimg:i</to>
<protocol>tcp</protocol>
</connection>
<connection>
<from>/himrepClassifierRoi/opc</from>
<to>/memoryRoi/rpc</to>
<protocol>tcp</protocol>
</connection>
<connection>
<from>/SFM/disp:o</from>
<to>/dispBlobber/img:i</to>
<protocol>tcp</protocol>
</connection>
<connection>
<from>/dispBlobber/opt:o</from>
<to>/roiViewer/nearBlob</to>
<protocol>tcp</protocol>
</connection>
</application>
Loading

0 comments on commit cfe4126

Please sign in to comment.