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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scripts for beluga_tutorial visualizations #387

Merged
merged 6 commits into from
Jun 5, 2024

Conversation

Alondruck
Copy link
Collaborator

Proposed changes

Related to #305, split from #340.

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

@Alondruck Alondruck added the python Related to Python code label May 24, 2024
@Alondruck Alondruck self-assigned this May 24, 2024
@Alondruck
Copy link
Collaborator Author

@hidmic @nahueespinosa I don't have much experience with Python, but these two simple scripts represent what we wanted to show. One script automatically advances each time step or simulation cycle (tutorial_animation.py), while the other allows using keyboard arrows to run time backwards and forwards (tutorial.py). These scripts can surely be combined. If you have time, please try it out and share your feedback!

Copy link
Member

@nahueespinosa nahueespinosa left a comment

Choose a reason for hiding this comment

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

@Alondruck First pass! I haven't tried it yet, will do shortly.

beluga_tutorial/src/tutorial_animation.py Outdated Show resolved Hide resolved
beluga_tutorial/src/tutorial_animation.py Outdated Show resolved Hide resolved
beluga_tutorial/src/tutorial.py Outdated Show resolved Hide resolved
beluga_tutorial/src/tutorial_animation.py Outdated Show resolved Hide resolved
beluga_tutorial/src/visualization.py Outdated Show resolved Hide resolved
beluga_tutorial/src/visualization.py Outdated Show resolved Hide resolved
beluga_tutorial/src/visualization.py Outdated Show resolved Hide resolved
beluga_tutorial/src/visualization.py Outdated Show resolved Hide resolved
beluga_tutorial/src/visualization.py Outdated Show resolved Hide resolved
beluga_tutorial/src/visualization.py Outdated Show resolved Hide resolved
beluga_tutorial/src/visualization.py Outdated Show resolved Hide resolved
beluga_tutorial/src/visualization.py Outdated Show resolved Hide resolved
beluga_tutorial/scripts/visualize.py Outdated Show resolved Hide resolved
beluga_tutorial/scripts/visualize.py Outdated Show resolved Hide resolved
@Alondruck
Copy link
Collaborator Author

@nahueespinosa @hidmic The propagate and reweight stages actually represent the same graph, as both are histograms of the same distribution of the set of particles. Do we need to show the reweight stage in a different way, or is it sufficient for what we expect from the tutorial?

@nahueespinosa
Copy link
Member

nahueespinosa commented May 27, 2024

Do we need to show the reweight stage in a different way, or is it sufficient for what we expect from the tutorial?

If we opt for the histogram display, then I think it makes more sense to show only three stages: current, prediction (currently called propagation), and update (reweight + resample). This would match the description on the key concepts page about the two main stages in a particle filter algorithm: prediction and update.

Signed-off-by: Alon Druck <alon.druck@ekumenlabs.com>
Signed-off-by: Alon Druck <alon.druck@ekumenlabs.com>
Signed-off-by: Alon Druck <alon.druck@ekumenlabs.com>
Signed-off-by: Alon Druck <alon.druck@ekumenlabs.com>
@Alondruck Alondruck force-pushed the alon/mcl_tutorial_visualization branch from 05434d0 to 0f66aea Compare May 29, 2024 19:09
Signed-off-by: Alon Druck <alon.druck@ekumenlabs.com>
Signed-off-by: Alon Druck <alon.druck@ekumenlabs.com>
Copy link
Member

@nahueespinosa nahueespinosa left a comment

Choose a reason for hiding this comment

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

LGTM

@nahueespinosa nahueespinosa merged commit 966c4e9 into main Jun 5, 2024
15 checks passed
@nahueespinosa nahueespinosa deleted the alon/mcl_tutorial_visualization branch June 5, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Related to Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants