Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MCL core class #428

Closed
wants to merge 1 commit into from
Closed

Add MCL core class #428

wants to merge 1 commit into from

Conversation

serraramiro1
Copy link
Contributor

Proposed changes

Addresses #424

Type of change

  • 🐛 Bugfix (change which fixes an issue)
  • 🚀 Feature (change which adds functionality)
  • 📚 Documentation (change which fixes or extends documentation)

Checklist

Put an x in the boxes that apply. This is simply a reminder of what we will require before merging your code.

  • Lint and unit tests (if any) pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • All commits have been signed for DCO

Signed-off-by: Ramiro Serra <[email protected]>
@serraramiro1 serraramiro1 added enhancement New feature or request cpp Related to C++ code labels Aug 16, 2024
Copy link
Collaborator

@hidmic hidmic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass

typename WeightT = beluga::Weight,
class ParticleType = std::tuple<typename SensorModel::state_type, WeightT>,
class ExecutionPolicy = std::execution::sequenced_policy>
class Mcl {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@serraramiro1 @nahueespinosa meta: could beluga::Amcl be based on beluga::Mcl?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember having a quick talk about using a CRTP base class for this. It seemed like there wasn't much to reuse, but looking at the code, there might be enough to justify a base class?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is substantial overlap, though I'm glancing over the details of how we would reuse the code.

class MotionModel,
class SensorModel,
typename WeightT = beluga::Weight,
class ParticleType = std::tuple<typename SensorModel::state_type, WeightT>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@serraramiro1 @nahueespinosa meta: moving forward, this looks unnecessarily restrictive. SensorModel could work with multiple state types. Same can be said about MotionModel.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a constraint though, users can choose to set the parameter explicitly if they need to. Are you proposing that these classes do not store the particle set? That would remove the need for this.

Copy link
Collaborator

@hidmic hidmic Aug 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we should couple the particle type and the models like this. Models could work with multiple types at the same time (e.g. through generic lambdas), so sparing the user from explicitly setting the particle state type on class instantiation seems more trouble than it's worth.

@nahueespinosa nahueespinosa deleted the ramiro/add-mcl-core branch October 27, 2024 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpp Related to C++ code enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants