Issue with online verification / data published on monitor_verdict topic
I have been trying to use ROSMonitoring monitor data that is published on ROS topics to use as information for our multiagent system based on Jason BDI Agents. However I have found some issues with the data that is published on the monitor_verdicts topics. The issue is as follows:
We have a ROS-Gazebo simulation where we want to detect if the topic /detect_fire_uav1 is publishing the integer number 1. For that reason we have created a monitor that is checking this topic, the property that is being checked online is as follows:
PROPERTY` = "historically[0:3]{fire}"
predicates = dict(
time = 0,
fire = True
)
messages to predicates.
def abstract_message(message):
if message['topic'] == 'detect_fire_uav1' and message['data'] == 1:
predicates['fire'] = True
else:
predicates['fire'] = False
predicates['time'] = message['time']
return predicates
During all simulation data published on detect_fire_uav1 is 1, so we expected the monitor verdict to be true during it. However, during online verification and when checking the logs of the monitor, we see that sometimes an erroneous message is published on the verdict topic, for example:
{"data": 1, "topic": "detect_fire_uav1", "time": 439.892, "verdict": "currently_true"} {"data": 1, "topic": "detect_fire_uav1", "time": 439.902, "verdict": "currently_true"} {"data": 1, "topic": "detect_fire_uav1", "time": 439.896, "verdict": "currently_false", "spec": "historically[0:3]{fire}"} {"data": 1, "topic": "detect_fire_uav1", "time": 439.896, "verdict": "currently_false", "spec": "historically[0:3]{fire}"} {"data": 1, "topic": "detect_fire_uav1", "time": 439.916, "verdict": "currently_true"} {"data": 1, "topic": "detect_fire_uav1", "time": 439.944, "verdict": "currently_true"}
or
{"data": 1, "topic": "detect_fire_uav1", "time": 441.004, "verdict": "currently_true"} {"data": 1, "topic": "detect_fire_uav1", "time": 441.004, "verdict": "currently_false", "spec": "historically[0:3]{fire}"} {"data": 1, "topic": "detect_fire_uav1", "time": 441.028, "verdict": "currently_true"} {"data": 1, "topic": "detect_fire_uav1", "time": 441.06, "verdict": "currently_true"}
In case it is of help, I have attached the monitor configuration file, the property being checked by TLOracle and the log, as txt files log1.txt online_config.txt property1.txt . I would like to know is there is a way to remove these false negatives from being published on the monitor_verdict ROS topic.
Dear Iago,
I am sorry to hear you are encountering these issues. I have two questions:
- Are you using ROS or ROS2?
- Can you send me the command line you use to run the TL oracle? Specifically, did you use the —discrete, or, —dense flag?
Cheers, Angelo
Dear Iago,
I did some test, if you pass —discrete flag everything works as expected.
Let me know if this solves your problem.
Cheers, Angelo
Thank you, I was using --dense flag and changing it to discrete did indeed solve the problem.
If you dont mind me asking, would it be possible to change the format of the message that is published on monitor_verdict. I ask that because it could simplify the logic of the Jason BDI agent that is reading the data from these topics.
Dear Iago,
I am happy to hear that with the other flag It works.
Concerning your request. It should be easy to do. You can just modify the monitor file ROSMonitoring generates.
On this topic, I suggest to give a look at https://github.com/autonomy-and-verification-uol/StreamB This is another tool I developed to handle stream of information from ROS to High level beliefs. Even though it might require some modification on the topic side, I thought to mention It.
In any case, let me know if you need support for other things in ROSMonitoring.
Cheers, Angelo