RAPP Platform Wiki  v0.6.0
RAPP Platform is a collection of ROS nodes and back-end processes that aim to deliver ready-to-use generic services to robots
 All Files Pages
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.

Light checking

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.

[[images/hazard_detection/lamp_on_small.jpg]]

Door checking

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.

[[images/hazard_detection/door_1.png]]

#ROS Services

Light checking

Service URL: /rapp/rapp_hazard_detection/light_check

Service type: ```bash

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: ```bash

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

Light checking

URL

localhost:9001/hop/hazard_detection_light_check

Input / Output

``` Input = { "file": “THE_ACTUAL_IMAGE_DATA” } Output = { "light_level": 50, "error": "" } ```

Door checking

URL

localhost:9001/hop/hazard_detection_door_check

Input / Output

``` Input = { "file": "THE_ACTUAL_IMAGE_DATA" } Output = { "door_angle": 50, "error": "" } ```

The full documentation exists here and here