Difference between revisions of "ROSRV"

From FSL
Jump to: navigation, search
Line 63: Line 63:
 
Watch our demo to see how the monitors interact with the robot LandShark [2]:
 
Watch our demo to see how the monitors interact with the robot LandShark [2]:
  
<iframe src="" height="600" width="816"></iframe>
+
<iframe src="https://docs.google.com/file/d/0Bx8YGe2pU821aVlwSUUxTEdab1k/preview" width="1280" height="770"></iframe>
  
 
== References ==
 
== References ==

Revision as of 02:18, 3 February 2014

ROSRV is a runtime verification framework for the Robot Operating System (ROS) [1]. ROS is an open-source framework for robot software development, providing operating system-like functionality on heterogeneous computer clusters. With the wide adoption of ROS, its safety and security are becoming an important problem. ROSRV integrates seamlessly with ROS and works as a transparent monitoring infrastructure that intercepts the commands and messages passing through the system and performs monitoring actions upon events of interest. Safety and security properties can be defined in a formal specification language, and are ensured by monitors generated automatically from specifications.

Contents

Getting Started

Event Specification

All the specifications are provided by users. ROSRV generates C++ code automatically based on those specifications. Each event generates one call back method and all the call back methods are registered by RVMaster. Parameters of events are treated as references to fields in monitored messages, so users can modify messages in event handler code. Event handlers (i.e. actions) are inserted in call back methods and called by RVMaster at runtime.

Basic form of a user-defined event specification is the following:

#include <library>
spec(){
int i;
bool b;
 
event event1(parameters) topic messageType '{pattern}'
<<
//action code
>>
}

Event specification names are used to identify the monitors. By using those names, one can enable or disable desired monitors, and hence control which events take place.

The following event specification defines the monitor which makes sure the robot doesn't shoot itself. For clarity, please check out our demo.

#include <stdint.h>
 
safeTrigger() {
bool isSafeTrigger = false;
 
event checkPoint(std::string monitored_name, double monitored_position) /landshark/joint_states sensor_msgs/JointState '{name[1]:monitored_name, position[1]:monitored_position}'
<<
if(monitored_name=="turret_tilt")
{
if(monitored_position > -0.45){
isSafeTrigger = true;
ROS_INFO("Safe to trigger");
}else{
isSafeTrigger = false;
ROS_INFO("Not safe to trigger");
}
}
>>
 
event safeTrigger() /landshark_control/trigger landshark_msgs/PaintballTrigger '{}'
<<
if(!isSafeTrigger)
{
ROS_WARN("Monitor: Not allowed to trigger in this pose!");
return;
}
>>
}


Demo

Watch our demo to see how the monitors interact with the robot LandShark [2]:

References

[1] ROS

[2] The LandShark UGV is a product of Black-i Robotics

Personal tools
Namespaces

Variants
Actions
Navigation