Motion models comprise the state transition probability
Kinematic is the calculus(微积分) describing the effect of control actions on the configuration of a robot.
The configuration of a rigid mobile robot is commonly described six variables, its three-dimensional Cartesian coordinates and its three Euler angles (roll, pitch, yaw) relative to an external coordinate frame.
In planar case, the kinematic state is summarized by three variables, referred to as pose. The pose comprises its two-dimensional planar coordinates relative to an external coordinate frame, along with its angular orientation(朝向). Denoting the two-dimensional planar coordinates as
pose without orientation will be called location $$ location = \begin{bmatrix} x\ y \end{bmatrix} $$
The model is the familiar conditional density
$$
p(x_t|u_t,x_{t-1})
$$
Here,
for example
the distribution
The first assumes that the motion data
In practice, odometry models tend to be more accurate than velocity models, for the simple reason that most commercial robots do not execute velocity commands with the level of accuracy that can be obtained by measuring the revolution of the robot's wheels.(电动机执行命令的精度无法超过里程计测量轮子转速的精度)
However, odometry is only available for getting information after executing a motion command. Hence it cannot be used for motion planning. Planning algorithms such as collision avoidance have to predict the effects of motion. Thus, odometry models are usually applied for estimation, whereas velocity models are used for probabilistic motion planning.
The velocity motion model assumes that we can control a robot through two velocities, translational velocity and rotational velocity. We denote the translational velocity at time t by
The velocity motion model accepts as input an initial pose
assuming that the initial pose is
so at time $(t-1,t]$ , the trajectory of the robot is a circle. the radius of the circle can be derived as follow
$$
v=\omega\cdot r\quad \rightarrow \quad r=\left|\frac{v}{\omega}\right|
$$
the center of the circle is at
$$
\begin{cases}
x_c = x-\frac{v}{\omega}\sin\theta\
y_c = y+\frac{v}{\omega}\cos\theta
\end{cases}
$$
according to the trigonometry, the resulting pose $x_t$ is
$$
\begin{bmatrix}
x'\y'\ \theta'
\end{bmatrix}
\begin{bmatrix} x_c+\frac{v}{\omega}\sin(\theta+\omega\Delta t)\ y_c-\frac{v}{\omega}\cos(\theta+\omega\Delta t)\ \theta+\omega\Delta t \end{bmatrix}
\begin{bmatrix}
x\y\ \theta
\end{bmatrix}
+
\begin{bmatrix}
-\frac{v}{\omega}\sin\theta+\frac{v}{\omega}\sin(\theta+\omega\Delta t)\
\frac{v}{\omega}\cos\theta-\frac{v}{\omega}\cos(\theta+\omega\Delta t)\
\omega\Delta t
\end{bmatrix}
$$
the derivation is based on the assumption that both the velocities keep the fixed value the time
In reality, robot motion is subject to noise. The actual velocities differ from the commanded ones. We model this noise by a zero-centered random variable with finite variance and assume the noise is additive. $$ \begin{bmatrix} \hat{v}\ \hat{\omega} \end{bmatrix}
\begin{bmatrix}
v\ \omega
\end{bmatrix}
+
\begin{bmatrix}
\varepsilon_{\alpha_1 v^2+\alpha_2\omega^2}\
\varepsilon_{\alpha_3 v^2+\alpha_4\omega^2}
\end{bmatrix}
$$
Here,
a better model of the actual pose $x_t=[x',y',\theta']^T$ after executing the motion command $u_t=[v,w]^T$ at $x_{t-1}=[x,y,\theta]^T$ is thus
$$
\begin{bmatrix}
x'\y'\ \theta'
\end{bmatrix}
\begin{bmatrix}
x\y\ \theta
\end{bmatrix}
+
\begin{bmatrix}
-\frac{\hat{v}}{\hat{\omega}}\sin\theta+\frac{\hat{v}}{\hat{\omega}}\sin(\theta+\hat{\omega}\Delta t)\
\frac{\hat{v}}{\hat{\omega}}\cos\theta-\frac{\hat{v}}{\hat{\omega}}\cos(\theta+\hat{\omega}\Delta t)\
\hat{\omega}\Delta t
\end{bmatrix}
$$
so, the three-dimension pose is relevant to two-dimension noise. the book said this degeneracy has important ramifications when applying Bayes filters for state estimation. therefore, to generalize the motion model accordingly, we will assume that the robot perform a rotation $\hat{\gamma}$ when it arrives at its final pose.
$$
\theta'=\theta+\hat{\omega}\Delta t+\hat{\gamma}\Delta t
$$
with
$$
\hat{\gamma}=\varepsilon_{\alpha_5v^2+\alpha_6\omega^2}
$$
Thus, the resulting motion model is as follows
$$
\begin{bmatrix}
x'\y'\ \theta'
\end{bmatrix}
\begin{bmatrix} x\y\ \theta \end{bmatrix} + \begin{bmatrix} -\frac{\hat{v}}{\hat{\omega}}\sin\theta+\frac{\hat{v}}{\hat{\omega}}\sin(\theta+\hat{\omega}\Delta t)\ \frac{\hat{v}}{\hat{\omega}}\cos\theta-\frac{\hat{v}}{\hat{\omega}}\cos(\theta+\hat{\omega}\Delta t)\ \hat{\omega}\Delta t+\hat{\gamma}\Delta t \end{bmatrix} $$
\begin{bmatrix} x\y\ \theta \end{bmatrix} + \begin{bmatrix} -\frac{\hat{v}}{\hat{\omega}}\sin\theta+\frac{\hat{v}}{\hat{\omega}}\sin(\theta+\hat{\omega}\Delta t)\ \frac{\hat{v}}{\hat{\omega}}\cos\theta-\frac{\hat{v}}{\hat{\omega}}\cos(\theta+\hat{\omega}\Delta t)\ \hat{\omega}\Delta t \end{bmatrix} $$
according to above equation, the resulting pose $x_t$ is relevant to $x,y,\theta,\Delta t,v,\omega \ldots$ . But most of them are determined. Only $\hat{v},\hat{\omega},\hat{\gamma}$ are random variables. and
$$
\begin{bmatrix}
\hat{v}\ \hat{\omega} \ \hat{\gamma}
\end{bmatrix}
\begin{bmatrix}
v\ \omega \ \gamma
\end{bmatrix}
+
\begin{bmatrix}
\varepsilon_{\alpha_1 v^2+\alpha_2\omega^2}\
\varepsilon_{\alpha_3 v^2+\alpha_4\omega^2}\
\varepsilon_{\alpha_5 v^2+\alpha_6\omega^2}\
\end{bmatrix}
$$
here,
the following is copied from book page 130
the robot travels with a fixed velocity during Δt, resulting in a circular trajectory. For a robot that moved from $x_{t−1} = (x,y,\theta)^T$ to $x_t = (x',y')^T$ , the center of the circle is defined as $(x^,y^)^T$ and given by
$$
\begin{bmatrix}
x^\ y^
\end{bmatrix}
\begin{bmatrix} x\ y \end{bmatrix} + \begin{bmatrix} -\lambda\sin\theta\ \lambda\cos\theta \end{bmatrix}
\begin{bmatrix}
\frac{x+x'}{2}+\mu(y-y')\
\frac{y+y'}{2}+\mu(x'-x)
\end{bmatrix}
$$
for some unknown
the equation has the solution $$ \mu=\frac{1}{2}\frac{(x-x')\cos\theta+(y-y')\sin\theta}{(y-y')\cos\theta-(x-x')\sin\theta} $$ The radius of the circle is now given by the Euclidean distance $$ r^* = \sqrt{(x-x^)^2+(y-y^)^2}=\sqrt{(x'-x)^2+(y'-y)^2} $$ Furthermore, we can now calculate the change of heading direction
$$
\Delta \theta=\atan2(y'-y^,x'-x^)-\atan2(y-y^,x-x^)
$$
Since we assume that the robot follows a circular trajectory, the translational distance between $x_t$ and $x_{t−1}$ along this circle is
$$
\Delta \mathrm{dist} = r^*\cdot \Delta \theta
$$
From $\Delta \mathrm{dist}$ and $\Delta\theta$ , it is now easy to compute the velocities $\hat{v}$ and $\hat{\omega}$
$$
\hat{u}_t = \begin{bmatrix}
\hat{v}\ \hat{\omega}
\end{bmatrix}
\Delta t^{-1}\begin{bmatrix}
\Delta \mathrm{dist}\
\Delta \theta
\end{bmatrix}
$$
The rotational velocity
Odometry is commonly obtained by integrating wheel encoder information. The odometry motion model uses odometry measurements in lieu of controls.
Technically, odometric information are sensor measurements, not controls. To model odometry as measurements, the resulting Bayes filter would have to include the actual velocity as state variables-which increases the dimension of the state space. To keep the state space small, it is therefore common to consider odometry data as if it were control signals. $$ u_t = \begin{bmatrix} \bar{x}{t-1}\ \bar{x}t \end{bmatrix} $$ while $$ \bar{x}{t-1} = \begin{bmatrix} \bar{x}\ \bar{y} \ \bar{\theta} \end{bmatrix} ,\bar{x}{t} = \begin{bmatrix} \bar{x}'\ \bar{y}' \ \bar{\theta}' \end{bmatrix} $$ here, the bar indicates that these are odometry measurements
The odometry model uses the relative motion information(相对运动信息). To extract relative odometry,
This algorithm accepts as an input an initial pose
we first calculate the difference between the two measurements
here
$$
\bar{x}{t-1} = \begin{bmatrix}
\bar{x}\ \bar{y} \ \bar{\theta}
\end{bmatrix}
,\bar{x}{t} = \begin{bmatrix}
\bar{x}'\ \bar{y}' \ \bar{\theta}'
\end{bmatrix}
$$
difference
$$
\begin{split}
\delta_{\mathrm{rot1}} &= \atan2(\bar{y}'-\bar{y},\bar{x}'-\bar{x})-\bar{\theta}\
\delta_{\mathrm{trans}} &= \sqrt{(\bar{x}-\bar{x}')^2+(\bar{y}-\bar{y}')^2}\
\delta_{\mathrm{rot2}} &= \bar{\theta}'-\bar{\theta}-\delta_{\mathrm{rot1}}
\end{split}
$$
we assume that the 'true' values of the rotation and translation are obtained from the measured one by subtracting independent noise
the true value
$$
\begin{split}
\hat{\delta}{\mathrm{rot1}} &= \delta{\mathrm{rot1}}-\varepsilon_{\alpha_1\delta^2_{\mathrm{rot1}}+\alpha_2\delta^2_{\mathrm{trans}}}\
\hat{\delta}{\mathrm{trans}} &= \delta{\mathrm{trans}}-\varepsilon_{\alpha_3\delta^2_{\mathrm{trans}}+\alpha_4\delta^2_{\mathrm{rot1}}+\alpha_4\delta^2_{\mathrm{rot2}}}\
\hat{\delta}{\mathrm{rot2}} &= \delta{\mathrm{rot2}}-\varepsilon_{\alpha_1\delta^2_{\mathrm{rot1}}+\alpha_2\delta^2_{\mathrm{trans}}}
\end{split}
$$
so, the true position $x_t$ is
$$
\begin{bmatrix}
x'\y'\ \theta'
\end{bmatrix}
\begin{bmatrix}
x\y\ \theta
\end{bmatrix}
+
\begin{bmatrix}
\hat{\delta}{\mathrm{trans}}\cos(\theta+\hat{\delta}{\mathrm{rot1}})\
\hat{\delta}{\mathrm{trans}}\sin(\theta+\hat{\delta}{\mathrm{rot1}})\
\hat{\delta}{\mathrm{rot1}}+\hat{\delta}{\mathrm{rot2}}
\end{bmatrix}
$$
Pay attention to distinguish that in odometry motion model, the true value is the real pose
so the true pose is relevant to the three noise factors $$ \begin{bmatrix} x'\y'\ \theta' \end{bmatrix} \quad \sim \quad \begin{bmatrix} \varepsilon_{\alpha_1\delta^2_{\mathrm{rot1}}+\alpha_2\delta^2_{\mathrm{trans}}}\ \varepsilon_{\alpha_3\delta^2_{\mathrm{trans}}+\alpha_4\delta^2_{\mathrm{rot1}}+\alpha_4\delta^2_{\mathrm{rot2}}}\ \varepsilon_{\alpha_1\delta^2_{\mathrm{rot1}}+\alpha_2\delta^2_{\mathrm{trans}}} \end{bmatrix} $$ and assume that any two of the noise are independent
so, the probability of pose
By considering
we take the map
we can approximate the map-based motion model into $$ p(x_t|u_t,x_{t-1},m) \approx \eta\frac{p(x_t|u_t,x_{t-1})p(x_t|m)}{p(x_t)} $$ the approximation has two condition
- approximate
$p(x_t|u_t,x_{t-1},m)$ by$p(x_t|m)$ -
$p(m)$ is a constant relative to the desired posterior
so the derivation is as follow: $$ \begin{split} p(x_t|u_t,x_{t-1},m) &= \eta \space p(m|x_t)p(x_t|u_t,x_{t-1})\ &= \eta \space \frac{p(x_t|m)p(m)}{p(x_t)}p(x_t|u_t,x_{t-1})\ &= \eta \space \frac{p(x_t|m)p(x_t|u_t,x_{t-1})}{p(x_t)}\ \end{split} $$ example
The density in Figure 5.11a is