Lab 5 - Implementing Motion Models

Velocity Motion Models

  1. Implements the two sample distributions:

    • sample_normal_distribution

    • sample_triangle_distribution

  2. Implement the sample_motion_model_velocity.

  3. Implement a function that generate multiple samples.

  4. Now you will test these functions to reproduce the examples in topic 8. You will generate 500 samples for each figure.

The initial state and the control vector and the different error parameters vectors for each figure:

x = np.array([0,0,0])
u = np.array([1, 5*np.pi/180])
dt = 20

#  Figure a
alpha = np.array([4, 4, 2, 2, 0.1, 0.1]) * 1e-4

#  Figure b
alpha = np.array([50, 50, 0.1, 0.1, 0.1, 0.1]) * 1e-4

#  Figure c
alpha = np.array([1, 1, 8, 8, 0.1, 0.1]) * 1e-4
  1. Plot the results for each figure using scatter from matplotlib.

Odometry Motion Models

  1. Implements the two sample distributions:

    • sample_normal_distribution

    • sample_triangle_distribution

  2. Implement the sample_motion_model_odometry.

  3. Implement a function that generate multiple samples.

  4. Now you will test these functions to reproduce the examples in topic 8. You will generate 500 samples for each figure.

The initial state and the control vector and the different error parameters vectors for each figure:

x = np.array([0, 0, -20*np.pi/180])
u = np.array([[0, 0, 0], [12, 14, 80*np.pi/180]])

#  Figure a
alpha = np.array([0.5, 0.5, 10, 1]) * 1e-4

#  Figure b
alpha = np.array([0.05, 0.05, 100, 10]) * 1e-4

#  Figure c
alpha = np.array([1, 1, 8, 8, 0.1, 0.1]) * 1e-4
  1. Plot the results for each figure using scatter from matplotlib.