{"id":2187,"date":"2015-07-17T09:34:19","date_gmt":"2015-07-17T07:34:19","guid":{"rendered":"http:\/\/www.generationrobots.com\/blog\/?p=2187"},"modified":"2023-03-29T14:17:45","modified_gmt":"2023-03-29T12:17:45","slug":"metabot-tutorial-see-through-its-eyes","status":"publish","type":"post","link":"https:\/\/www.generationrobots.com\/blog\/en\/metabot-tutorial-see-through-its-eyes\/","title":{"rendered":"Metabot Tutorial, see through its eyes!"},"content":{"rendered":"\n<html>\n <body>\n  <p>\n   In this first Metabot tutorial, we are going to show you how to customise your legged robot by adding a camera module which will deliver a video stream. That way, you will be able to see through your Metabot\u2019s eyes!\n  <\/p>\n  \n  \n  <h2 class=\"wp-block-heading\" id=\"h-list-of-the-necessary-components-for-this-project\">\n   List of the necessary components for this project\n  <\/h2>\n  \n  \n  <p>\n   Here is the list of the different components you will need to gather in order to get started with this project:\n  <\/p>\n  \n  \n  <ul class=\"wp-block-list\">\n   \n   <li>\n    A Metabot (assembled and complete)\n   <\/li>\n   \n   \n   <li>\n    An\n    <a class=\"catalogue\" href=\"\/en\/402012-opencm904-c-controller.html\" title=\"OpenCM9.04-C Controller\">\n     OpenCM9.04-C Controller\n    <\/a>\n    (included in the Metabot kit)\n   <\/li>\n   \n   \n   <li>\n    A\n    <a class=\"catalogue\" href=\"\/en\/403383-raspberry-pi-4-model-b.html\" title=\"Raspberry Pi 4 Model B\">\n     Raspberry Pi board\n    <\/a>\n   <\/li>\n   \n   \n   <li>\n    A WiFi dongle\n   <\/li>\n   \n   \n   <li>\n    A camera module for Raspberry Pi\n   <\/li>\n   \n   \n   <li>\n    A\n    <a href=\"\/en\/307-batteries-for-robots\">\n     battery\n    <\/a>\n    to power the Raspberry Pi board\n   <\/li>\n   \n   \n   <li>\n    A\n    <a href=\"\/media\/camera_mount.stl\" title=\"3D structural part STL files\">\n     3D printed structural part\n    <\/a>\n    , to hold the camera module tightly\n   <\/li>\n   \n  <\/ul>\n  \n  \n  <h2 class=\"wp-block-heading\" id=\"h-the-main-part-the-opencm9-04-c-controller\">\n   The main part: the OpenCM9.04-C Controller\n  <\/h2>\n  \n  \n  <p>\n   Before we start, a few words about the OpenCM9.04-C Controller. The role of this embedded board developed by Robotis is to control the\n   <a class=\"catalogue\" href=\"\/en\/401692-dynamixel-xl-320-servo-motor.html\" title=\"Dynamixel XL-320 servo motor\">\n    XL-320 servomotors\n   <\/a>\n   , included in your Metabot set.\n  <\/p>\n  \n  \n  <figure class=\"wp-block-image\">\n   <img fetchpriority=\"high\" decoding=\"async\" width=\"398\" height=\"200\" alt=\"OpenCM9.04-C Controller\" class=\"wp-image-2121\" src=\"http:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/carte-de-controle-opencm904-c-e1434468108232.jpg\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/carte-de-controle-opencm904-c-e1434468108232.jpg 398w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/carte-de-controle-opencm904-c-e1434468108232-300x151.jpg 300w\" sizes=\"(max-width: 398px) 100vw, 398px\" \/>\n  <\/figure>\n  \n  \n  <p class=\"has-text-align-center\">\n  <\/p>\n  \n  \n  <p>\n   You will need to flash this controller with the\n   <a class=\"catalogue\" href=\"\/media\/metabot\/firmware.zip\" rel=\"noopener noreferrer\" target=\"_blank\" title=\"OpenCM9.04-C Controller Firmware\">\n    firmware\n   <\/a>\n   , it will then appear as a serial device waiting for instructions.\n  <\/p>\n  \n  \n  <h2 class=\"wp-block-heading\" id=\"h-assemble-your-setup-with-the-metabot\">\n   Assemble your setup with the Metabot\n  <\/h2>\n  \n  \n  <p>\n   <strong>\n    Step 1:\n   <\/strong>\n   you will first have to 3D print a small part, which will be used as a support for the camera module. You can find the STL files\n   <a class=\"catalogue\" href=\"\/media\/camera_mount.stl\" rel=\"noopener noreferrer\" target=\"_blank\" title=\"Metabot tutorial: 3D structural part STL files\">\n    here\n   <\/a>\n   .\n  <\/p>\n  \n  \n  <figure class=\"wp-block-image\">\n   <img decoding=\"async\" width=\"550\" height=\"342\" alt=\"3D printed structural part to hold the camera module tightly\" class=\"wp-image-2110\" src=\"http:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/piece-de-structure-support-camera-metabot.jpg\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/piece-de-structure-support-camera-metabot.jpg 550w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/piece-de-structure-support-camera-metabot-300x187.jpg 300w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/>\n  <\/figure>\n  \n  \n  <p class=\"has-text-align-center\">\n  <\/p>\n  \n  \n  <p>\n   <strong>\n    Step 2:\n   <\/strong>\n   fasten the camera module to this 3D printed part like shown in the below picture. We used wire for that purpose.\n  <\/p>\n  \n  \n  <figure class=\"wp-block-image\">\n   <a href=\"\/blog\/wp-content\/uploads\/2015\/06\/tutoriel-metabot-fixer-camera-a-structure.jpg\">\n    <img decoding=\"async\" width=\"400\" height=\"419\" alt=\"tutoriel-metabot-fasten-the-camera-module\" class=\"wp-image-2140\" src=\"http:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/tutoriel-metabot-fixer-camera-a-structure.jpg\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/tutoriel-metabot-fixer-camera-a-structure.jpg 400w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/tutoriel-metabot-fixer-camera-a-structure-286x300.jpg 286w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/>\n   <\/a>\n  <\/figure>\n  \n  \n  <p class=\"has-text-align-center\">\n  <\/p>\n  \n  \n  <p>\n   <strong>\n    Step 3:\n   <\/strong>\n   tightly fix the Raspberry Pi board on the Metabot robot. Again, we used wires, that we passed through the Raspberry Pi board and OLLO plate holes. Removing the Metabot bluetooth module gives more stability to your set up. We also used wires for this step.\n  <\/p>\n  \n  \n  <figure class=\"wp-block-image\">\n   <a href=\"\/blog\/wp-content\/uploads\/2015\/06\/tutoriel-metabot-fixation-raspberry-pi.jpg\">\n    <img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"300\" alt=\"Metabot tutorial assemble the Raspberry Pi to your Metabot\" class=\"wp-image-2141\" src=\"http:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/tutoriel-metabot-fixation-raspberry-pi.jpg\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/tutoriel-metabot-fixation-raspberry-pi.jpg 400w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/tutoriel-metabot-fixation-raspberry-pi-300x225.jpg 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/>\n   <\/a>\n  <\/figure>\n  \n  \n  <p class=\"has-text-align-center\">\n  <\/p>\n  \n  \n  <p>\n   <strong>\n    Step 4:\n   <\/strong>\n   now there is just the battery to add on the controller, right next to the Raspberry Pi board. Be careful to position it in the middle, in order not to modify the robot gravity center.\n  <\/p>\n  \n  \n  <figure class=\"wp-block-image\">\n   <a href=\"\/blog\/wp-content\/uploads\/2015\/06\/tutoriel-metabot-fixation-batterie.jpg\">\n    <img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"300\" alt=\"Metabot tutorial assemble the Raspberry Pi to your Metabot, fasten the batteries\" class=\"wp-image-2142\" src=\"http:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/tutoriel-metabot-fixation-batterie.jpg\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/tutoriel-metabot-fixation-batterie.jpg 400w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/tutoriel-metabot-fixation-batterie-300x225.jpg 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/>\n   <\/a>\n  <\/figure>\n  \n  \n  <p class=\"has-text-align-center\">\n  <\/p>\n  \n  \n  <h2 class=\"wp-block-heading\" id=\"h-list-of-the-commands-available-with-the-opencm9-controller\">\n   List of the commands available with the openCM9 controller\n  <\/h2>\n  \n  \n  <p>\n   Connect your Metabot OpenCM9.04-C controller to your computer. In a program such as\n   <a class=\"catalogue\" href=\"http:\/\/doc.ubuntu-fr.org\/minicom\" rel=\"noopener noreferrer\" target=\"_blank\" title=\"Download the Minicom program\">\n    Minicom\n   <\/a>\n   or\n   <a class=\"catalogue\" href=\"http:\/\/www.putty.org\/\" rel=\"noopener noreferrer\" target=\"_blank\" title=\"Download the Putty program\">\n    Putty\n   <\/a>\n   , type the command\n   <code>\n    help\n   <\/code>\n   in order to get the list of all the different commands that are available to you.\n  <\/p>\n  \n  \n  <figure class=\"wp-block-image\">\n   <img loading=\"lazy\" decoding=\"async\" width=\"721\" height=\"933\" alt=\"Camera for your Metabot - commands available\" class=\"wp-image-2116\" src=\"http:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/camera-pour-Metabot-commandes-disponibles.jpg\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/camera-pour-Metabot-commandes-disponibles.jpg 721w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/camera-pour-Metabot-commandes-disponibles-232x300.jpg 232w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/camera-pour-Metabot-commandes-disponibles-687x889.jpg 687w\" sizes=\"(max-width: 721px) 100vw, 721px\" \/>\n  <\/figure>\n  \n  \n  <p class=\"has-text-align-center\">\n  <\/p>\n  \n  \n  <p>\n   For instance, the\n   <code>\n    dxl_scan\n   <\/code>\n   command will display the IDs list of the servomotors connected to the controller.\n  <\/p>\n  \n  \n  <figure class=\"wp-block-image\">\n   <img loading=\"lazy\" decoding=\"async\" width=\"317\" height=\"276\" alt=\"camera-for-Metabot-dxl_scan\" class=\"wp-image-2115\" src=\"http:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/camera-pour-Metabot-dxl_scan.jpg\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/camera-pour-Metabot-dxl_scan.jpg 317w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/camera-pour-Metabot-dxl_scan-300x261.jpg 300w\" sizes=\"(max-width: 317px) 100vw, 317px\" \/>\n  <\/figure>\n  \n  \n  <p class=\"has-text-align-center\">\n  <\/p>\n  \n  \n  <p>\n   With the\n   <code>\n    start\n   <\/code>\n   command, you can set up the\n   <code>\n    enable\n   <\/code>\n   mode of your servomotors (with torque), and the stop command activate the\n   <code>\n    disable\n   <\/code>\n   mode (without torque).\n  <\/p>\n  \n  \n  <figure class=\"wp-block-image\">\n   <img loading=\"lazy\" decoding=\"async\" width=\"327\" height=\"381\" alt=\"camera-for-Metabot-commands-start-and-stop\" class=\"wp-image-2117\" src=\"http:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/camera-pour-Metabot-commandes-start-et-stop.jpg\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/camera-pour-Metabot-commandes-start-et-stop.jpg 327w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2015\/06\/camera-pour-Metabot-commandes-start-et-stop-257x300.jpg 257w\" sizes=\"(max-width: 327px) 100vw, 327px\" \/>\n  <\/figure>\n  \n  \n  <p class=\"has-text-align-center\">\n  <\/p>\n  \n  \n  <p>\n   Thanks to the\n   <code>\n    dx 50\n   <\/code>\n   ,command, your Metabot will move in a straight line, at 50 mm\/step speed. The\n   <code>\n    turn 20\n   <\/code>\n   command will make it turn at a 20\u00b0\/step angle.\n  <\/p>\n  \n  \n  <h2 class=\"wp-block-heading\" id=\"h-metabot-raspberry-pi-more-freedom\">\n   Metabot + Raspberry Pi: more freedom!\n  <\/h2>\n  \n  \n  <p>\n   To truly set your Metabot free and be able to control it without a computer, we replaced it with a Raspberry Pi board. We also added a WiFi to set up a video stream from the camera module, so you\u2019ll be able to see through the eyes of your legged robot!\n  <\/p>\n  \n  \n  <p>\n   Now you can send your robot exploring your office or your lab, or even discovering the outside world!\n  <\/p>\n  \n  \n  <h2 class=\"wp-block-heading\">\n   Set up the video stream\n  <\/h2>\n  \n  \n  <p>\n   First off, you need to download the\n   <a class=\"catalogue\" href=\"\/media\/meta_drive.rar\" title=\"Meta_drive resources for your Metabot video stream\">\n    following resources\n   <\/a>\n   to properly set up this video stream. Avant toute chose, vous devez t\u00e9l\u00e9charger ces ressources, qui vous seront n\u00e9cessaire pour mettre en place le flux vid\u00e9o. This folder will have to be downloaded on both your PC and your Raspberry Pi.\n  <\/p>\n  \n  \n  <p>\n   <strong>\n    Step 1:\n   <\/strong>\n   type the following command in your terminal to get these resources:\n  <\/p>\n  \n  \n  <div style=\"padding: 3px; solid #d0d0d0; background-color: #f1f1f1;\">\n   <code>\n    sh\n    <br\/>\n    $ git clone url_to_provide\n   <\/code>\n  <\/div>\n  \n  \n  <p>\n   This will clone the demo directory.\n  <\/p>\n  \n  \n  <p>\n   In the folder you just downloaded, you will find 2 sub-folders:\n  <\/p>\n  \n  \n  <ul class=\"wp-block-list\">\n   \n   <li>\n    Sub-folder 1: pc\u00a0(with all the necessary scripts for your PC)\n   <\/li>\n   \n   \n   <li>\n    Sub-folder 2: rpi\u00a0(with the install scripts, and the scripts you will need to run the program)\n   <\/li>\n   \n  <\/ul>\n  \n  \n  <p>\n   <strong>\n    Step 2:\n   <\/strong>\n   launch the install process on your PC:\n  <\/p>\n  \n  \n  <div style=\"padding: 3px; solid #d0d0d0; background-color: #f1f1f1;\">\n   <code>\n    sh\n    <br\/>\n    $ cd meta_drive\/pc\n    <br\/>\n    $ bash install.sh\n   <\/code>\n  <\/div>\n  \n  \n  <p>\n   This will install\n   <code>\n    gstreamer\n   <\/code>\n   , which is the program you will need to effectively get the video stream from the camera module for Raspberry Pi.\n  <\/p>\n  \n  \n  <p>\n   <strong>\n    Step 3:\n   <\/strong>\n   browse in the rpi folder (sub-folder 2) and launch the set up:\n  <\/p>\n  \n  \n  <div style=\"padding: 3px; solid #d0d0d0; background-color: #f1f1f1;\">\n   <code>\n    sh\n    <br\/>\n    $ cd meta_drive\/rpi\n    <br\/>\n    $ bash install.sh\n   <\/code>\n  <\/div>\n  \n  \n  <p>\n   Once the 2 set ups are complete, it is time to test the program!\n  <\/p>\n  \n  \n  <p>\n   <strong>\n    Step 4:\n   <\/strong>\n   you first need to see if the video stream is working correctly. Type the following command in the Raspberry Pi terminal:\n  <\/p>\n  \n  \n  <div style=\"padding: 3px; solid #d0d0d0; background-color: #f1f1f1;\">\n   <code>\n    sh\n    <br\/>\n    $ bash gstLaunch.sh ADDRESSE_IP_DU_PI\n   <\/code>\n  <\/div>\n  \n  \n  <p>\n   This is the command you need to type if you want to know your Raspberry Pi IP address:\n  <\/p>\n  \n  \n  <div style=\"padding: 3px; solid #d0d0d0; background-color: #f1f1f1;\">\n   <code>\n    sh\n    <br\/>\n    $ ifconfig\n   <\/code>\n  <\/div>\n  \n  \n  <p>\n   Once the script is running, start the client (computer side) with this command:\n  <\/p>\n  \n  \n  <div style=\"padding: 3px; solid #d0d0d0; background-color: #f1f1f1;\">\n   <code>\n    sh\n    <br\/>\n    $ bash meta_drive\/pc\/gstClient.sh\n   <\/code>\n  <\/div>\n  \n  \n  <p>\n   If you already are in the PC sub-folder, you will just have type this to run the script:\n  <\/p>\n  \n  \n  <div style=\"padding: 3px; solid #d0d0d0; background-color: #f1f1f1;\">\n   <code>\n    sh\n    <br\/>\n    $ bash gstClient.sh\n   <\/code>\n  <\/div>\n  \n  \n  <p>\n   If the video stream runs properly, you should now see what the camera module is filming.\n  <\/p>\n  \n  \n  <p>\n   If everything went smoothly, you can now sne your Metabot in the open and follow its adventures as they unfold!\n  <\/p>\n  \n  \n  <p>\n   Run the\n   <code>\n    launcher\n   <\/code>\n   on your Raspberry Pi:\n  <\/p>\n  \n  \n  <div style=\"padding: 3px; solid #d0d0d0; background-color: #f1f1f1;\">\n   <code>\n    sh\n    <br\/>\n    $ cd meta_drive\/rpi\/\n    <br\/>\n    $ bash launch.sh IP_RPI\n   <\/code>\n  <\/div>\n  \n  \n  <p>\n   Then your PC:\n  <\/p>\n  \n  \n  <div style=\"padding: 3px; solid #d0d0d0; background-color: #f1f1f1;\">\n   <code>\n    sh\n    <br\/>\n    $ cd meta_drive\/pc\/\n    <br\/>\n    $ bash launch.sh IP_RPI\n   <\/code>\n  <\/div>\n  \n  \n  <p>\n   And the adventure begins!\n  <\/p>\n  \n  \n  <p>\n   To control your Metabot, the easiest is to download this\n   <a class=\"catalogue\" href=\"https:\/\/play.google.com\/store\/apps\/details?id=fr.metabot.mobile\" rel=\"noopener noreferrer\" target=\"_blank\" title=\"Application gratuite Android pour Metabot\">\n    free app\n   <\/a>\n   for your android device on the Google Play Store. It can also be controlled with a Bluetooth controller.\n  <\/p>\n  \n <\/body>\n<\/html>","protected":false},"excerpt":{"rendered":"<p>In this first Metabot tutorial, we are going to show you how to customise your legged robot by adding a camera module which will deliver a video stream. That way, you will be able to see through your Metabot\u2019s eyes! List of the necessary components for this project Here is the list of the different[&#8230;]<br \/> <a class=\"button\" href=\"https:\/\/www.generationrobots.com\/blog\/en\/metabot-tutorial-see-through-its-eyes\/\" style=\"float:right;\">Read this article &gt;&gt;<\/a><\/p>\n","protected":false},"author":188,"featured_media":2189,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1132],"tags":[],"class_list":["post-2187","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-education-en"],"_links":{"self":[{"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/posts\/2187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/users\/188"}],"replies":[{"embeddable":true,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/comments?post=2187"}],"version-history":[{"count":13,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/posts\/2187\/revisions"}],"predecessor-version":[{"id":12927,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/posts\/2187\/revisions\/12927"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/media\/2189"}],"wp:attachment":[{"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/media?parent=2187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/categories?post=2187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/tags?post=2187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}