The NEEM validator is a ROS package to validate NEEMs that have been recorded by following the specifications in the NEEM-Handbook (https://ease-crc.github.io/soma/owl/current/NEEM-Handbook.pdf) by the project EASE (https://ease-crc.org).
- ROS melodic
- KnowRob (https://github.com/knowrob/knowrob)
Python 2.7 libraries:
- pymongo
- rdflib
- ansi2html
Pull this repository into the src
directory of KnowRob's catkin workspace (e.g ~/catkin_ws/src
) and source the workspace:
cd ~/catkin_ws
catkin_make
source ~/catkin_ws/devel/setup.bash
To start the NEEM validator, you can run roslaunch with the following arguments:
path_to_neem
(required): absolute path to the NEEM that has to be validatedterminate
(default: False): whether KnowRob should continue running after this validator has diedworkflow_file
(default: settings/pipeline_workflow.yaml): relative path to the workflow definitionlogging
(default: False): whether timestamps for tthe different checks should be recorded and displayed
To start the default configurations for a NEEM, located at /home/me/neems/mynewneem
, you can run
roslaunch neem_validator validator.launch path_to_neem:=/home/me/neems/mynewneem
Careful: The default configuration of the NEEM validator removes all contents from the Mongo database linked in your KnowRob instance and your environment variables (normally, this is the roslog
database). It then uploads the NEEM data to this Mongo database. If you want to validate the NEEM data that are already stored in your MongoDB without removing them, just remove the following two lines from the Stages
list in the settings/pipeline_workflow.yaml
:
- clear_mongo_collections
- mongorestore
- The validation results are printed to rosout and stored in
logs/validation_results
. - In case logging was activated, the timestamps are stored in
logs/time
. - The OWLReasonerCheck runs SOMA's "uglify" script on the OWL files. The result is stored in
logs/uglify.owl
.
The default workflow file can be found in settings/pipeline_workflow.yaml
.
The workflow file defines the checks that are called aswell as their configuration. The python docstring in the checks located at src/checks/
tells the user, which attributes are available and which ones are required per check.
Every check can be called multiple times with different configurations.
The Stages
entry may occur only once and determines the order in which the checks are called.
- Clone this repository.
- Navigate to the
docker
directory - Create a
neem
folder and copy the NEEM you want to validate there. - Run
docker-compose up
- The
logs
directory contains your validation results
- A GitLab instance with a GitLab runner that runs Docker container has to be installed.
- Create a customized version of the
gitlab-ci.yml
(or use the default, located atci-pipeline/gitlab-ci.yml
). - If you use a customized version of the NEEM validator, you should also adjust the
docker/Dockerfile
, build it, upload it, and link the uploaded docker image in yourgitlab-ci.yml
. - Open the GitLab admin area and navigate to settings -> CI/CD:
https://YURGITLAB.org/admin/application_settings/ci_cd
. Under "Continuous Integration and Deployment" navigate to "Default CI/CD configuration file" and insert a link to your version of thegitlab-ci.yml
.