Home > Control Circuits >Other Control Circuitss > How can we make the robot move precisely on a predefined path?

How can we make the robot move precisely on a predefined path?

Source: InternetPublisher:武林萌主 Keywords: Robot Arduino Updated: 2024/12/17

The project aims to allow a robot to move precisely on a pre-defined path, without using GPS or WiFi or Bluetooth for positioning, or even maps or building layout planning. And plot its actual path in real time (to scale). Bluetooth can replace wires to transmit real-time location information.

background

We have been looking for a robust solution for indoor navigation of our Arduino based robot. When choosing the right motion sensing solution for this application, we considered Oblu, an open source IMU. Its low cost and open source nature made it a likely candidate. The tricky part here is that oblu’s open source program is suitable for foot mounted indoor pedestrian dead reckoning (PDR) or pedestrian navigation, in short. Oblu’s PDR performance indoors is impressive for a foot mounted IMU. A big plus is the real-time position tracking by the free Android app (Xblu). However, we were not sure how to utilize its existing algorithm for pedestrian navigation based on human walking model.

Oblu's internal calculations are based on human walking. Oblu gives the displacement and heading change between two consecutive steps. When the foot is in contact with the ground, the velocity of the sole is zero, i.e. the sole is at rest. This way, Oblu can detect "steps" and correct some internal errors. This frequent error correction leads to excellent tracking performance. So our robot walks in the same way - move, stop, move, stop.

We chose Oblu and soon we were assembling our robot and tracking system.

How it works:

The robot moves in a pre-programmed path and transmits information about its actual movement (via Bluetooth) to a phone for real-time tracking.

Arduino is pre-programmed with a path and oblu is used to sense the robot's movement. Oblu transmits movement information to Arduino at regular intervals. Based on this, Arduino controls the movement of the wheels to make the robot follow the pre-defined path.

The robot's path is programmed as a set of straight line segments. Each segment is defined by its length and its direction relative to the previous one. The robot's movement is kept discreet, i.e. it moves in a straight line, but in smaller parts (for simplicity we call them "steps"). At the end of each step, the oblu transmits the step length and the degree of deviation (change in direction) from the straight line to the Arduino. If the Arduino finds a deviation from the predefined straight line, the Arduino corrects the robot's alignment at each step it receives such information.

The robot is always programmed to move in a straight line. However, due to non-idealities such as uneven surfaces, unbalanced mass of the robot assembly, structural or electrical imbalance of the DC motors, or random orientation of the front free-running wheels, it may deviate from the straight line and may walk at an angle or tilted path.

Take a step → Correct your direction → Move forward

The robot will also move backwards if it travels beyond the programmed length of that particular line segment.

The next step size depends on the remaining distance to be covered for that particular straight segment. The robot takes larger steps when the distance to be traveled is larger, and smaller steps when it is closer to the destination (i.e. the end of each straight segment).

The IMUOblu transmits data to both the Arduino and the phone (via Bluetooth). Xblu (the Android app) performs some simple calculations based on the motion information received from the robot to build a path for real-time tracking on the phone. Building a path using Xblu looks like this:

In summary, the Obl senses motion and communicates motion information to the Arduino and the phone at regular intervals. Based on the programmed path and motion information (sent by the oblu), the Arduino controls the movement of the wheels. The robot's movement is not remotely controlled, except for the start/stop commands.

Path Modeling:

The robot will probably be easiest to control if it only walks on straight segments. Therefore, the path must first be modeled as a set of straight segments. The picture below contains several example paths and their representation in terms of displacement and direction. This is how paths are programmed in Arduino.

Likewise, any path that is a set of straight line segments can be defined and programmed in Arduino.

Communication protocol:

Step 1: Xoblu sends a START command to oblu

Step 2: oblu acknowledges receipt of the command by sending an appropriate ACK to Xblu

Step 3: oblu sends a DATA packet containing displacement and direction information for each stride to Xoblu at each step. (step = whenever zero motion is detected or when stillness is detected).

Step 4: Xblu acknowledges receipt of the last DATA packet by sending an appropriate ACK to oblu. (The loop of steps 3 and 4 repeats until Xblu sends STOP. Upon receiving the STOP command, oblu executes step 5)

Step 5: Stop - (i) Stop processing in oblu (ii) Stop all output in oblu

Connection diagram:

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号