diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f399fd1..b652feb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,6 +5,7 @@
- catkin_make
- cd src
- cp -r /builds/$GITLAB_USER_LOGIN/mementar .
+ - git clone -b proba https://github.com/sarthou/ontologenius.git
- cd ..
- catkin_make
@@ -15,8 +16,11 @@
- catkin_make
- cd src
- cp -r /builds/$GITLAB_USER_LOGIN/mementar .
+ - git clone -b proba https://github.com/sarthou/ontologenius.git
- cd ..
- catkin_make
+ - source devel/setup.bash
+ - catkin_make run_tests_mementar_rostest -j1 && catkin_make test -j1 -DCATKIN_WHITELIST_PACKAGES="mementar"
.kinetic_before_template : &kinetic_before_definition
before_script:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2882fd0..b254b74 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,7 @@ find_package(catkin REQUIRED COMPONENTS
genmsg
message_generation
pluginlib
+ ontologenius
)
## System dependencies are found with CMake's conventions
@@ -21,6 +22,7 @@ find_package(Boost REQUIRED COMPONENTS system)
find_package(cmake_modules REQUIRED)
find_package(pluginlib REQUIRED)
find_package(Qt5 COMPONENTS Core Gui Widgets PrintSupport)
+find_package(OpenCV REQUIRED)
################################################
@@ -30,7 +32,9 @@ find_package(Qt5 COMPONENTS Core Gui Widgets PrintSupport)
## Generate messages in the 'msg' folder
add_message_files(
FILES
- MementarEvent.msg
+ MementarAction.msg
+ MementarExplanation.msg
+ MementarOccasion.msg
StampedString.msg
)
@@ -38,8 +42,8 @@ find_package(Qt5 COMPONENTS Core Gui Widgets PrintSupport)
add_service_files(
FILES
MementarService.srv
- MementarEventSubscription.srv
- MementarEventUnsubscription.srv
+ MementarOccasionSubscription.srv
+ MementarOcassionUnsubscription.srv
)
## Generate added messages and services with any dependencies listed here
@@ -60,7 +64,8 @@ find_package(Qt5 COMPONENTS Core Gui Widgets PrintSupport)
catkin_package(
INCLUDE_DIRS include
LIBRARIES mementar_lib
- CATKIN_DEPENDS roscpp rospy std_msgs
+ CATKIN_DEPENDS roscpp rospy std_msgs ontologenius
+ DEPENDS OpenCV
)
###########
@@ -70,7 +75,7 @@ catkin_package(
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
- include
+ include include/mementar/API
${catkin_INCLUDE_DIRS}
)
@@ -81,65 +86,95 @@ include_directories(
## ARCHIVING & COMPRESSION
##############################
+##############################
+## EVENTS
+##############################
+
+add_library(mementar_events_lib
+ src/core/Occasions/Subscription.cpp
+ src/core/Occasions/OccasionsManager.cpp
+)
+target_link_libraries(mementar_events_lib ${catkin_LIBRARIES})
+add_dependencies(mementar_events_lib ${catkin_EXPORTED_TARGETS} mementar_gencpp)
+
##############################
## CORE
##############################
add_library(mementar_compression_lib
- src/core/archiving_compressing/binaryManagement/BitFileGenerator.cpp
- src/core/archiving_compressing/binaryManagement/BitFileGetter.cpp
- src/core/archiving_compressing/compressing/LzCompress.cpp
- src/core/archiving_compressing/compressing/LzUncompress.cpp
- src/core/archiving_compressing/compressing/Huffman.cpp
- src/core/archiving_compressing/archiving/Header.cpp
- src/core/archiving_compressing/archiving/Archive.cpp
+ src/core/LtManagement/archiving_compressing/binaryManagement/BitFileGenerator.cpp
+ src/core/LtManagement/archiving_compressing/binaryManagement/BitFileGetter.cpp
+ src/core/LtManagement/archiving_compressing/compressing/LzCompress.cpp
+ src/core/LtManagement/archiving_compressing/compressing/LzUncompress.cpp
+ src/core/LtManagement/archiving_compressing/compressing/Huffman.cpp
+ src/core/LtManagement/archiving_compressing/archiving/Header.cpp
+ src/core/LtManagement/archiving_compressing/archiving/Archive.cpp
)
add_library(mementar_memGraphs_lib
src/core/memGraphs/Branchs/ValuedNode.cpp
src/core/memGraphs/Branchs/types/Action.cpp
- src/core/memGraphs/DoublyLinkedList/DllCargoNode.cpp
- src/core/memGraphs/DoublyLinkedList/DllLinkedElement.cpp
+ src/core/memGraphs/Branchs/types/Fact.cpp
+ src/core/memGraphs/Branchs/types/SoftPoint.cpp
+ src/core/memGraphs/Branchs/types/Triplet.cpp
src/core/memGraphs/Graphs/ActionGraph.cpp
- src/core/memGraphs/Graphs/EventGraph.cpp
+ src/core/memGraphs/Graphs/FactGraph.cpp
)
-add_library(mementar_core_lib
- src/core/EpisodicTree/CompressedLeaf.cpp
- src/core/EpisodicTree/CompressedLeafNode.cpp
- src/core/EpisodicTree/Context.cpp
- src/core/EpisodicTree/CompressedLeafSession.cpp
- src/core/EpisodicTree/CompressedLeafNodeSession.cpp
- src/core/EpisodicTree/ArchivedLeaf.cpp
- src/core/EpisodicTree/ArchivedLeafNode.cpp
-)
-target_link_libraries(mementar_core_lib
+add_library(mementar_lt_lib
+ src/core/LtManagement/EpisodicTree/CompressedLeaf.cpp
+ src/core/LtManagement/EpisodicTree/CompressedLeafNode.cpp
+ src/core/LtManagement/EpisodicTree/Context.cpp
+ src/core/LtManagement/EpisodicTree/CompressedLeafSession.cpp
+ src/core/LtManagement/EpisodicTree/CompressedLeafNodeSession.cpp
+ src/core/LtManagement/EpisodicTree/ArchivedLeaf.cpp
+ src/core/LtManagement/EpisodicTree/ArchivedLeafNode.cpp
+)
+target_link_libraries(mementar_lt_lib
mementar_compression_lib
mementar_memGraphs_lib
pthread
)
+add_library(mementar_core_lib
+ src/core/feeder/FeedStorage.cpp
+ src/core/feeder/Feeder.cpp
+ src/core/Parametrization/Configuration.cpp
+)
+target_link_libraries(mementar_core_lib mementar_lt_lib)
+target_link_libraries(mementar_core_lib ${catkin_LIBRARIES})
+add_dependencies(mementar_core_lib ${catkin_EXPORTED_TARGETS})
+
##############################
-## EVENTS
+## DRAWER
##############################
-add_library(mementar_events_lib
- src/core/Events/Subscription.cpp
- src/core/Events/EventsManager.cpp
+add_library(mementar_drawer_lib
+ src/graphical/timeline/ActionReader.cpp
+ src/graphical/timeline/FactReader.cpp
+ src/graphical/timeline/TimelineDrawer.cpp
+)
+target_include_directories(mementar_drawer_lib
+PUBLIC
+ ${OpenCV_INCLUDE_DIRS}
+)
+target_link_libraries(mementar_drawer_lib
+ mementar_memGraphs_lib
+ ${OpenCV_LIBS}
)
-target_link_libraries(mementar_events_lib ${catkin_LIBRARIES})
-add_dependencies(mementar_events_lib ${catkin_EXPORTED_TARGETS} mementar_gencpp)
##############################
## API
##############################
add_library(mementar_lib
+ src/API/ActionsPublisher.cpp
+ src/API/ActionsSubscriber.cpp
src/API/TimelineManipulator.cpp
src/API/TimelinesManipulator.cpp
src/API/clients/ManagerClient.cpp
src/API/clients/ClientBase.cpp
- src/API/EventsPublisher.cpp
- src/API/EventsSubscriber.cpp
+ src/API/OccasionsPublisher.cpp
+ src/API/OccasionsSubscriber.cpp
)
target_link_libraries(mementar_lib ${catkin_LIBRARIES})
add_dependencies(mementar_lib ${catkin_EXPORTED_TARGETS} mementar_gencpp)
@@ -151,7 +186,7 @@ add_dependencies(mementar_lib ${catkin_EXPORTED_TARGETS} mementar_gencpp)
add_library(mementar_interface
src/RosInterface.cpp
)
-target_link_libraries(mementar_interface mementar_core_lib mementar_events_lib)
+target_link_libraries(mementar_interface mementar_core_lib mementar_events_lib mementar_drawer_lib)
target_link_libraries(mementar_interface ${catkin_LIBRARIES})
add_dependencies(mementar_interface ${catkin_EXPORTED_TARGETS} mementar_gencpp)
@@ -171,11 +206,20 @@ target_link_libraries(mementar_multi mementar_interface)
target_link_libraries(mementar_multi ${catkin_LIBRARIES})
add_dependencies(mementar_multi ${catkin_EXPORTED_TARGETS})
+add_executable(mementar_timeline src/graphical/timeline/main.cpp)
+target_link_libraries(mementar_timeline mementar_core_lib mementar_drawer_lib)
+target_link_libraries(mementar_timeline ${catkin_LIBRARIES})
+add_dependencies(mementar_timeline ${catkin_EXPORTED_TARGETS})
+
##############################
## Test executables
##############################
-add_executable(event_sub_pub src/test/event_sub_pub.cpp)
+add_executable(config src/test/config.cpp)
+target_link_libraries(config ${catkin_LIBRARIES})
+target_link_libraries(config mementar_interface)
+
+add_executable(event_sub_pub src/test/occasions_sub_pub.cpp)
target_link_libraries(event_sub_pub ${catkin_LIBRARIES})
target_link_libraries(event_sub_pub mementar_lib)
@@ -183,6 +227,65 @@ add_executable(graphs src/test/graphs.cpp)
target_link_libraries(graphs ${catkin_LIBRARIES})
target_link_libraries(graphs mementar_memGraphs_lib)
+
+#add_executable(eventLink src/test/EventLink.cpp)
+#target_link_libraries(eventLink mementar_lt_lib)
+
+##############################################################################
+# Qt Environment
+##############################################################################
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+set(CMAKE_AUTOMOC ON)
+
+##############################################################################
+# Sections
+##############################################################################
+
+file(GLOB QT_FORMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ui/*.ui)
+file(GLOB QT_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} resources/*.qrc)
+
+QT5_ADD_RESOURCES(QT_RESOURCES_CPP ${QT_RESOURCES})
+QT5_WRAP_UI(QT_FORMS_HPP ${QT_FORMS})
+
+add_definitions( -std=c++11 -fPIC)
+
+##############################################################################
+# Sources
+##############################################################################
+
+set( QT_SOURCES
+ src/graphical/mementarGUI/main.cpp
+ src/graphical/mementarGUI/mementargui.cpp
+ src/graphical/mementarGUI/DarkStyle.cpp
+ src/graphical/mementarGUI/QPushButtonExtended.cpp
+ src/graphical/mementarGUI/QCheckBoxExtended.cpp
+ src/graphical/mementarGUI/QLineEditExtended.cpp
+
+ include/mementar/graphical/mementarGUI/mementargui.h
+ include/mementar/graphical/mementarGUI/DarkStyle.h
+ include/mementar/graphical/mementarGUI/QPushButtonExtended.h
+ include/mementar/graphical/mementarGUI/QCheckBoxExtended.h
+ include/mementar/graphical/mementarGUI/QLineEditExtended.h
+)
+##############################################################################
+# Binaries
+##############################################################################
+
+add_executable(mementarGUI ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP})
+target_include_directories(mementarGUI
+ PRIVATE
+ ${catkin_INCLUDE_DIRS}
+)
+add_dependencies(mementarGUI mementar_gencpp)
+target_link_libraries(mementarGUI
+ ${catkin_LIBRARIES}
+ Qt5::Core
+ Qt5::Widgets
+ Qt5::PrintSupport
+)
+install(TARGETS mementarGUI RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
+
##############################
## Install
##############################
@@ -208,6 +311,10 @@ install(DIRECTORY include/${PROJECT_NAME}/
if(CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
- #add_rostest_gtest(mementar_tester test/library.test src/tests/library.cpp)
- #target_link_libraries(mementar_tester mementar_lib)
+ add_rostest_gtest(mementar_fact_pub_sub_tester test/fact_pub_sub.test src/test/CI/fact_pub_sub.cpp)
+ target_link_libraries(mementar_fact_pub_sub_tester mementar_lib ontologenius_lib)
+
+ add_rostest_gtest(mementar_action_pub_sub_tester test/action_pub_sub.test src/test/CI/action_pub_sub.cpp)
+ target_link_libraries(mementar_action_pub_sub_tester mementar_lib ontologenius_lib)
+
endif()
diff --git a/README.md b/README.md
index 4f47f52..01593c2 100644
--- a/README.md
+++ b/README.md
@@ -4,8 +4,8 @@
```
G. Sarthou, mementar,” https://github.com/sarthou/mementar,
-LAAS-CNRS, Toulouse, 2018 – 2019.
+LAAS-CNRS, Toulouse, 2018 – 2020.
```
[Release-Url]: https://github.com/sarthou/mementar/releases
-[Release-image]: http://img.shields.io/badge/release-v0.0.2-1eb0fc.svg
+[Release-image]: http://img.shields.io/badge/release-v0.0.3-1eb0fc.svg
diff --git a/docs/Download.html b/docs/Download.html
index 6dcb335..4ea6a16 100644
--- a/docs/Download.html
+++ b/docs/Download.html
@@ -1,7 +1,7 @@
- Download | Mementar 0.0.2
+ Download | Mementar 0.0.3
@@ -38,6 +38,7 @@
Pipelines
Mementar Documentation
+ Mementar 0.0.3
@@ -56,15 +57,15 @@
Getting Start
@@ -77,6 +78,31 @@ Download
You have below the archives of the major versions of mementar:
+ V0.0.3
+ 21 / 12 / 2020
+
+
+
V0.0.2
10 / 07 / 2019
diff --git a/docs/Event.html b/docs/Event.html
deleted file mode 100644
index 6355eee..0000000
--- a/docs/Event.html
+++ /dev/null
@@ -1,171 +0,0 @@
-
-
-
- Event Class | Mementar 0.2.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Mementar API Documentation
-
-
-
-
-
-
-
Event Class
-
The Event class provides a way to represent events in mementar. More...
-
-
-
- Header: #include "mementar/API/Event.h"
-
-
-
-
-
-
Public Functions
-
-
-
- Event (const std::string& event )
- Event (const std::string& subject , const std::string& predicat , const std::string& object )
- std::string subject ()
- std::string predicat ()
- std::string object ()
- std::string operator() ()
- void subject (const std::string& subject )
- void predicat (const std::string& predicat )
- void object (const std::string& object )
- void operator() (const std::string& event )
-
-
-
-
-
-
-
Detailed Description
-
The Event class provides a way to represent events in mementar.
-
Mementar formats the data representing an event to be able to communicate them at the level of ROS messages. The Event class makes it possible to make the link between this formatted representation and the representation in the form of a triplet.
-
-
-
-
Public Functions Documentation
-
-
mementar::Event::Event (const std::string & event )
-
Constructs a new event from the formatted parameter event .
-
In its formatted form, an event is written as follows: subject|predicat|object
-
-
mementar::Event::Event (const std::string & subject , const std::string & predicat , const std::string & object )
-
Constructs a new event from the triplet defined by the parameters subject , predicat and object .
-
-
std::string mementar::Event::subject ()
-
Return the subject of the event.
-
-
std::string mementar::Event::predicat ()
-
Return the predicat of the event.
-
-
std::string mementar::Event::object ()
-
Return the object of the event.
-
-
std::string mementar::Event::operator() ()
-
Return the event in its formatted form.
-
In its formatted form, an event is written as follows: subject|predicat|object
-
-
void mementar::Event::subject (const std::string & subject )
-
Set the subject of the event.
-
-
void mementar::Event::predicat (const std::string & predicat )
-
Set the predicat of the event.
-
-
void mementar::Event::object (const std::string & object )
-
Set the object of the event.
-
-
void mementar::Event::operator() (const std::string & event )
-
Set the event using its formatted form.
-
In its formatted form, an event is written as follows: subject|predicat|object
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/EventsSubscriber.html b/docs/EventsSubscriber.html
deleted file mode 100644
index 53ad281..0000000
--- a/docs/EventsSubscriber.html
+++ /dev/null
@@ -1,160 +0,0 @@
-
-
-
- EventsSubscriber Class | Mementar 0.2.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Mementar API Documentation
-
-
-
-
-
-
-
EventsPublisher Class
-
The EventsSubscriber class can be seen as an action server to subscribe to events. More...
-
-
-
- Header: #include "mementar/API/EventsSubscriber.h"
-
-
-
-
-
-
Public Functions
-
-
-
-
-
Detailed Description
-
The EventsSubscriber class can be seen as an action server to subscribe to events.
-
It allows you to subscribe to multiple event patterns at the same time and specify a number of events that you expect.
-
-
-
-
Public Functions Documentation
-
-
mementar::EventsSubscriber::EventsSubscriber (const std::function<void(Event &)> callback , const std::string & name = "", bool spin_thread = true)
-
Constructs an EventsSubscriber with a callback function callback .
-
The EventsSubscriber constructor also takes a boolean option to automatically spin a thread. If you prefer not to use threads (and you want the EventsSubscriber to do the 'thread magic' behind the scenes), this is a good option for you.
-
Can be used in a multi-process mode by specifying the name of the mementar instance name . For classic use, name should be defined as "".
-
-
mementar::EventsSubscriber::EventsSubscriber (const std::function<void(Event &)> callback , bool spin_thread )
-
Constructs an EventsSubscriber with a callback function callback .
-
The EventsSubscriber constructor also takes a boolean option to automatically spin a thread. If you prefer not to use threads (and you want the EventsSubscriber to do the 'thread magic' behind the scenes), this is a good option for you.
-
-
mementar::EventsSubscriber::~EventsSubscriber ()
-
The EventsSubscriber destructor cancel all the subscriptions previous done.
-
-
bool mementar::EventsSubscriber::subscribe (const Event & pattern , size_t & count = -1)
-
Subscribe to the event pattern pattern defined as an Event object.
-
A pattern can be constructed as a classic event, but each component of the triplet can also be set to the value "?" to represent anything.
-
The count parameter defines the number of events corresponding to the model you want to know. By using the default value -1, the number of events is unlimited.
-
Returns false if the subscription failed.
-
-
bool mementar::EventsSubscriber::cancel ()
-
Cancel all subscriptions.
-
Returns false if at least one subscription fails.
-
-
bool mementar::EventsSubscriber::end ()
-
Returns true if no more events are expected.
-
If at least one subscription has been made with an account set to -1, the end function will always return false until the next cancellation.
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/InstallMementar.html b/docs/InstallMementar.html
index c47f510..4edaa12 100644
--- a/docs/InstallMementar.html
+++ b/docs/InstallMementar.html
@@ -1,7 +1,7 @@
- Install | Mementar 0.0.2
+ Install | Mementar 0.0.3
@@ -38,6 +38,7 @@
Pipelines
Mementar Documentation
+ Mementar 0.0.3
@@ -56,15 +57,15 @@
Getting Start
@@ -73,9 +74,11 @@
Install Mementar
Since Mementar is a ROS package, make sure that ROS is installed on your platform. Mementar is fully supported and maintained by ROS Kinetic Kame and ROS Melodic Morenia . Desktop ROS configuration is not required for use of mementar.
+ Mementar is strongly linked to the Ontologenius software to provide a semantic abstraction of the knowledge it stores.
+
Clone the package on your catkin workspace:
-
cd ~/catkin_ws/src/git clone https://github.com/sarthou/mementar.gitcd ..catkin_make
+
cd ~/catkin_ws/src/git clone https://github.com/sarthou/mementar.gitgit clone https://github.com/sarthou/ontologenius.gitcd ..catkin_make
Troubles
@@ -87,14 +90,14 @@ Troubles
sudo apt-get install ros-DISTRO-qt-build
-
+
+