TUTORIAL 4: Taking a picture

Blockly is a ROS package that provides web-based visualization and block programming tools for robots and drones.

Simply add 'Take a picture' block, no additional blocks are needed.

Once 'raspicam_node' is running, the service in charge of capturing data from the camera is called. Camera lecture data is read from '/camera/image/compressed' topic and the image is saved at /pages/images/ folder. This way the image can be accessed from the website.

A simple image visualizer will be opened in a new tab, where the taken last 5 images will be visible. The visualizer is located in the same folder as the images, /pages/images/imageViewer.html .

Note: OpenCv3 with Python3 is used. This code works with OpenCv2 also.

blockly comes preinstalled in Erle-Brain 2.0. Acquire this artificial brain for making robots and drones here