Skip to content

Comments

Bmm ros pkg#1

Merged
IasonTheodorou merged 26 commits intomasterfrom
bmm_ros_pkg
Sep 23, 2025
Merged

Bmm ros pkg#1
IasonTheodorou merged 26 commits intomasterfrom
bmm_ros_pkg

Conversation

@IasonTheodorou
Copy link
Member

@IasonTheodorou IasonTheodorou commented Sep 9, 2025

variational gmm is not used in the code (its an even more advanced implementation for future use (if needed)). So its not fully done.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new ROS package called "bmm_ros" that implements Bayesian Mixture Models for point cloud denoising. The package provides two different Bayesian approaches: MAP-GMM (Maximum A Posteriori Gaussian Mixture Model) and VB-GMM (Variational Bayes Gaussian Mixture Model) for clustering and outlier detection in 3D point cloud data.

  • Implements both MAP-GMM and VB-GMM algorithms for point cloud clustering
  • Provides comprehensive test suite with parameterized tests for quality metrics
  • Includes synthetic data generation for validation and testing

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
package.xml Defines ROS package metadata and dependencies
CMakeLists.txt Configures build system for library and executable targets
include/bayesian_gmm.h Header for MAP-GMM implementation with priors
include/variational_gmm.h Header for VB-GMM implementation
src/bayesian_gmm.cpp Core MAP-GMM algorithm implementation
src/variational_gmm.cpp Core VB-GMM algorithm implementation
src/main.cpp Example application with synthetic data and evaluation
test/bmm_test.cpp Comprehensive test suite for both algorithms
LICENSE Custom license for commercial usage restrictions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

for (int k = 0; k < K_; k++) {
int idx = rand() % N;
means_[k] = data.row(idx).transpose();
covs_[k] = Eigen::Matrix3d::Identity() * 0.01; // Small initial cov NEED TO PUT THIS ON THE PARAMETERS AS WELL
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

The TODO comment 'NEED TO PUT THIS ON THE PARAMETERS AS WELL' should be addressed or removed. Consider adding a parameter for initial covariance scaling to the GMMParams struct.

Suggested change
covs_[k] = Eigen::Matrix3d::Identity() * 0.01; // Small initial cov NEED TO PUT THIS ON THE PARAMETERS AS WELL
covs_[k] = Eigen::Matrix3d::Identity() * params_.initial_covar_scale; // Small initial cov

Copilot uses AI. Check for mistakes.
Comment on lines +226 to +227
// Add other terms for complete lower bound...
// (Gaussian-Wishart terms omitted for brevity but should be included)
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

The lower bound computation is incomplete as indicated by the comment. For a production VB-GMM implementation, the Gaussian-Wishart terms should be included for correct convergence monitoring.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

@IasonTheodorou please take a look

LICENSE Outdated
Comment on lines 11 to 18
If you wish to use the Software for commercial purposes, you must contact the original developer at [https://www.linkedin.com/in/hamdi-boukamcha/] to obtain a commercial license.
The terms of any commercial license will be mutually agreed upon and may involve a licensing fee.
4. Attribution

Regardless of whether you are using the Software for commercial or non-commercial purposes, you must provide appropriate credit to the original developer in any distributions or products that use the Software.
5. Disclaimer of Warranty

The Software is provided "as is," without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the original developer be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Software or the use or other dealings in the Software.
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

The license references a different developer (Hamdi Boukamcha) than the package maintainer (Iason Theodorou) listed in package.xml. This inconsistency should be resolved.

Suggested change
If you wish to use the Software for commercial purposes, you must contact the original developer at [https://www.linkedin.com/in/hamdi-boukamcha/] to obtain a commercial license.
The terms of any commercial license will be mutually agreed upon and may involve a licensing fee.
4. Attribution
Regardless of whether you are using the Software for commercial or non-commercial purposes, you must provide appropriate credit to the original developer in any distributions or products that use the Software.
5. Disclaimer of Warranty
The Software is provided "as is," without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the original developer be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Software or the use or other dealings in the Software.
If you wish to use the Software for commercial purposes, you must contact the original developer, Iason Theodorou, at [INSERT CONTACT INFO HERE] to obtain a commercial license.
The terms of any commercial license will be mutually agreed upon and may involve a licensing fee.
4. Attribution
Regardless of whether you are using the Software for commercial or non-commercial purposes, you must provide appropriate credit to the original developer, Iason Theodorou, in any distributions or products that use the Software.
5. Disclaimer of Warranty
The Software is provided "as is," without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the original developer, Iason Theodorou, be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Software or the use or other dealings in the Software.

Copilot uses AI. Check for mistakes.
CMakeLists.txt Outdated
Comment on lines 6 to 7
#add_compile_options(-Wall -Werror=all)
#add_compile_options(-Wextra -Werror=extra)
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider enabling these warning flags to improve code quality and catch potential issues during compilation.

Suggested change
#add_compile_options(-Wall -Werror=all)
#add_compile_options(-Wextra -Werror=extra)
add_compile_options(-Wall -Werror=all)
add_compile_options(-Wextra -Werror=extra)

Copilot uses AI. Check for mistakes.
Copy link
Member

@MatthijsBurgh MatthijsBurgh left a comment

Choose a reason for hiding this comment

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

Fix missing new lines at EOF. License needs to be in name of the TU.

I didn't check the rest yet.

Copy link
Member

@MatthijsBurgh MatthijsBurgh left a comment

Choose a reason for hiding this comment

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

Update to use hpp header extension. Make sure to add TUe CI.

@IasonTheodorou
Copy link
Member Author

Update to use hpp header extension. Make sure to add TUe CI.

I will do the .hpp change but why ?

Copy link
Member

@MatthijsBurgh MatthijsBurgh left a comment

Choose a reason for hiding this comment

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

Fix missing newline at EOF. To prevent the issue in the future, probably you need to change a setting in your IDE.

@MatthijsBurgh
Copy link
Member

I will do the .hpp change but why ?

Is the newer standard.

Copy link
Member

@MatthijsBurgh MatthijsBurgh left a comment

Choose a reason for hiding this comment

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

Make sure to place curly brackets on their own line

* Initial plan

* Fix curly bracket formatting in all C++ files

Co-authored-by: MatthijsBurgh <18014833+MatthijsBurgh@users.noreply.github.com>

* Clean up build artifacts and update .gitignore

Co-authored-by: MatthijsBurgh <18014833+MatthijsBurgh@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MatthijsBurgh <18014833+MatthijsBurgh@users.noreply.github.com>
Copy link
Member Author

@IasonTheodorou IasonTheodorou left a comment

Choose a reason for hiding this comment

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

its good

Added notes on future updates and review comments regarding variational Bayesian inference and lower bound computation.
@IasonTheodorou IasonTheodorou merged commit e0114e1 into master Sep 23, 2025
2 checks passed
@IasonTheodorou IasonTheodorou deleted the bmm_ros_pkg branch September 23, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants