Autonomous navigation vehicle algorithms: Difference between revisions

From wikiluntti
 
(34 intermediate revisions by the same user not shown)
Line 40: Line 40:
== Reactive Methods ==
== Reactive Methods ==


=== Follow the Gap A (naive method) ===
=== Follow the Gap ===


[[File:F1tenth followthegapA.svg|thumb|Follow the gap ]]
[[File:F1tenth followthegapA.svg|thumb|Follow the gap ]]
Line 69: Line 69:


=== Bug algorithms ===
=== Bug algorithms ===
Original bug algorithm published around 1986.
Assume local knowledge of the environment and a global goal.
'''TangentBug'''
* Distance <math>\rho(x, \theta)</math> function, <math>x\in\mathbb R^2</math> and <math>\theta\in[0,2\pi]</math>.
Saturated distance function for range <math>R</math>
<math>
\rho_R(x, \theta)
=
\begin{cases}
\rho(x,\theta), \text{ if } \rho(x,\theta)<R\\
\infty, \text{ otherwise}
\end{cases}
</math>
Problems
* Requires knowledge about the distance to the goal; beacon setup or similar
*
References
* https://www.cs.cmu.edu/~motionplanning/lecture/Chap2-Bug-Alg_howie.pdf
* https://cs.gmu.edu/~plaku/teaching/LecRoboBugAlgorithms.pdf
=== Artificial Potential Fields ===
Gradient descent
<math>
\begin{matrix}
\text{If } &\nabla U(q_i) \neq 0: \\
&q_{i+1} = q_i - \alpha_i \nabla U(q_i)
\end{matrix}
</math>
Problems
* Local minima
References
* https://www.cs.cmu.edu/~motionplanning/lecture/Chap4-Potential-Field_howie.pdf
* https://www.coursera.org/learn/robotics-motion-planning
=== Brushfire algorithm ===


== Mapping and localization ==
== Mapping and localization ==


SLAM
https://f1tenth-coursekit.readthedocs.io/en/latest/lectures/ModuleC/lecture07.html
=== Filtering (Bayesian) ===
Simulator repo https://github.com/f1tenth/f110_ros/tree/master/f110_simulator
<youtube>kQi5IGzvr0c</youtube>
# State estimation
# Probability and Bayes rule
# Recursive Bayes filter
# Variants of Bayes filter:
# Tuning particles
''1 State estimation''.
Motor u, output y. System matrix A, Output matrix C, input matrix B.
<math>
\begin{align}
\dot x &= Ax + Bu \\
y &= Cx
\end{align}
</math>
Dead reckoning: the current state using previous state and estimates of varibales (speed, heading, time etc). Noise; the approximate distribution of the position.
Observation: correction.
''2 Probability and Bayes rule''.
Conditional probability <math>P(B|A)</math> the chance of B when A has already happened.
<math>P(B|A) = \frac{P(A|B) P(B)}{P(A)}</math>.
''3  Recursive Bayes filter''. Hidden Markov Model. Action model <math>p(x_t| u_t, x_{t-1})</math>, sensor model <math>p(o_t| x_t) </math>.
Step 1. Prediction with the control input (like in dead reckoning)
<math>
\begin{align}
bel(x_t) &= P(x_t| o_{1:t-1}, u_{1:t}) \\
&= \int P(x_t | x_{t-1}, o_{1:t-1}, u_{1:t} bel(x_{t-1} ) d(x_{t-1})
\end{align}
</math>
Step 2. Correction with the observation (Bayes)
\begin{align}
bel_{posterior}(x_t) = \dots
\end{align}
</math>
=== Localization: Particle Filter ===
=== Introduction to Graph-based SLAM ===
=== Scan Matching I & II ===


== Planning ==
== Planning ==
Line 91: Line 194:
* Harmonic potential field path planning for high speed vehicles https://folk.ntnu.no/skoge/prost/proceedings/acc08/data/papers/0383.pdf
* Harmonic potential field path planning for high speed vehicles https://folk.ntnu.no/skoge/prost/proceedings/acc08/data/papers/0383.pdf
* Robotic Motion Planning: Potential Functions https://www.cs.cmu.edu/~motionplanning/lecture/Chap4-Potential-Field_howie.pdf
* Robotic Motion Planning: Potential Functions https://www.cs.cmu.edu/~motionplanning/lecture/Chap4-Potential-Field_howie.pdf
* https://fab.cba.mit.edu/classes/865.21/topics/path_planning/robotic.html
* https://web.ics.purdue.edu/~rvoyles/Classes/ROSprogramming/Lectures/PathPlanning.pdf

Latest revision as of 18:59, 6 August 2025

Introduction

A great resource is F1Tenth, https://f1tenth.org/

See also https://mushr.io/tutorials/tuning/ and https://racecar.mit.edu/platform

Safety Concerns

  • Real-life problems
  • Sensors
  • Failure modes


Automatic breaking AEB

Automatic emergency breaking AEB

  • Detect objects
  • Find range, velocity, heading
  • Determine critical objects. Time to collision TTC.
  • False positive: Nobody will buy a system with these
  • False negative: kills innocent people

Stop the vehicle before colliding.

Sensors

  • Camera
    • Structured light 3d scanner camera
    • Stereo camera
    • Monocular camera
  • Radar
  • Ultrasonic
  • Lidar
    • Planar lidar (Hokuyo 30LX)
    • 3d lidar
    • solid state lidar (Velodyne velarray)
  • Odometry

Reactive Methods

Follow the Gap

Follow the gap

Furthest distance?

  • Misreading
  • Too small gap

Gap: Series of at least consecutive hits that pass some distance threshold .

  • Works good for holonomic robots. Also good if only sparse obstacles.
  • No car's dimensions, no safety.
  • What is the threshold radius ?

Avoid the nearest obstacle every timestep.

  1. Find the nearest point: add a safety bubble with radius around it.
  2. Set all distance points inside the safety bubble to zero (0).
  3. Find the max gaps of consecutive nonzeros
  4. Choose the best max gap of all. Naive: The furthest max-gap.

Consider changing the speed.


References

Bug algorithms

Original bug algorithm published around 1986.

Assume local knowledge of the environment and a global goal.

TangentBug

  • Distance function, and .

Saturated distance function for range

Problems

  • Requires knowledge about the distance to the goal; beacon setup or similar

References


Artificial Potential Fields

Gradient descent

Problems

  • Local minima


References

Brushfire algorithm

Mapping and localization

SLAM

https://f1tenth-coursekit.readthedocs.io/en/latest/lectures/ModuleC/lecture07.html

Filtering (Bayesian)

Simulator repo https://github.com/f1tenth/f110_ros/tree/master/f110_simulator

  1. State estimation
  2. Probability and Bayes rule
  3. Recursive Bayes filter
  4. Variants of Bayes filter:
  5. Tuning particles

1 State estimation. Motor u, output y. System matrix A, Output matrix C, input matrix B.

Dead reckoning: the current state using previous state and estimates of varibales (speed, heading, time etc). Noise; the approximate distribution of the position.

Observation: correction.

2 Probability and Bayes rule. Conditional probability the chance of B when A has already happened. .


3 Recursive Bayes filter. Hidden Markov Model. Action model , sensor model .

Step 1. Prediction with the control input (like in dead reckoning)

Step 2. Correction with the observation (Bayes) \begin{align} bel_{posterior}(x_t) = \dots \end{align} </math>

Localization: Particle Filter

Introduction to Graph-based SLAM

Scan Matching I & II

Planning

Vision

More

Labs from F1tenth

  1. Wall following https://f1tenth-coursekit.readthedocs.io/en/latest/assignments/labs/lab3.html#doc-lab3

More references