Move Tatrabot 2D mapping - Johanna, Romana, Nicole, Oswaldo, Dušan, Viktor

From RoboWiki
Revision as of 14:02, 28 June 2018 by Robot (talk | contribs)
Jump to: navigation, search

The project's aim was to let the Tatrabot successfully reach a given target position in a grid environment using A* search algorithm. This is realized by creating an internal two-dimensional-map representing the robot's current position in the environment and its knowledge about probable locations of obstacles, gained from taking ultrasonic measurements during movement. To account for inaccurate movements Tatrabot uses its LED-sensors to perceive and follow the grid's lines.


Movement and Navigation

(Nicole) UTF-8 characters


Rotation Sensors

Robot is capable of performing 3 distinct moves. After each move the position in map is being updated.

Forward

First we force robot to move past line it stands in front of. Then robot starts moving forward tracking the line. If it changed heading (because of any reasons), it corrects it’s heading. If robot turns left, left motor moves while right stops. If it turns right, left motor stops while right corrects heading. If sensor on far right sees the line, it means we traveled far enough (to next perpendicular line), so we set both motors to reverse to get before line again and cycle can repeat.

Right

At first, left motor makes 90 degree turn (to right). Then both motors reverse and after that robot uses forward method to find line and stop in front of it.

Left

Robot moves forward past the line and starts backing with left motor only. Then it moves in a reverse for some more fixed distance and looks for a line with forward method again.

All of these moves move robot to the same position, slightly to the right of the line just in front of next line perpendicular to direction of robot. Therefore these moves can be chained indefinitely.


Ultrasonic Measurement System

Our robot is equiped with 3 HCSRO4P ultrasonic sensors. Their general directions are:

  • Front
  • Left
  • Right

Sensors are being run in endless loop measuring distances in all 3 directions working through 18 states. There are 6 states for each sensor direction.

  • 1 sets value 1 on pin GPIOB13
  • 2 clears GPIO13 pid
  • 3 waits for value on GPIO12, starting bit
  • 4 waits until sensor stops transmitting on GPIO12, which signals that measuring stopped. If transmission doesnt stop until 870ms, waiting stops and default value is used.
  • 5 is used as a state signaling that this sensor is already measured and other sensors can be used.
  • 6 means that measuring failed, response wasn’t recieved

States 1-6 work with sensor 1, while states 7-12 are used for sensor 2 and 13-18 for sensor 3.

HCSR04P module

This module is the second generation of HC-SR04 Ultrasonic Sensor. Unlike the first generation HC-SR04 that can only operate between 4.8V 5V DC, this new version has wider input voltage range, allow it to work with controller operates on 3.3V. It measures distance using sonar, an ultrasonic (well above human hearing) pulse (40KHz) is transmitted from the unit and distance-to-target is determined by measuring the time required for the echo return.

Viktor2.jpg

Features

  • HC-SR04P Upgrade version with build-in crystal, more reliable, lower working current.
  • Power Supply: 3.3 5 VDC
  • Quiescent Current : <2mA
  • Working Current: 2.8mA @ 5V
  • Effective Angle: <15 degrees
  • Ranging Distance : 2 to 400 cm
  • Connector: 4-pins header with 2.54mm pitch.
  • Dimension: 45mm x 20mm x 15mm
  • Weight 8.5g


Ultrasonic sensor model

(Matej)


Implementation of A* Algorithm

(Oswaldo)


STM32 platform

STM32 is a family of 32-bit microcontroller integrated circuits by STMicroelectronics. The STM32 chips are grouped into related series that are based around the same 32-bit ARM processor core, such as the Cortex-M7F, Cortex-M4F, Cortex-M3, Cortex-M0+, or Cortex-M0. Internally, each microcontroller consists of the processor core, static RAM memory, flash memory, debugging interface, and various peripherals.


Visual Studio

(Romana)