Tatrabot mapuje miestnost - Igor Slovak

From RoboWiki
Jump to: navigation, search

Goal of project

Goal of the project is show possibilities of TatraBot to map room using UltraSonic sensors. The basic output in ascii graphics will be used.

Overview

I'll use data from Ultrasonic Sensors mounted on both side of the TatraBot. Then I have programmed the robot to use compass to go straight and map the surrounding area.

Preparing the robot

First we have to mount and connect ultrasonic sensors to robots control board STM32. Then program to extrapolate the feedback numbers into real distance.

Challanges

The STM32 controler doesn't have microsecond delay therefore I have to use a dummy cycle and measure the time spend for it in order to create 10micro second impuse to activate ultrasonic sensors.

  1. Understanding STM32 programming is a must
  2. Connect Ultrasonic Sensors and

As a result I have connected the TatraBot via BlueTooth to computer to receive results and print the final map of the "room"..


Results

I have updated the default Demo program and created option u: which started mapping functionality. Media:tatrabot_room.zip

Result of the Test round 1.

***************************************************                                                                          ***************************************************************************
***************************************************                                                                          ***************************************************************************
****************************************************                                                                         ***************************************************************************
****************************************************                                                                        ****************************************************************************
****************************************************                                                                        ****************************************************************************
****************************************************                                                                       *****************************************************************************
****************************************************                                                                       *****************************************************************************
****************************************************                                                                       *****************************************************************************
****************************************************                                                                       *****************************************************************************
****************************************************                                                                        ****************************************************************************
****************************************************                                                                        ****************************************************************************
****************************************************                                                                       *****************************************************************************
*****************************************************                                                                      *****************************************************************************
****************************************************                                                                       *****************************************************************************
***************************************************                                                                        *****************************************************************************
****************************************************                                                                       *****************************************************************************
****************************************************                                                                       *****************************************************************************
***************************************************                                                                       ******************************************************************************
***************************************************                                                                       ******************************************************************************
***************************************************                                                                       ******************************************************************************
***************************************************                                                                                     ****************************************************************
***************************************************                                                                                     ****************************************************************
***************************************************                                                                                    *****************************************************************
**************************************************                                                                                     *****************************************************************
**************************************************                                                                                     *****************************************************************
**************************************************                                                                                     *****************************************************************
**************************************************                                                                                     *****************************************************************
**************************************************                                                                                     *****************************************************************
**************************************************                                                                                     *****************************************************************
*************************************************                                                                                     ******************************************************************
*************************************************                                                                                      *****************************************************************
*************************************************                                                                                    *******************************************************************
**************************************************                                                                                    ******************************************************************
*************************************************                                                                                      *****************************************************************
*************************************************                                                                                    *******************************************************************
*************************************************                                                                                    *******************************************************************
*************************************************                                                                                     ******************************************************************
*************************************************                                                                                     ******************************************************************
**************************************************                                                                                    ******************************************************************
**************************************************                                                                                    ******************************************************************
**************************************************                                                                                    ******************************************************************
***************************************************************************                                                          *******************************************************************
****************************************************************************                                                          ******************************************************************
*****************************************************************************                                                         ******************************************************************
*****************************************************************************                                                       ********************************************************************
********************************************************************************                                        ********************************************************************************
********************************************************************************                                        ********************************************************************************
********************************************************************************                                       *********************************************************************************
********************************************************************************                                       *********************************************************************************
********************************************************************************                                       *********************************************************************************
********************************************************************************                                       *********************************************************************************
*********************************************************************************                                       ********************************************************************************
********************************************************************************                                        ********************************************************************************
*********************************************************************************                                       ********************************************************************************
********************************************************************************                                        ********************************************************************************
********************************************************************************                                         *******************************************************************************
********************************************************************************                                         *******************************************************************************
*********************************************************************************                                        *******************************************************************************
*********************************************************************************                                        *******************************************************************************
*********************************************************************************                                        *******************************************************************************
*********************************************************************************                                        *******************************************************************************
*********************************************************************************                                        *******************************************************************************
*********************************************************************************                                       ********************************************************************************
*********************************************************************************                                       ********************************************************************************
*******************************************************************************                                         ********************************************************************************
*******************************************************************************                                         ********************************************************************************
******************************************************************************                                           *******************************************************************************
***************************************************************                                                          *******************************************************************************
***************************************************************                                                          *******************************************************************************
***************************************************************                                                          *******************************************************************************
***************************************************************                                                           ******************************************************************************
***************************************************************                                                           ******************************************************************************
****************************************************************                                                          ******************************************************************************
***************************************************************                                                           ******************************************************************************
****************************************************************                                                          ******************************************************************************
****************************************************************                                                              **************************************************************************
****************************************************************                                                                                         ***********************************************
****************************************************************                                                              **************************************************************************
****************************************************************                                                                                                      **********************************
****************************************************************                                                                                                       *********************************
*****************************************************************                                                                                                      *********************************
****************************************************************                                                                                                       *********************************
****************************************************************                                                                                                      **********************************
****************************************************************                                                                                                      **********************************
*****************************************                                                                                                                             **********************************
*****************************************                                                                                                                              *********************************
*****************************************                                                                                                                              *********************************
****************************************                                                                                                                               *********************************
****************************************                                                                                                                               *********************************
****************************************                                                                                                                                ********************************
*******************************************                                                                                                                              *******************************
******************************************                                                                                                                              ********************************
*******************************************                                                                                                                            *********************************
*******************************************                                                                                                                            *********************************
*******************************************                                                                                                                           **********************************
*******************************************                                                                                                                           **********************************
*******************************************                                                                                                                           **********************************
*******************************************                                                                                                                           **********************************
*******************************************                                                                                                                           **********************************
********************************************                                                                                                                            ********************************




Pokus 2


current: -469left =    45, right =    68
Miesnost ....
****************************************************                                                                        ****************************************************************************
****************************************************                                                                       *****************************************************************************
****************************************************                                                                       *****************************************************************************
*****************************************************                                                                      *****************************************************************************
****************************************************                                                                       *****************************************************************************
*****************************************************                                                                      *****************************************************************************
*****************************************************                                                                      *****************************************************************************
*****************************************************                                                                      *****************************************************************************
*****************************************************                                                                      *****************************************************************************
******************************************************                                                                     *****************************************************************************
******************************************************                                                                     *****************************************************************************
*****************************************************                                                                       ****************************************************************************
******************************************************                                                                      ****************************************************************************
******************************************************                                                                                  ****************************************************************
******************************************************                                                                                  ****************************************************************
******************************************************                                                                                  ****************************************************************
******************************************************                                                                                  ****************************************************************
******************************************************                                                                                  ****************************************************************
******************************************************                                                                                   ***************************************************************
******************************************************                                                                                   ***************************************************************
******************************************************                                                                                   ***************************************************************
******************************************************                                                                                   ***************************************************************
******************************************************                                                                                   ***************************************************************
******************************************************                                                                                  ****************************************************************
******************************************************                                                                                  ****************************************************************
******************************************************                                                                                  ****************************************************************
******************************************************                                                                                   ***************************************************************
*******************************************************                                                                                 ****************************************************************
*******************************************************                                                                                 ****************************************************************
*******************************************************                                                                                  ***************************************************************
*******************************************************                                                                                  ***************************************************************
*******************************************************************************                                                          ***************************************************************
********************************************************************************                                                         ***************************************************************
*********************************************************************************                                                        ***************************************************************
**********************************************************************************                                                        **************************************************************
**********************************************************************************                                                       ***************************************************************
************************************************************************************                                       *****************************************************************************
************************************************************************************                                       *****************************************************************************
************************************************************************************                                       *****************************************************************************
*************************************************************************************                                       ****************************************************************************
*************************************************************************************                                      *****************************************************************************
*************************************************************************************                                       ****************************************************************************
**************************************************************************************                                       ***************************************************************************
*************************************************************************************                                       ****************************************************************************
*************************************************************************************                                        ***************************************************************************
*************************************************************************************                                       ****************************************************************************
**************************************************************************************                                      ****************************************************************************
*************************************************************************************                                        ***************************************************************************
**************************************************************************************                                      ****************************************************************************
**************************************************************************************                                      ****************************************************************************
**************************************************************************************                                       ***************************************************************************
**************************************************************************************                                       ***************************************************************************
**************************************************************************************                                       ***************************************************************************
***************************************************************************************                                      ***************************************************************************
***************************************************************************************                                      ***************************************************************************
****************************************************************************************                                      **************************************************************************
****************************************************************************************                                       *************************************************************************
****************************************************************************************                                       *************************************************************************
***************************************************************************************                                        *************************************************************************
***************************************************************************************                                        *************************************************************************
**************************************************************************************                                         *************************************************************************
*************************************************************************************                                          *************************************************************************
**************************************************************************************                                          ************************************************************************
**************************************************************************************                                         *************************************************************************
************************************************************************                                                       *************************************************************************
************************************************************************                                                        ************************************************************************
************************************************************************                                                        ************************************************************************
************************************************************************                                                        ************************************************************************
************************************************************************                                                         ***********************************************************************
************************************************************************                                                         ***********************************************************************
************************************************************************                                                         ***********************************************************************
*************************************************************************                                                                                                      *************************
*************************************************************************                                                                                                      *************************
*************************************************************************                                                                                                        ***********************
*************************************************************************                                                                                                      *************************
*************************************************************************                                                                                                      *************************
*************************************************************************                                                                                                      *************************
*************************************************************************                                                                                                      *************************
*************************************************************************                                                                                                      *************************
**************************************************                                                                                                                              ************************
*************************************************                                                                                                                              *************************
*************************************************                                                                                                                              *************************
***************************************************                                                                                                                            *************************
***************************************************                                                                                                                             ************************
***************************************************                                                                                                                            *************************
****************************************************                                                                                                                            ************************
****************************************************                                                                                                                              **********************
****************************************************                                                                                                                           *************************
****************************************************                                                                                                                            ************************
****************************************************                                                                                                                            ************************
****************************************************                                                                                                                         ***************************
*****************************************************                                                                                                                        ***************************
*****************************************************                                                                                                                           ************************
****************************************************                                                                                                                         ***************************
*****************************************************                                                                                                                         **************************
*****************************************************                                                                                                                        ***************************
*****************************************************                                                                                                                      *****************************
*****************************************************                                                                                                                      *****************************
******************************************************                                                                                                                   *******************************
******************************************************                                                                                                                   *******************************
test finished.



Pokus3
Miesnost ....
****************************************************                                                                      ******************************************************************************
****************************************************                                                                     *******************************************************************************
****************************************************                                                                      ******************************************************************************
****************************************************                                                                      ******************************************************************************
****************************************************                                                                     *******************************************************************************
***************************************************                                                                      *******************************************************************************
****************************************************                                                                     *******************************************************************************
****************************************************                                                                     *******************************************************************************
***************************************************                                                                     ********************************************************************************
***************************************************                                                                     ********************************************************************************
****************************************************                                                                                 *******************************************************************
****************************************************                                                                                 *******************************************************************
***************************************************                                                                                 ********************************************************************
***************************************************                                                                                  *******************************************************************
***************************************************                                                                                  *******************************************************************
***************************************************                                                                                  *******************************************************************
**************************************************                                                                                   *******************************************************************
*************************************************                                                                                 **********************************************************************
*************************************************                                                                                 **********************************************************************
*************************************************                                                                                    *******************************************************************
*************************************************                                                                                  *********************************************************************
**************************************************                                                                                 *********************************************************************
*************************************************                                                                                   ********************************************************************
*************************************************                                                                                   ********************************************************************
*************************************************                                                                                  *********************************************************************
******************************************************************************                                       ***********************************************************************************
******************************************************************************                                       ***********************************************************************************
*******************************************************************************                                      ***********************************************************************************
*******************************************************************************                                      ***********************************************************************************
*******************************************************************************                                      ***********************************************************************************
*******************************************************************************                                       **********************************************************************************
*******************************************************************************                                       **********************************************************************************
********************************************************************************                                     ***********************************************************************************
*******************************************************************************                                      ***********************************************************************************
*******************************************************************************                                      ***********************************************************************************
*******************************************************************************                                      ***********************************************************************************
*******************************************************************************                                      ***********************************************************************************
*******************************************************************************                                      ***********************************************************************************
********************************************************************************                                       *********************************************************************************
********************************************************************************                                       *********************************************************************************
******************************************************************************                                         *********************************************************************************
******************************************************************************                                        **********************************************************************************
******************************************************************************                                        **********************************************************************************
****************************************************************                                                       *********************************************************************************
****************************************************************                                                       *********************************************************************************
***************************************************************                                                        *********************************************************************************
***************************************************************                                                         ********************************************************************************
***************************************************************                                                                                                       **********************************
***************************************************************                                                                                                      ***********************************
**************************************************************                                                                                                      ************************************
***************************************************************                                                                                                     ************************************
***************************************************************                                                                                                      ***********************************
***************************************************************                                                                                                      ***********************************
******************************************************************************                                                                                        **********************************
******************************************************************************                                                                                       ***********************************
******************************************************************************                                                                                       ***********************************
******************************************************************************                                                                                       ***********************************
******************************************************************************                                                                                       ***********************************
*****************************************************************************                                                                                        ***********************************
*****************************************************************************                                                                                       ************************************
*****************************************************************************                                                                                        ***********************************
***************************************************************************                                                                                        *************************************
***************************************************************************                                                                                          ***********************************
***************************************************************************                                                                                       **************************************
*************************************************************************                                                                                        ***************************************
*************************************************************************                                                                                        ***************************************
************************************************************************                                                                                       *****************************************
************************************************************************                                                                                      ******************************************
***********************************************************************                                                                                        *****************************************
*********************************************************************                                                                                        *******************************************
**********************************************************************                                                                                      ********************************************
*******************************************************************                                                                                         ********************************************
********************************************************************                                                                                         *******************************************
********************************************************************                                                                                        ********************************************
********************************************************************                                                                                        ********************************************
*****************************************************************                                                                                        ***********************************************
*****************************************************************                                                                                         **********************************************
*****************************************************************                                                                                       ************************************************
*****************************************************************                                                                                       ************************************************
****************************************************************                                                                                        ************************************************
**************************************************************                                                                                       ***************************************************
************************************************************                                                                                         ***************************************************
************************************************************                                                                                         ***************************************************
**********************************************************                                                                                           ***************************************************
**********************************************************                                                                                           ***************************************************
*********************************************************                                                                                           ****************************************************
*********************************************************                                                                                         ******************************************************
*********************************************************                                                                                        *******************************************************
*********************************************************                                                                                         ******************************************************
*********************************************************                                                                                         ******************************************************
*******************************************************                                                                                          *******************************************************
*******************************************************                                                                                          *******************************************************
*****************************************************                                                                                          *********************************************************
****************************************************                                                                                           *********************************************************
*****************************************************                                                                                          *********************************************************
**************************************************************************                                                             *****************************************************************
***************************************************************************                                                            *****************************************************************
*****************************************************************************                                                         ******************************************************************
*****************************************************************************                                                         ******************************************************************
******************************************************************************                                                      ********************************************************************
******************************************************************************                                                       *******************************************************************
*******************************************************************************                                                    *********************************************************************
*******************************************************************************                                                    *********************************************************************
*******************************************************************************                                                    *********************************************************************
*******************************************************************************                                                   **********************************************************************
*******************************************************************************                                                    *********************************************************************
********************************************************************************                                                                                      
********************************************************************************                                                                                  
*********************************************************************************                             ******************************************************************************************
**********************************************************************************                                                                                **************************************
**********************************************************************************                                                                                **************************************
**********************************************************************************                                                                                **************************************
**********************************************************************************                                                                                **************************************
***********************************************************************************                                                                                *************************************
***********************************************************************************                                                                                *************************************
************************************************************************************                                                                                 ***********************************
************************************************************************************                                                                                ************************************
*************************************************************************************                                                                                   ********************************
*************************************************************************************                                                                                   ********************************

Code

CODE HERE Media:tatrabot_room.zip Rest of the code can be found here: TatraBoot Tutorial

Photo documentation

Tatrabot map 1.jpg Tatrabot map 2.jpg

Tatrabot map 3.jpg Tatrabot map 4.jpg

Video documentation

Conclusion

TatraBot is perfect small bot for playground and testing new aprachosed. With many other accessories which are available we have been able to accomplish our goal.