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
|
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.
[[images/hazard_detection/lamp_on_small.jpg]]
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
Service URL: /rapp/rapp_hazard_detection/light_check
Service type: ```bash
Header header
int32 light_level string error ```
Service URL: /rapp/rapp_hazard_detection/light_check
Service type: ```bash
Header header
int32 door_angle string error ```
#Launchers
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": "" } ```