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:
- Replace the GE LOGIQ a200 ultrasound measurement key with a self-made touch switch
- Controlling stepper motors with wireless remote control transceiver and PE-51 board
- Simple phase failure protection circuit composed of intermediate relay
- Light-controlled circuit design and analysis
- Homemade anti-theft watchdog
- Password type motorcycle anti-theft device
- Bicycle anti-theft alarm
- Preheating bath water tank water level controller
- Control two contactors with one wire
- A novel resonance demonstration device
- Rural fish farming control circuit
- Electronic rhythm control circuit
- Stapler control circuit
- sound control circuit
- PLC light source robot hand bubble control circuit
- 24h automatic switching capacitor control circuit
- Automatic sprinkler irrigation control circuit
- Electric heater temperature detection control circuit
- Voltage stabilization control circuit in power circuit
- 35W half-wave resistor-capacitor phase-shift trigger actuation control circuit