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

From Control Systems Technology Group
Jump to navigation Jump to search
No edit summary
Line 23: Line 23:
* The <code>ParticleFilter</code> class manages and operates on these particles, including initializing, propagating, and resampling them.
* The <code>ParticleFilter</code> class manages and operates on these particles, including initializing, propagating, and resampling them.
* Each <code>Particle</code> instance represents an individual particle, containing pose information and relevant methods for its manipulation.
* Each <code>Particle</code> instance represents an individual particle, containing pose information and relevant methods for its manipulation.


'''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?'''
* In <code>ParticleFilterBase</code>, the propagation method is <code>propagateSamples(Pose dPose)</code>, which propagates the poses of all particles based on odometry information and random noise.
* In <code>ParticleFilterBase</code>, the propagation method is <code>propagateSamples(Pose dPose)</code>, which propagates the poses of all particles based on odometry information and random noise.
* In the <code>Particle</code> class, the propagation method is <code>propagateSample(const Pose &dPose, const double proc_noise[2], const double offset_angle)</code>, which propagates the pose of a single particle based on the given displacement and noise.
* In the <code>Particle</code> class, the propagation method is <code>propagateSample(const Pose &dPose, const double proc_noise[2], const double offset_angle)</code>, which propagates the pose of a single particle based on the given displacement and noise.

Revision as of 13:42, 3 June 2024

0. Assignment introduction

0.1 Explore the code framework

1.How is the code is structured?

  • The ParticleFilter class inherits from the ParticleFilterBase class.
  • ParticleFilterBase contains the foundational implementation and common functionalities for the particle filter, such as particle initialization, propagation, weight computation, and resampling strategies.
  • ParticleFilter extends ParticleFilterBase by adding specific update and resampling strategies.

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 uses a ParticleList member variable _particles to store all the particles, where ParticleList is defined as std::vector<Particle>.
  • The ParticleFilter class manages and operates on these particles, including initializing, propagating, and resampling them.
  • Each Particle instance represents an individual particle, containing pose information and relevant methods for its manipulation.

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

  • In ParticleFilterBase, the propagation method is propagateSamples(Pose dPose), which propagates the poses of all particles based on odometry information and random noise.
  • In the Particle class, the propagation method is propagateSample(const Pose &dPose, const double proc_noise[2], const double offset_angle), which propagates the pose of a single particle based on the given displacement and noise.
  • Differences:
    • The propagation method in ParticleFilterBase is designed to handle the propagation of all particles, while the method in the Particle class deals with the propagation of an individual particle.
    • The ParticleFilterBase propagation method typically calls the Particle propagation method to update each particle's pose.

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