-
Notifications
You must be signed in to change notification settings - Fork 20
RAPP Hazard Detection
In the RAPP case, the hazard detection functionality is implemented in the form of a C++ developed ROS node, interfaced by a HOP service. The HOP service is invoked using the RAPP API and gets an RGB image as input, in which hazards has to be checked. The second step is for the HOP service to locally save the input image. At the same time, the hazard_detection ROS node is executed in the background, waiting to server requests. The HOP service calls the ROS service via the ROS Bridge, the ROS node make the necessary computations and a response is delivered.
Sample image (taken at exposure of 1ms) present a lamp that is switched on (see figure). Final result for image is computed by comparison of average brightness of eight surrounding regions (red) with central region (blue). In the case of looking at the lamp central region will be much brighter than surrounding (light left switched on). In case of looking through the door into other room central column will be brighter than border ones for light left switched on.
Solution is based on a single image (see figure), that is acquired in a way that a bottom part of the door, with (possibly) both right and left frame is visible. By analyzing vertical and horizontal lines decision about door opening angle is taken. If horizontal lines are almost parallel to each other, doors are closed. If the lines between frames (vertical) have different angle to those to the left and right of the frame, doors are treated as opened.
#ROS Services
##Light checking
Service URL: /rapp/rapp_hazard_detection/light_check
Service type:
# Contains info about time and reference
Header header
# The image's filename to perform light checking
string imageFilename
---
# Light level in the center of the provided image
int32 light_level
string error
##Door checking
Service URL: /rapp/rapp_hazard_detection/light_check
Service type:
# Contains info about time and reference
Header header
# The image's filename to perform door checking
string imageFilename
---
# Estimated door opening angle
int32 door_angle
string error
#Launchers
##Standard launcher
Launches the hazard_detection node and can be launched using
roslaunch rapp_hazard_detection hazard_detection.launch
#Web services
localhost:9001/hop/hazard_detection_light_check
Input = {
"file": “THE_ACTUAL_IMAGE_DATA”
}
Output = {
"light_level": 50,
"error": ""
}
localhost:9001/hop/hazard_detection_door_check
Input = {
"file": "THE_ACTUAL_IMAGE_DATA"
}
Output = {
"door_angle": 50,
"error": ""
}
RAPP Project, http://rapp-project.eu/