RCL - RoboCLuedo  v1.0
Francesco Ganci - S4143910 - Experimental Robotics Lab - Assignment 1
ArmorCluedo Class Reference

additional utilities for aRMOR More...

#include <armor_cluedo.h>

+ Inheritance diagram for ArmorCluedo:
+ Collaboration diagram for ArmorCluedo:

Public Member Functions

 ArmorCluedo (bool debugmode=ARMOR_DEFAULT_DEBUGMODE)
 class constructor of ArmorCluedo More...
 
 ~ArmorCluedo ()
 class destructor More...
 
bool Init (std::string ontologyPath)
 initizalize the interface More...
 
bool AddIndiv (std::string indivname, std::string classname, bool makeDisjoint=true)
 add an individual to the ontology More...
 
std::vector< std::string > GetClassOfIndiv (std::string indivname, bool deep)
 get the class of a given individual More...
 
std::vector< std::string > GetIndivOfClass (std::string classname)
 find the individuals belonging to a class More...
 
bool ExistsIndiv (std::string indivname)
 check if an individual exists More...
 
bool SetObjectProperty (std::string prop, std::string Aelem, std::string Belem)
 set a property true More...
 
std::vector< std::string > GetValuedOfIndiv (std::string prop, std::string indivname)
 get the values of a property related to a gven individual More...
 
std::vector< std::string > FindCompleteHypotheses ()
 find all the complete hypotheses More...
 
std::vector< std::string > FindInconsistentHypotheses ()
 find all the inconsistent hypotheses More...
 
bool RemoveHypothesis (std::string hypTag)
 discard one hypothesis More...
 
std::string FilterValue (std::string raw)
 rewrite a string like '<uri#value>' into 'value' More...
 
std::vector< std::string > FilterVector (std::vector< std::string > &itemlist)
 filter all the strings inside the array More...
 
- Public Member Functions inherited from ArmorTools
 ArmorTools (std::string client=ARMOR_DEFAULT_CLIENT, std::string reference=ARMOR_DEFAULT_REFERENCE, bool dbmode=false)
 Class Constructor, 3 arguments. More...
 
 ArmorTools (bool dbmode)
 Class Constructor, only one argument. More...
 
 ~ArmorTools ()
 class destructor (empty) More...
 
armor_msgs::ArmorDirective GetRequest (std::string command, std::string first_spec="", std::string second_spec="", std::string arg1="", std::string arg2="", std::string arg3="", std::string arg4="", std::string arg5="")
 quick generation of an aRMOR request More...
 
bool CallArmor (armor_msgs::ArmorDirective &data)
 send a command to the aRMOR service. More...
 
bool LoadOntology (std::string path, std::string uri=ARMOR_DEFAULT_URI, bool manipulationFlag=true, std::string reasoner=ARMOR_DEFAULT_REASONER, bool buffered_reasoner=true)
 load the ontology from file. More...
 
bool Connect (float timeout=ARMOR_DEFAULT_TIMEOUT)
 open a connection with the aRMOR service. More...
 
bool ConnectAndLoad (std::string path, std::string uri=ARMOR_DEFAULT_URI, bool manipulationFlag=true, std::string reasoner=ARMOR_DEFAULT_REASONER, bool buffered_reasoner=true)
 connect to the server and load the ontology from file. More...
 
bool SaveOntology (std::string path)
 save the ontology on file More...
 
bool UpdateOntology ()
 send the command REASON More...
 
void PrintRequest (armor_msgs::ArmorDirective &d)
 print a request to the screen. More...
 
void PrintResponse (armor_msgs::ArmorDirective &d)
 print the response to the screen. More...
 
void SwitchDebugMode ()
 toggle the debug mode More...
 
int GetLastErrorCode ()
 err code referred to the last call More...
 
std::string GetLastErrorDescription ()
 last err description More...
 
bool Success ()
 check the 'success' flag referred to the last aRMOR call More...
 
bool LoadedOntology ()
 check if the ontology was loaded or not More...
 
bool TestInterface ()
 check the status of the interface More...
 
bool SendCommand (std::string command, std::string first_spec="", std::string second_spec="", std::string arg1="", std::string arg2="", std::string arg3="", std::string arg4="", std::string arg5="", bool printRequest=false)
 fill in a command and send it to aRMOR More...
 
armor_msgs::ArmorDirectiveRes & GetLastRes ()
 get a reference to the last response More...
 
armor_msgs::ArmorDirectiveReq & GetLastReq ()
 get a reference to the last request More...
 
void PrintLastRes ()
 print the last response More...
 
void PrintLastReq ()
 print the last request More...
 

Additional Inherited Members

- Protected Attributes inherited from ArmorTools
bool DebugMode = false
 debug mode enabled or not More...
 

Detailed Description

additional utilities for aRMOR

Whereas the class ArmorTools provides the low-level tools for communicating with aRMOR, the class ArmorCluedo implements some specific methods for this project, and sme workaround due to some bugs in the actual implementation of aRMOR, in particular for the commands "REMOVE" and "DISJOINT".

The class ArmorCluedo provides methods for doing these operations:

  • add individuals
  • check existence of individuals
  • find the classes of an individual
  • find the content of a class
  • set/get properties

In addition, the class implements some useful methods for managing the hypotheses:

  • add hypotheses
  • queries of hypotheses
  • discard hypotheses
Todo:
maybe the issues with aRMOR are due to a lack in its documentation. The implemented workarounds could reduce the performances of the program.
Examples
ArmorCluedo - 001 - Working on Individuals, ArmorCluedo - 002 - Working with properties, and ArmorCluedo - 003 - Reasoning Workflow.

Definition at line 56 of file armor_cluedo.h.


The documentation for this class was generated from the following files: