Skip to content
Snippets Groups Projects
Commit ac50df55 authored by Matthias Stefan Bodenbenner's avatar Matthias Stefan Bodenbenner
Browse files

some minor refactoring

parent aad500f0
No related branches found
No related tags found
No related merge requests found
Showing
with 166 additions and 558 deletions
......@@ -27,11 +27,11 @@ Build Monitoring:
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
changes:
- src/environment_monitoring/**/*
- src/monitoring/**/*
- requirements.txt
- .gitlab-ci.yml
script:
- docker build -t $CI_REGISTRY/$CI_PROJECT_PATH/monitoring -f ./src/environment_monitoring/Dockerfile --no-cache .
- docker build -t $CI_REGISTRY/$CI_PROJECT_PATH/monitoring -f ./src/monitoring/Dockerfile --no-cache .
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker push $CI_REGISTRY/$CI_PROJECT_PATH/monitoring:latest
......@@ -77,12 +77,12 @@ Deploy Monitoring:
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
changes:
- src/environment_monitoring/**/*
- src/monitoring/**/*
- requirements.txt
- .gitlab-ci.yml
needs: ["Build Monitoring"]
script:
- cp ./src/environment_monitoring/docker-compose.yml $app_path/docker-compose-monitoring.yml
- cp ./src/monitoring/docker-compose.yml $app_path/docker-compose-monitoring.yml
- cd $app_path
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker-compose -f docker-compose-monitoring.yml pull
......
@prefix quantitykind: <http://qudt.org/vocab/quantitykind/> ;
@prefix unit: <http://qudt.org/vocab/unit/> ;
import utils;
measurement Azimuth {
variable Azimuth defines <quantitykind:Angle> {
name: "Azimuth"
description: "Current position of azimuth rotation encoder in Radian."
datatype: float
dimension: []
unit: Radian
unit: <unit:RAD>
range: (0, 3.14)
}
measurement Elevation {
variable Elevation defines <quantitykind:Angle> {
name: "Elevation"
description: "Current position of elevation rotation encoder in Radian."
datatype: float
dimension: []
unit: Radian
unit: <unit:RAD>
range: (0, 3.14)
}
measurement Distance {
variable Distance defines <quantitykind:Distance> {
name: "Distance"
description: "Measured distance to the currently activate target."
datatype: float
dimension: []
unit: metre
unit: <unit:M>
range: (0, 100)
}
parameter Interval {
variable Interval defines <quantitykind:Time> {
name: "Interval"
description: "Interval in seconds."
datatype: float
dimension: []
default: 10
unit: seconds
unit: <unit:SEC>
range: (0, 360)
}
......@@ -59,14 +61,14 @@ component Base {
Jog jog
PointTo point_to
parameters:
utils.State state
Interval interval
utils.State state = OK
Interval interval = 10
measurements:
utils.Position position
utils.Quaternion quaternion
Azimuth azimuth
Elevation elevation
Distance distance
internal utils.Position position
internal utils.Quaternion quaternion
internal Azimuth azimuth
internal Elevation elevation
internal Distance distance
streams:
position: update
......
parameter Location {
name: "Location"
description: "Human interpretable description of the current location of sensor."
datatype: string
dimension: []
}
measurement BatteryLevel {
name: "Battery level"
description: "Battery level"
datatype: float
range: (0, 100)
dimension: []
unit: Percent
}
measurement SignalStrength {
name: "Signal strength"
description: "Strength of the signal of the wireless environmental sensor."
datatype: float
range: (0, 100)
dimension: []
unit: Percent
}
measurement Temperature {
name: "Ambient temperature"
description: "The current ambient temperature."
datatype: float
range: (-20, 50)
dimension: []
unit: Celsius
}
measurement Pressure {
name: "Relative air pressure"
description: "The current air pressure."
datatype: float
range: (900, 1200)
dimension: []
unit: hPA
}
measurement Humidity {
name: "Relative humidity"
description: "Relative humidity."
datatype: float
range: (0, 100)
dimension: []
unit: Percent
}
component EnvironmentalSensor {
name: "Environmental Sensor"
description: "A single wireless environmental sensor, measuring temperature, pressure and humidity."
measurements:
Temperature temperature
Pressure pressure
Humidity humidity
SignalStrength signalStrength
BatteryLevel batteryLevel
parameters:
Location location
streams:
temperature: fixed(5)
pressure: fixed(5)
humidity: fixed(5)
signalStrength: fixed(10)
batteryLevel: fixed(10)
if batteryLevel < 5: warning("Battery level is low, please replace battery. Otherwise the sensor will not send data anymore.")
}
component EnvironmentalSensorManager {
name: "Manager of environmental sensors"
description: "Manages a set of environmental sensors"
components:
dynamic EnvironmentalSensor sensor(location="Pillar A")
}
interface EnvironmentalSensorManager monitoring {}
\ No newline at end of file
@prefix schema: <http://schema.org/> ;
@prefix unit: <http://qudt.org/vocab/unit/> ;
import mobile_entities;
import utils;
import base_stations;
import mobile_entities;
parameter Time {
variable Time defines <schema:DateTime> {
name: "Time"
description: "Current system time."
datatype: time
dimension: []
}
parameter Version {
variable Version defines <schema:version> {
name: "Version"
description: "Incremental API-Version."
datatype: int
default: 2
range: (0, 100)
dimension: []
unit: UNITLESS
unit: <unit:UNITLESS>
}
parameter Manufacturer {
variable Manufacturer defines <schema:manufacturer> {
name: "Manufacturer"
description: "Name of manufacturing company."
datatype: string
default: "Laboratory for Machine Tools and Production Engineering WZL of RWTH Aachen"
dimension: []
}
......@@ -48,7 +50,7 @@ component Lasertracker {
Shutdown shutdown
parameters:
utils.State state = OK
constant Manufacturer manufacturer = "Laboratory for Machine Tools and Production Engineering WZL of RWTH Aachen"
constant Manufacturer manufacturer = "API"
constant Version version = 1
Time time
......
import utils;
@prefix unit: <http://qudt.org/vocab/unit/> ;
enum Mode {
CONTINUOUS
......@@ -7,26 +8,24 @@ enum Mode {
IDLE
}
parameter Mode {
variable Mode {
name: "Mode"
description: "Current state of the entity. In CONTINUOUS mode, values are dispatched as fast as possible. In TRIGGERED mode, values are only dispatches after a software trigger. In EXTERNAL mode, values are dispatched in accordance to an external trigger, e.g. probe or TTL. IDLE means the entity is currently not used."
default: CONTINUOUS
datatype: enum
range: Mode
dimension: []
}
parameter Type {
variable Type {
name: "Type"
description: "System specific identifier of the target Type, e.g. SMR or Active SMR."
datatype: string
dimension: []
default: "SMR"
}
measurement Locked {
variable Locked {
name: "Locked"
description: "Boolean flag scpecifing whether the target is locked in."
description: "Boolean flag specifying whether the target is locked in."
datatype: boolean
dimension: []
}
......@@ -36,9 +35,31 @@ function Reset {
description: "Starts the search routine around the current direction."
}
function Trigger {
variable Counter {
name: "Counter"
description: "Natural numeric value."
datatype: int
dimension: []
range: (1,1000)
unit: <unit:UNITLESS>
}
variable Label {
name: "Label"
description: "A string serving as comment."
datatype: string
dimension: []
}
function Trigger streaming {
name: "Trigger"
description: "Trigger count measurements and set the resulting label. This function is only allowed in triggered acquisition mode."
description: "Trigger count variables and set the resulting label. This function is only allowed in triggered acquisition mode."
arguments:
Counter counter = 100
Label label = "test"
returns:
utils.Position position
Label outputLabel
}
component Target {
......@@ -50,11 +71,11 @@ component Target {
measurements:
utils.Position position
utils.Quaternion quaternion
Locked locked
internal Locked locked
parameters:
utils.State state
Mode mode
Type type
utils.State state = OK
Mode mode = CONTINUOUS
Type type = "SMR"
streams:
position: update
......@@ -69,3 +90,5 @@ component MobileEntities {
components:
dynamic Target target
}
interface Target myTarget{}
\ No newline at end of file
@prefix quantitykind: <http://qudt.org/vocab/quantitykind/> ;
@prefix unit: <http://qudt.org/vocab/unit/> ;
parameter Location {
variable Location {
name: "Location"
description: "Human interpretable description of the current location of sensor."
datatype: string
dimension: []
}
measurement BatteryLevel {
variable BatteryLevel {
name: "Battery level"
description: "Battery level"
datatype: int
......@@ -17,7 +17,7 @@ measurement BatteryLevel {
unit: <unit:PERCENT>
}
measurement SignalStrength defines <quantitykind:SignalStrength> {
variable SignalStrength defines <quantitykind:SignalStrength> {
name: "Signal strength"
description: "Strength of the signal of the wireless environmental sensor."
datatype: int
......@@ -26,7 +26,7 @@ measurement SignalStrength defines <quantitykind:SignalStrength> {
unit: <unit:PERCENT>
}
measurement Temperature defines <quantitykind:Temperature> {
variable Temperature defines <quantitykind:Temperature> {
name: "Ambient temperature"
description: "The current ambient temperature."
datatype: float
......@@ -35,7 +35,7 @@ measurement Temperature defines <quantitykind:Temperature> {
unit: <unit:DEG_C>
}
measurement Pressure defines <quantitykind:AtmosphericPressure> {
variable Pressure defines <quantitykind:AtmosphericPressure> {
name: "Atmospheric pressure"
description: "The current atmospheric pressure."
datatype: float
......@@ -44,7 +44,7 @@ measurement Pressure defines <quantitykind:AtmosphericPressure> {
unit: <unit:HectoPA>
}
measurement Humidity defines <quantitykind:RelativeHumidity> {
variable Humidity defines <quantitykind:RelativeHumidity> {
name: "Relative humidity"
description: "Relative humidity."
datatype: float
......
measurement Position {
@prefix quantitykind: <http://qudt.org/vocab/quantitykind/> ;
@prefix unit: <http://qudt.org/vocab/unit/> ;
@prefix dbo: <http://dbpedia.org/ontology/> ;
@prefix schema: <http://schema.org/> ;
variable Position defines <quantitykind:CartesianCoordinates> {
name: "Position"
description: "Position in Cartesian coordinates given in metre."
datatype: float
range: (-50, 50)
dimension: [3]
unit: Metre
unit: <unit:M>
}
measurement TCP {
variable TCP defines <quantitykind:CartesianCoordinates> {
name: "Tool Center Point"
description: "Tool center point of a six-arm robot."
description: "Tool center point of a six-joint robot."
datatype: float
range: (-0.5,0.5)
dimension: [3]
unit: Metre
unit: <unit:M>
}
measurement BatteryLevel {
variable BatteryLevel {
name: "Battery level"
description: "Battery level"
datatype: int
range: (0, 100)
dimension: []
unit: Percent
unit: <unit:PERCENT>
}
parameter Open {
variable Open {
name: "Open"
description: "Flag to specify if something is open."
datatype: boolean
dimension: []
default: true
}
parameter AutoMovement {
variable AutoMovement {
name: "Autonomous Movement"
description: "If true, the robot moves around freely autonomously."
datatype: boolean
dimension: []
default: true
}
component Gripper {
name: "Gripper"
description: "Gripper of a robot"
parameters:
Open open
Open open = true
}
function GoTo {
......@@ -62,11 +65,16 @@ function Step {
Position position
}
component Robot {
component Thing {
name: "A thing"
description: "Some thing."
}
component Robot defines <dbo:Robot> extends Thing{
name: "Robot"
description: "A robot arm with six axes."
measurements:
TCP tcp
internal TCP tcp
components:
Gripper gripper
functions:
......@@ -77,17 +85,17 @@ component Robot {
tcp: fixed(10)
}
component MobileRobot extends Robot {
component MobileRobot defines <schema:Vehicle> extends Robot {
name: "Mobile Robot"
description: "A robot arm with six axis mounted on a movable platform."
description: "A robot arm with six axes mounted on a movable platform."
measurements:
Position position
BatteryLevel batteryLevel
internal Position position
internal BatteryLevel batteryLevel
functions:
GoTo gotoRobot
Step stepRobot
parameters:
AutoMovement auto
AutoMovement auto = true
streams:
position: update
......
@prefix dbo: <http://dbpedia.org/ontology/> ;
@prefix quantitykind: <http://qudt.org/vocab/quantitykind/> ;
@prefix unit: <http://qudt.org/vocab/unit/> ;
enum State {
OK
WARNING
......@@ -5,29 +9,28 @@ enum State {
MAINTENANCE
}
parameter State {
variable State defines <dbo:status> {
name: "State"
description: "The current state of the device."
datatype: enum
default: OK
range: State
dimension: []
}
measurement Position {
variable Position defines <quantitykind:CartesianCoordinates> {
name: "Position"
description: "Most recently dispatched measured position."
datatype: float
dimension: [3]
range: (-100, 100)
unit: METRE
unit: <unit:M>
}
measurement Quaternion {
variable Quaternion defines <quantitykind:Angle> {
name: "Quaternion"
description: "Most recently dispatched measured orientation as quaternion, if available."
datatype: float
dimension: [4]
range: (0, 1)
unit: UNITLESS
unit: <unit:UNITLESS>
}
\ No newline at end of file
@prefix quantitykind: <http://qudt.org/vocab/quantitykind/> ;
@prefix unit: <http://qudt.org/vocab/unit/> ;
import utils;
measurement Azimuth defines <quantitykind:Angle> {
name: "Azimuth"
description: "Current position of azimuth rotation encoder in Radian."
datatype: float
dimension: []
unit: <unit:RAD>
range: (0, 3.14)
}
measurement Elevation defines <quantitykind:Angle> {
name: "Elevation"
description: "Current position of elevation rotation encoder in Radian."
datatype: float
dimension: []
unit: <unit:RAD>
range: (0, 3.14)
}
measurement Distance defines <quantitykind:Distance> {
name: "Distance"
description: "Measured distance to the currently activate target."
datatype: float
dimension: []
unit: <unit:M>
range: (0, 100)
}
parameter Interval defines <quantitykind:Time> {
name: "Interval"
description: "Interval in seconds."
datatype: float
dimension: []
default: 10
unit: <unit:SEC>
range: (0, 360)
}
function Jog {
name: "Jog"
description: "Jogs the tracker head by the given angles for the azimuth and elevation."
arguments:
Azimuth azimuth
Elevation elevation
}
function PointTo {
name: "Point to"
description: "Moves the tracker head so that the laser points to the specified position."
arguments:
utils.Position position
}
component Base {
name: "Base"
description: "Represents a base station in a distributed system."
functions:
Jog jog
PointTo point_to
parameters:
utils.State state
Interval interval
measurements:
internal utils.Position position
internal utils.Quaternion quaternion
internal Azimuth azimuth
internal Elevation elevation
internal Distance distance
streams:
position: update
quaternion: update
if state == ERROR: error("An error of the trackers base occured.")
if distance > 50.0: warning("Distance is very high. Measurements have high uncertainty.")
position.description = "Position of the base of the tracker within a global reference frame."
quaternion.description = "Orientation of the base in relation to the orientation of a global reference frame."
}
component BaseStations {
name: "Base Stations"
description: "Object acting as a list of base stations of the metrology system."
components:
Base base
}
\ No newline at end of file
@prefix schema: <http://schema.org/> ;
@prefix unit: <http://qudt.org/vocab/unit/> ;
import mobile_entities;
import utils;
import base_stations;
parameter Time defines <schema:DateTime> {
name: "Time"
description: "Current system time."
datatype: time
dimension: []
}
parameter Version defines <schema:version> {
name: "Version"
description: "Incremental API-Version."
datatype: int
default: 1
range: (0, 100)
dimension: []
unit: <unit:UNITLESS>
}
parameter Manufacturer defines <schema:manufacturer> {
name: "Manufacturer"
description: "Name of manufacturing company."
datatype: string
default: "Laboratory for Machine Tools and Production Engineering WZL of RWTH Aachen"
dimension: []
}
function Reset {
name: "Reset"
description: "Resets the device into the state like directly after start-up."
}
function Shutdown {
name: "Shutdown"
description: "Gracefully shutdown the device."
}
component Lasertracker {
name: "Lasertracker"
description: "Active coordinate measurement device based on laser interferometry for Large-Scale metrology applications."
components:
base_stations.BaseStations baseStations
mobile_entities.MobileEntities mobileEntities
functions:
Reset reset
Shutdown shutdown
parameters:
utils.State state = OK
constant Manufacturer manufacturer = "Laboratory for Machine Tools and Production Engineering WZL of RWTH Aachen"
constant Version version = 1
Time time
if state == ERROR: error("An error occured!")
}
interface Lasertracker APIRadian {}
\ No newline at end of file
import utils;
enum Mode {
CONTINUOUS
TRIGGERED
EXTERNAL
IDLE
}
parameter Mode {
name: "Mode"
description: "Current state of the entity. In CONTINUOUS mode, values are dispatched as fast as possible. In TRIGGERED mode, values are only dispatches after a software trigger. In EXTERNAL mode, values are dispatched in accordance to an external trigger, e.g. probe or TTL. IDLE means the entity is currently not used."
default: CONTINUOUS
datatype: enum
range: Mode
dimension: []
}
parameter Type {
name: "Type"
description: "System specific identifier of the target Type, e.g. SMR or Active SMR."
datatype: string
dimension: []
default: "SMR"
}
measurement Locked {
name: "Locked"
description: "Boolean flag specifying whether the target is locked in."
datatype: boolean
dimension: []
}
function Reset {
name: "Reset"
description: "Starts the search routine around the current direction."
}
function Trigger {
name: "Trigger"
description: "Trigger count measurements and set the resulting label. This function is only allowed in triggered acquisition mode."
}
component Target {
name: "Target"
description: "Represents an individual mobile entity."
functions:
Reset reset
Trigger trigger
measurements:
utils.Position position
utils.Quaternion quaternion
internal Locked locked
parameters:
utils.State state
Mode mode
Type type
streams:
position: update
quaternion: update
state.description = "Reflects the current state of the target. If logged in: OK. If not stable: WARNING. If lost: ERROR."
}
component MobileEntities {
name: "Mobile Entities"
description: "Object acting as a list of mobile entities in the metrology system."
components:
dynamic Target target
}
interface Target myTarget{}
\ No newline at end of file
@prefix quantitykind: <http://qudt.org/vocab/quantitykind/> ;
@prefix unit: <http://qudt.org/vocab/unit/> ;
@prefix dbo: <http://dbpedia.org/ontology/> ;
@prefix schema: <http://schema.org/> ;
measurement Position defines <quantitykind:CartesianCoordinates> {
name: "Position"
description: "Position in Cartesian coordinates given in metre."
datatype: float
range: (-50, 50)
dimension: [3]
unit: <unit:M>
}
measurement TCP defines <quantitykind:CartesianCoordinates> {
name: "Tool Center Point"
description: "Tool center point of a six-joint robot."
datatype: float
range: (-0.5,0.5)
dimension: [3]
unit: <unit:M>
}
measurement BatteryLevel {
name: "Battery level"
description: "Battery level"
datatype: int
range: (0, 100)
dimension: []
unit: <unit:PERCENT>
}
parameter Open {
name: "Open"
description: "Flag to specify if something is open."
datatype: boolean
dimension: []
default: true
}
parameter AutoMovement {
name: "Autonomous Movement"
description: "If true, the robot moves around freely autonomously."
datatype: boolean
dimension: []
default: true
}
component Gripper {
name: "Gripper"
description: "Gripper of a robot"
parameters:
Open open
}
function GoTo {
name: "GoTo"
description: "Moves something to an absolute given position"
arguments:
Position position
}
function Step {
name: "Step"
description: "Moves something to relatively from the current position to the given position"
arguments:
Position position
}
component Robot defines <dbo:Robot> {
name: "Robot"
description: "A robot arm with six axes."
measurements:
internal TCP tcp
components:
Gripper gripper
functions:
GoTo goto
Step step
streams:
tcp: fixed(10)
}
component MobileRobot defines <schema:Vehicle> extends Robot {
name: "Mobile Robot"
description: "A robot arm with six axes mounted on a movable platform."
measurements:
internal Position position
internal BatteryLevel batteryLevel
functions:
GoTo gotoRobot
Step stepRobot
parameters:
AutoMovement auto
streams:
position: update
batteryLevel: update
gotoRobot.name = "AVG GoTo"
stepRobot.name = "AVG Step"
if batteryLevel < 20: warning("Battery level is below 20%. Load shortly.")
if batteryLevel < 10: error("Battery level is below 10%. Please load the battery immediately.")
}
interface MobileRobot WallE {}
\ No newline at end of file
@prefix dbo: <http://dbpedia.org/ontology/> ;
@prefix quantitykind: <http://qudt.org/vocab/quantitykind/> ;
@prefix unit: <http://qudt.org/vocab/unit/> ;
enum State {
OK
WARNING
ERROR
MAINTENANCE
}
parameter State defines <dbo:status> {
name: "State"
description: "The current state of the device."
datatype: enum
default: OK
range: State
dimension: []
}
measurement Position defines <quantitykind:CartesianCoordinates> {
name: "Position"
description: "Most recently dispatched measured position."
datatype: float
dimension: [3]
range: (-100, 100)
unit: <unit:M>
}
measurement Quaternion defines <quantitykind:Angle> {
name: "Quaternion"
description: "Most recently dispatched measured orientation as quaternion, if available."
datatype: float
dimension: [4]
range: (0, 1)
unit: <unit:UNITLESS>
}
\ No newline at end of file
......@@ -26,7 +26,7 @@ services:
dummy-monitoring:
build:
context: .
dockerfile: ./src/environment_monitoring/Dockerfile
dockerfile: src/monitoring/Dockerfile
container_name: dummy-monitoring
volumes:
- ./assets/config/environment_monitoring.toml:/home/dummy/src/environment_monitoring/config.toml
......
cd scripts
python generate.py robot.soil -g remote -s -hwc
python generate.py lasertracker.soil -g remote -s -hwc
python generate.py environment_monitoring.soil -g remote -s -hwc
python generate.py robot.soil -g shell -s -hwc
python generate.py lasertracker.soil -g shell -s -hwc
python generate.py monitoring.soil -g shell -s -hwc
cd ..
\ No newline at end of file
import argparse
import json
import os
import subprocess
import sys
import zipfile
import multidict
import requests
import toml
SRC = os.path.join('..', 'src')
OUT = os.path.join('..', 'out')
if __name__ == '__main__':
parser = argparse.ArgumentParser(prog='SOIL dummy FAIR-checker assessment')
parser.add_argument('dummy', type=str, choices=['lasertracker', 'monitoring', 'robot'])
args = parser.parse_args()
config = toml.load(os.path.join(SRC,args.dummy,'config.toml'))
if not os.path.exists(os.path.join(OUT,args.dummy)):
os.mkdir(os.path.join(OUT,args.dummy))
# Test profiles
profiles_path = f'{SRC}/{args.dummy}/{config["semantic"]["profiles"]}'
prefix_url = config["semantic"]["url"]
for filename in os.listdir(profiles_path):
profilename = f'{filename[:-10]}Profile'
request_url = f"https://fair-checker.france-bioinformatique.fr/api/check/metrics_all?url={prefix_url}{profilename}"
print(request_url)
response = requests.get(request_url)
if response.status_code == 200:
with open(os.path.join(OUT,args.dummy,f'{profilename}.json'), 'w') as reportfile:
json.dump(json.loads(response.content.decode('UTF-8')), reportfile)
break
......@@ -7,11 +7,9 @@ import zipfile
import multidict
import requests
# generator = 'shell'
# semantic = True
# HWC = True
INTERFACES_PATH = os.path.join('..', 'assets', 'interfaces')
JAR_PATH = '../../soil-text/target/libs/soil.jar'
if __name__ == '__main__':
parser = argparse.ArgumentParser(prog='SOIL dummy generator')
......@@ -24,17 +22,6 @@ if __name__ == '__main__':
soil_model = args.filename[:-5]
if args.semantic:
INTERFACES_PATH = os.path.join('..', 'assets', 'semantic_interfaces')
# try:
# soil_model = sys.argv[1][:-5]
# if not os.path.exists(os.path.join(INTERFACES_PATH, f'{soil_model}.soil')):
# raise Exception()
# except Exception as e:
# print('You must provide a file from the folder "interfaces" to be used as root file of the generation, e.g., "python generate.py lasertracker.soil".')
# exit()
if args.generator in ['local', 'remote']:
files = multidict.MultiDict()
for filename in os.listdir(INTERFACES_PATH):
......@@ -57,12 +44,6 @@ if __name__ == '__main__':
if args.semantic:
url = f'{url}&semantic=True'
# # url = f'https://iot.wzl-mq.rwth-aachen.de/soil-backend/generate?model={soil_model}.soil&target=visual'
# url = f'https://iot.wzl-mq.rwth-aachen.de/soil-backend/translateToVisual'
# # url = f'http://localhost:8001/generate?model={soil_model}.soil&target=python'
# # if HWC:
# # url = f'{url}'
response = requests.post(url, files=files)
if response.status_code == 200:
if not os.path.exists(os.path.join('..', 'src', soil_model)):
......@@ -79,7 +60,7 @@ if __name__ == '__main__':
print(response.status_code)
elif args.generator == 'shell':
command = f'java -jar ../../soil-text/target/libs/soil.jar soil.MainSoilTool -i {INTERFACES_PATH}/{soil_model}.soil -t python'
command = f'java -jar {JAR_PATH} soil.MainSoilTool -i {INTERFACES_PATH}/{soil_model}.soil -t python'
if args.handwritten:
command += f' -hwc ../src/{soil_model}/hwc'
if args.semantic:
......
import time
from typing import List
from hwc.device import Device
from mobile_entities.com_target import COMTargetTOP
from mobile_entities.enum_mode import Mode
......@@ -12,12 +15,10 @@ class COMTarget(COMTargetTOP):
def fun_reset(self):
self._device.reset_target()
def fun_trigger(self, par_count=1, par_nonce=""):
pass
# for i in range(par_count):
# publish('OBJ-Lasertracker/OBJ-MobileEntities/OBJ-Home-Target/VAR-Position',
# json.dumps({'value': self.get_mea_position(), 'nonce': par_nonce}))
# time.sleep(0.1)
def fun_trigger(self, arg_counter: int = 100, arg_label: str = "test") -> List[float]:
for i in range(arg_counter):
time.sleep(0.1)
yield self.get_mea_position(), arg_label
def get_mea_position(self):
return self._device.target.position
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment