bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
ekf_slam Namespace Reference

Classes

struct  Run
class  EKFSlam
 Simultaneous localisation and mapping with an extended Kalman filter: a robot works out where it is and where the landmarks around it are, at the same time, from odometry and range-and-bearing sightings of the landmarks. More...
class  BoxWorld
 A rectangular slice of the plane with axis-aligned box obstacles, a start and a goal. More...

Typedefs

using Point = std::array<real_t, 2>
using Pose = EKFSlam::Pose
using real_t
 real_t
using uint_t
 uint_t

Functions

std::vector< EKFSlam::Observation > sight (const BoxWorld &world, const Pose &pose, const EKFSlam::Parameters &p, std::mt19937 &rng)
Run simulate ()
real_t error (const Pose &a, const Pose &b)
void draw (const BoxWorld &world, const Run &run)
void run ()
real_t wrap_angle (real_t angle)
 The angle [rad] wrapped to \((-\pi, \pi]\), so that angles that differ by whole turns compare equal.

Variables

const real_t DT = 0.1
const real_t SPEED = 0.3
const real_t MAX_TURN = 1.5
const real_t SENSOR_RANGE = 2.5
const uint_t SIGHT_EVERY = 5
const std::vector< Point > POSTS
const std::vector< Point > ROUTE

Typedef Documentation

◆ Point

using ekf_slam::Point = std::array<real_t, 2>

◆ Pose

◆ real_t

◆ uint_t

Function Documentation

◆ draw()

void ekf_slam::draw ( const BoxWorld & world,
const Run & run )

◆ error()

real_t ekf_slam::error ( const Pose & a,
const Pose & b )

◆ run()

void ekf_slam::run ( )

◆ sight()

std::vector< EKFSlam::Observation > ekf_slam::sight ( const BoxWorld & world,
const Pose & pose,
const EKFSlam::Parameters & p,
std::mt19937 & rng )

◆ simulate()

Run ekf_slam::simulate ( )

◆ wrap_angle()

The angle [rad] wrapped to \((-\pi, \pi]\), so that angles that differ by whole turns compare equal.

Variable Documentation

◆ DT

const real_t ekf_slam::DT = 0.1

◆ MAX_TURN

const real_t ekf_slam::MAX_TURN = 1.5

◆ POSTS

const std::vector<Point> ekf_slam::POSTS
Initial value:
{{1.0, 0.25}, {2.75, 0.25}, {0.25, 2.5}, {1.25, 2.5}, {2.25, 1.0},
{2.25, 4.0}, {1.0, 4.75}, {3.25, 4.5}, {3.25, 1.5}, {3.95, 1.5},
{4.75, 0.25}, {6.75, 1.75}, {5.25, 3.5}, {7.75, 2.5}, {6.25, 4.75},
{7.25, 0.4}, {4.25, 4.5}}

◆ ROUTE

const std::vector<Point> ekf_slam::ROUTE
Initial value:
{{2.8, 0.6}, {2.8, 3.4}, {4.5, 3.4}, {4.5, 0.8}, {7.3, 0.8},
{7.3, 4.7}, {4.5, 4.7}, {4.5, 3.4}, {2.8, 3.4}, {2.4, 4.5},
{0.8, 4.5}, {0.8, 0.8}, {0.5, 0.5}}

◆ SENSOR_RANGE

const real_t ekf_slam::SENSOR_RANGE = 2.5

◆ SIGHT_EVERY

const uint_t ekf_slam::SIGHT_EVERY = 5

◆ SPEED

const real_t ekf_slam::SPEED = 0.3