Mobile Robot Control 2024 Ultron:Solution 4: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
Tag: 2017 source edit
Line 20: Line 20:
'''4.Both the ParticleFilterBase and Particle classes implement a propagation method. What is the difference between the''' '''methods?'''
'''4.Both the ParticleFilterBase and Particle classes implement a propagation method. What is the difference between the''' '''methods?'''


The <code>propagateSamples</code> method in the <code>ParticleFilterBase</code> class propagates all particles, typically called in the main loop of the particle filter to update the state of all particles. In contrast, the <code>propagateSample</code> method in the <code>Particle</code> class propagates a single particle, usually invoked by the <code>propagateSamples</code> method in <code>ParticleFilterBase</code>, to update the state of a specific particle.
*The <code>propagateSamples</code> method in the <code>ParticleFilterBase</code> class propagates all particles, typically called in the main loop of the particle filter to update the state of all particles. In contrast, the <code>propagateSample</code> method in the <code>Particle</code> class propagates a single particle, usually invoked by the <code>propagateSamples</code> method in <code>ParticleFilterBase</code>, to update the state of a specific particle.
 
=== 1. Assignments for the first week ===
=== 1. Assignments for the first week ===



Revision as of 22:44, 4 June 2024

0. Assignment introduction

0.1 Explore the code framework

1.How is the code is structured?

2.What is the difference between the ParticleFilter and ParticleFilterBase classes, and how are they related to each other?

  • Differences:
    • ParticleFilterBase provides the basic functionalities and interfaces of the particle filter, including particle initialization, propagation, weight computation, and setting resampling strategies.
    • ParticleFilter inherits from ParticleFilterBase and implements specific update and resampling strategies. It extends the base class by providing concrete implementations for the update and configureResampler methods.
  • Relationship:
    • ParticleFilter is a subclass of ParticleFilterBase, inheriting all its attributes and methods while overriding or extending some of them to provide additional functionalities.

3.How are the ParticleFilter and Particle class related to eachother?

  • The ParticleFilter class manages multiple Particle instances, each representing a possible system state. It initializes these particles and updates their states and weights using methods like propagateSample and computeLikelihood. The ParticleFilter also includes a Resampler to handle resampling based on particle weights. Methods such as getPosition and getWeight from the Particle class are used by the ParticleFilter during updates and resampling. Essentially, the ParticleFilter executes the particle filter algorithm by managing and updating these Particle instances.

4.Both the ParticleFilterBase and Particle classes implement a propagation method. What is the difference between the methods?

  • The propagateSamples method in the ParticleFilterBase class propagates all particles, typically called in the main loop of the particle filter to update the state of all particles. In contrast, the propagateSample method in the Particle class propagates a single particle, usually invoked by the propagateSamples method in ParticleFilterBase, to update the state of a specific particle.

1. Assignments for the first week

1.1 Initialize the Particle Filter

1.2 Calculate the pose estimate

1.3 Propagate the particles with odometry

2. Assignment for the second week

2.1 Correct the particles with LiDAR

2.2 Re-sample the particles

2.3 Test on the physical setup