From 8b0a62df9000f132d715577b7c1e53848eb09704 Mon Sep 17 00:00:00 2001
From: Guillaume Sarthou
Date: Wed, 17 Apr 2024 12:35:29 +0200
Subject: [PATCH 1/3] [Doc] fix cpp tutorials
---
docs/cpp_Tutorials/tutorial1/FindTheIntruder.html | 2 +-
docs/cpp_Tutorials/tutorial1/LaunchTheProgram.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/cpp_Tutorials/tutorial1/FindTheIntruder.html b/docs/cpp_Tutorials/tutorial1/FindTheIntruder.html
index 446de6cd..d7e74ddf 100644
--- a/docs/cpp_Tutorials/tutorial1/FindTheIntruder.html
+++ b/docs/cpp_Tutorials/tutorial1/FindTheIntruder.html
@@ -271,7 +271,7 @@ Delete the same
bool is_same = true;
for(size_t i = 1; i < inheritances.size(); i++)
{
- std::vector<std::string>::iterator it = find(inheritances[i].begin(), inheritances[i].end(), inheritances.front[words]);
+ std::vector<std::string>::iterator it = find(inheritances[i].begin(), inheritances[i].end(), inheritances.front()[words]);
if(it == inheritances[i].end())
is_same = false;
}
diff --git a/docs/cpp_Tutorials/tutorial1/LaunchTheProgram.html b/docs/cpp_Tutorials/tutorial1/LaunchTheProgram.html
index 389ca4f3..26300cd3 100644
--- a/docs/cpp_Tutorials/tutorial1/LaunchTheProgram.html
+++ b/docs/cpp_Tutorials/tutorial1/LaunchTheProgram.html
@@ -177,7 +177,7 @@ Launch the program
-
rosrun ontologenius_tutorial intruder.py
+
rosrun ontologenius_tutorial intruder
From 6d879af61245d7ded38d99c3976b41a4728e7045 Mon Sep 17 00:00:00 2001
From: Guillaume Sarthou
Date: Wed, 17 Apr 2024 12:47:06 +0200
Subject: [PATCH 2/3] [API] clarify addInheritage
---
docs/cpp_API/FeederPublisher.html | 8 ++++----
docs/python_API/FeederPublisher.html | 8 ++++----
.../ontologenius/API/ontologenius/FeederPublisher.h | 10 +++++-----
ontopy/ontologenius/FeederPublisher.py | 8 ++++----
src/API/ontologenius/FeederPublisher.cpp | 4 ++--
5 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/docs/cpp_API/FeederPublisher.html b/docs/cpp_API/FeederPublisher.html
index efeede7b..608b2bd2 100644
--- a/docs/cpp_API/FeederPublisher.html
+++ b/docs/cpp_API/FeederPublisher.html
@@ -139,7 +139,7 @@ Public Functions
| FeederPublisher(const std::string& name) |
| addProperty(const std::string& from, const std::string& property, const std::string& on, const onto_ros::Time& stamp = onto_ros::Node::get().current_time()) |
| addProperty(const std::string& from, const std::string& property, const std::string& type, const std::string& value, const onto_ros::Time& stamp = onto_ros::Node::get().current_time()) |
- | addInheritage(const std::string& from, const std::string& on, const onto_ros::Time& stamp = onto_ros::Node::get().current_time()) |
+ | addInheritage(const std::string& child, const std::string& parent, const onto_ros::Time& stamp = onto_ros::Node::get().current_time()) |
| addLanguage(const std::string& from, const std::string& lang, const std::string& name, const onto_ros::Time& stamp = onto_ros::Node::get().current_time()) |
| addConcept(const std::string& from, const onto_ros::Time& stamp = onto_ros::Node::get().current_time()) |
| addInverseOf(const std::string& property, const std::string& inverse_property, const onto_ros::Time& stamp = onto_ros::Node::get().current_time()) |
@@ -192,9 +192,9 @@ FeederPublisher::onto_ros::Time is an abstraction of the ROS time definition which can be provided either with ROS1 and ROS2 time representation (i.e. ros::Time or rclcpp::Time).
If the time stamp stamp is not defined, the function takes the current ROS time as the time stamp.
- FeederPublisher::addInheritage(const std::string& from, const std::string& on, const onto_ros::Time& stamp = onto_ros::Node::get().current_time())
- Adds the inheratage: from is a on. from and on could by a class, an individual or a property.
- At least from or on must be already known to the system. If one of them is unknown, it will be automatically created.
+ FeederPublisher::addInheritage(const std::string& child, const std::string& parent, const onto_ros::Time& stamp = onto_ros::Node::get().current_time())
+ Adds the inheratage: child is a parent. from and parent could by a class, an individual or a property.
+ At least child or parent must be already known to the system. If one of them is unknown, it will be automatically created.
onto_ros::Time is an abstraction of the ROS time definition which can be provided either with ROS1 and ROS2 time representation (i.e. ros::Time or rclcpp::Time).
If the time stamp stamp is not defined, the function takes the current ROS time as the time stamp.
diff --git a/docs/python_API/FeederPublisher.html b/docs/python_API/FeederPublisher.html
index e1c5ed47..3654df8b 100644
--- a/docs/python_API/FeederPublisher.html
+++ b/docs/python_API/FeederPublisher.html
@@ -138,7 +138,7 @@ Methods
| __init__(self, name) |
| addObjectProperty(self, concept_from, property, concept_on, stamp = None) |
| addDataProperty(self, concept_from, concept_property, type, data, stamp = None) |
- | addInheritage(self, concept_from, concept_on, stamp = None) |
+ | addInheritage(self, child, parent, stamp = None) |
| addLanguage(self, concept_from, lang, name, stamp = None) |
| addConcept(self, concept_from, stamp = None) |
| removeProperty(self, concept_from, property, stamp = None) |
@@ -186,9 +186,9 @@ addInheritage(self, concept_from, concept_on, stamp = None)
- Adds the inheratage : concept_from(str) is a concept_on(str). concept_from and concept_on could by a class, an individual or a property.
- At least concept_from or concept_on must be already known to the system. If one of them is unknown, it will be automatically created.
+ addInheritage(self, child, parent, stamp = None)
+ Adds the inheratage : child(str) is a parent(str). child and parent could by a class, an individual or a property.
+ At least child or parent must be already known to the system. If one of them is unknown, it will be automatically created.
If the time stamp stamp (rostime) is not defined, the function takes the current ROS time as the time stamp.
addLanguage(self, concept_from, lang, name, stamp = None)
diff --git a/include/ontologenius/API/ontologenius/FeederPublisher.h b/include/ontologenius/API/ontologenius/FeederPublisher.h
index 4d0d6f7a..86d33bde 100644
--- a/include/ontologenius/API/ontologenius/FeederPublisher.h
+++ b/include/ontologenius/API/ontologenius/FeederPublisher.h
@@ -57,13 +57,13 @@ class FeederPublisher
/// @param stamp is the time at which the added relation become true.
/// If the time stamp stamp is not defined, the function takes the current ROS time as the time stamp.
void addProperty(const std::string& from, const std::string& property, const std::string& type, const std::string& value, const onto_ros::Time& stamp = onto_ros::Node::get().current_time());
- /// @brief Adds the inheratage: "from" is a "on". "from" and "on" could by a class, an individual or a property.
- /// At least from or on must be already known to the system. If one of them is unknown, it will be automatically created.
- /// @param from is the parent concept. It could by a class, an individual or a property.
- /// @param on is the child concept. It could by a class, an individual or a property.
+ /// @brief Adds the inheratage: "child" is a "mother". "child" and "mother" could by a class, an individual, or a property.
+ /// At least child or child must be already known to the system. If one of them is unknown, it will be automatically created.
+ /// @param child is the child concept. It could by a class, an individual, or a property.
+ /// @param mother is the parent concept. It could by a class, or an individual.
/// @param stamp is the time at which the added relation become true.
/// If the time stamp stamp is not defined, the function takes the current ROS time as the time stamp.
- void addInheritage(const std::string& from, const std::string& on, const onto_ros::Time& stamp = onto_ros::Node::get().current_time());
+ void addInheritage(const std::string& child, const std::string& mother, const onto_ros::Time& stamp = onto_ros::Node::get().current_time());
/// @brief Adds the label "name" in the language "lang" to the class, individual, or property "from".
/// "from" must be already known to the system.
/// @param from is the concept (individual, class, property) to which add a name in natural language.
diff --git a/ontopy/ontologenius/FeederPublisher.py b/ontopy/ontologenius/FeederPublisher.py
index 993a894e..0e120d58 100644
--- a/ontopy/ontologenius/FeederPublisher.py
+++ b/ontopy/ontologenius/FeederPublisher.py
@@ -71,12 +71,12 @@ def addDataProperty(self, concept_from, property, type, data, stamp = None):
stamp = Ontoros.getRosTime()
self._publish_stamped(msg, stamp)
- def addInheritage(self, concept_from, concept_on, stamp = None):
- """Adds the inheratage : concept_from(str) is a concept_on(str). concept_from and concept_on could by a class, an individual or a property.
- At least concept_from or concept_on must be already known to the system. If one of them is unknown, it will be automatically created.
+ def addInheritage(self, child, mother, stamp = None):
+ """Adds the inheratage : child(str) is a mother(str). child and mother could by a class, an individual or a property.
+ At least child or mother must be already known to the system. If one of them is unknown, it will be automatically created.
If the time stamp stamp (rostime) is not defined, the function takes the current ROS time as the time stamp.
"""
- msg = '[add]' + concept_from + '|+|' + concept_on
+ msg = '[add]' + child + '|+|' + mother
if stamp == None:
stamp = Ontoros.getRosTime()
self._publish_stamped(msg, stamp)
diff --git a/src/API/ontologenius/FeederPublisher.cpp b/src/API/ontologenius/FeederPublisher.cpp
index 7d71f770..28488a0b 100644
--- a/src/API/ontologenius/FeederPublisher.cpp
+++ b/src/API/ontologenius/FeederPublisher.cpp
@@ -17,9 +17,9 @@ void FeederPublisher::addProperty(const std::string& from, const std::string& pr
publishStamped(msg, stamp);
}
-void FeederPublisher::addInheritage(const std::string& from, const std::string& on, const ontologenius::compat::onto_ros::Time& stamp)
+void FeederPublisher::addInheritage(const std::string& child, const std::string& mother, const ontologenius::compat::onto_ros::Time& stamp)
{
- std::string msg = "[add]" + from + "|+|" + on;
+ std::string msg = "[add]" + child + "|+|" + mother;
publishStamped(msg, stamp);
}
From f13a5579f5d8714e0326a65315bd8afa0471832c Mon Sep 17 00:00:00 2001
From: guillaume
Date: Tue, 12 Nov 2024 12:47:14 +0100
Subject: [PATCH 3/3] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 0ed2350d..f0ebb54f 100644
--- a/README.md
+++ b/README.md
@@ -21,4 +21,4 @@ On this launcher file, you will find an argument indicating the path to the onto
You can add your own ontology files in the argument if you want them to be loaded at the beginning of the program.
[Release-Url]: https://sarthou.github.io/ontologenius/
-[Release-image]: http://img.shields.io/badge/release-v3-1eb0fc.svg
+[Release-image]: http://img.shields.io/badge/release-v0.4.3-1eb0fc.svg