Skip to content

Commit

Permalink
fix ROSjava package
Browse files Browse the repository at this point in the history
  • Loading branch information
buoncubi committed Jul 20, 2019
1 parent 1f5cba5 commit 21597c4
Show file tree
Hide file tree
Showing 29 changed files with 1,314 additions and 1,593 deletions.
17 changes: 10 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
##############################################################################

cmake_minimum_required(VERSION 2.8.3)
project(sit)
project(scene_identification_tagging)

##############################################################################
# Catkin
##############################################################################

#find_package(catkin REQUIRED multi_ontology_reference owloop_pkg rosjava_build_tools) #ros_java_msgs
find_package(catkin REQUIRED rosjava_build_tools multi_ontology_reference owl_oop)

# Set the gradle targets you want catkin's make to run by default, e.g.
# catkin_rosjava_setup(installApp)
# Note that the catkin_create_rosjava_xxx scripts will usually automatically
# add tasks to this for you when you create subprojects.
catkin_rosjava_setup(install installApp publishMavenJavaPublicationToMavenRepository)
catkin_rosjava_setup(install publishMavenJavaPublicationToMavenRepository)

catkin_package()

Expand All @@ -25,7 +25,10 @@ catkin_package()

# Change this to match the maven group name you have specified in the
# allprojects closure the root build.gradle
install(DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_MAVEN_DESTINATION}/it/emarolab/${PROJECT_NAME}/
DESTINATION ${CATKIN_GLOBAL_MAVEN_DESTINATION}/it/emarolab/${PROJECT_NAME})

# install(DIRECTORY ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/ DESTINATION ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME})
#install(DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_MAVEN_DESTINATION}/it/emarolab/${PROJECT_NAME}/
# DESTINATION ${CATKIN_GLOBAL_MAVEN_DESTINATION}/it/emarolab/${PROJECT_NAME})

#fix of the above command for supporting `catkin_make install`
#(thanks Taha Elsenosy for suggesting this correctionon in the issue: https://github.com/EmaroLab/multi_ontology_reference/issues/6)
install(DIRECTORY ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/
DESTINATION ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME})
903 changes: 284 additions & 619 deletions LICENSE

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Scene Identification & Tagging (SIT)

A semantic algorithm to learn and recognise composition ob objects based on their qualitative spatial relations.

## Dependences

This implementation depends on [OWLOOP](https://github.com/EmaroLab/owloop).
It is implemented within the Robotic Operative System (ROS) Java bridge.
The compilation is based on Gradle and you can find a complete list of dependencies versions
in the [buld.gradle](https://github.com/EmaroLab/scene_identification_tagging/blob/sit_owloop/sit/build.gradle) file.
Check out also the

## Documentation

The [resource](https://github.com/EmaroLab/scene_identification_tagging/tree/sit_owloop/resources/)
folders contains the Javadoc documentation in the as well as the ontology that represents the tbox
of this implementation.
Check also the [Test](https://github.com/EmaroLab/scene_identification_tagging/blob/sit_owloop/sit/src/main/java/it/emarolab/scene_identification_tagging/Test.java)
runnable class to see how the algorithm can be implemented by using this API.

## Algorithm

The algorithm is based on an OWL ontology, the Pellet reasoner and couple of mapping functions.
Its main purposes is to describe primitive objects though geometric coefficients that
define their shape. Than, qualitative spatial relations, such as: *right/left*, *front/behind*, *above/below*,
*parallel*, *perpendicular* and *coaxial* are computed symbolically. Those are mapped in an concrete scene
representation (i.e.: an individual). The recognition phase is based on instance checking by looking
for the abstract scene representation (i.e.: classes) that classify the scene individual.
If those does not exist the algorithm is able to use the concrete scene as a template to
learn its abstract class to be used for further classification. Noteworthy, the
system is automatically able to reason about similarity between learned scene.
Also, it can be the case that a very complex scene is recognised by a relative small number of relation
that hold (i.e.: a sub scene). To discriminate when those differences are too height, and
trigger a new learning procedure, the concept of *confidence* is introduce as a number within [0,1].

### Contacts

Work are progressing to give you more details about the algorithm.
In the middle while, for any information, support, discussion or comments do not hesitate to contact me through this Github repository or at:
[[email protected]](mailto:[email protected]),
36 changes: 16 additions & 20 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
/*
* Copyright (C) 2017 Luca Buoncompagni, Syed Yusha kareem.
* Copyright (C) 2017 Luca Buoncompagni
*
* Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
* You may obtain a copy of the License at https://www.gnu.org/licenses/gpl-3.0.en.html
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/


task wrapper(type: Wrapper) {
gradleVersion = '2.2.1'
}

//version '2.2'

buildscript {
apply from: "https://github.com/rosjava/rosjava_bootstrap/raw/indigo/buildscript.gradle"
}
Expand All @@ -28,18 +37,6 @@ allprojects {
}

subprojects {

task deployApp() << {
File binDir = new File(project.projectDir, '/bin')
if (! binDir.isDirectory()) {
println "Creating $binDir directory"
binDir.mkdirs()
}
File link = new File(binDir,"execute")
File target = new File(project.projectDir, "build/install/$project.name/bin/$project.name")
println "Creating symlink from $link.absolutePath to $target.absolutePath"
ant.symlink(link: link.absolutePath, resource: target.absolutePath, overwrite: true)
}
/*
* The ros plugin configures a few things:
*
Expand All @@ -55,7 +52,7 @@ subprojects {
/*
* Some IDE support if you use it.
*/
/* apply plugin: "eclipse" */
/* apply plugin: "eclipse"*/
apply plugin: "idea"

allprojects {
Expand All @@ -76,6 +73,5 @@ subprojects {
If you're using catkin_make, this is not important, since it will use the task list specified
in CMakeLists.txt
*/
defaultTasks 'tasks'


defaultTasks 'tasks'
57 changes: 26 additions & 31 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,12 @@
##
##############################################################################

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

Expand All @@ -48,7 +30,6 @@ die ( ) {
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
Expand All @@ -59,11 +40,31 @@ case "`uname`" in
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
Expand All @@ -89,7 +90,7 @@ location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
Expand All @@ -113,7 +114,6 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
Expand Down Expand Up @@ -161,9 +161,4 @@ function splitJvmOpts() {
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
Loading

0 comments on commit 21597c4

Please sign in to comment.