mm-info, mm2grid, mm2las, mm2ply, mm2txt now have a --load-plugins flag#54
mm-info, mm2grid, mm2las, mm2ply, mm2txt now have a --load-plugins flag#54
Conversation
📝 WalkthroughWalkthroughAdded a new optional CLI flag Changes
Sequence Diagram(s)sequenceDiagram
participant CLI as CLI
participant App as App (e.g., mm2txt)
participant Loader as Plugin Loader
participant MRPT as mrpt::system
participant Map as MetricMap/Rawlog loader
CLI->>App: start with --load-plugins=<list>
App->>Loader: parse plugin list
Loader->>MRPT: mrpt::system::loadPluginModules(list)
MRPT-->>Loader: success / failure (errMsg)
alt failure
Loader-->>App: throw std::runtime_error(errMsg)
App-->>CLI: propagate error / exit
else success
App->>Map: proceed to load metric map / rawlog
Map-->>App: loaded data
App-->>CLI: continue existing processing/export
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #54 +/- ##
===========================================
- Coverage 78.63% 78.62% -0.01%
===========================================
Files 191 191
Lines 10632 10631 -1
Branches 982 982
===========================================
- Hits 8360 8359 -1
Misses 2272 2272
🚀 New features to boost your workflow:
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/mm2grid/main.cpp`:
- Around line 94-104: The new throw site uses std::runtime_error but the
translation units lack the explicit header; add an `#include` <stdexcept> to each
CLI entrypoint that throws std::runtime_error (e.g., the file containing the
throw std::runtime_error(errMsg) in main.cpp and the sibling CLI entrypoints
that also throw runtime_error) so the symbol is declared explicitly and portable
across toolchains.
In `@apps/mm2txt/main.cpp`:
- Around line 71-74: The command-line short option `-l` is duplicated:
`TCLAP::ValueArg<std::string> arg_plugins` currently registers short flag "l"
for `--load-plugins` which collides with the existing `-l` used by `--layer`;
remove or change the short flag for `arg_plugins` (e.g., use no short flag by
passing an empty string "" as the short name or pick an unused short like "p")
so the constructor call for `arg_plugins` no longer uses "l", and update the
documentation in docs/source/app_mm2txt.rst to remove the `-l` from the
`--load-plugins` entry (or reflect whichever short flag you choose).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a654e266-79f0-42bb-896b-1b70aa99e24e
📒 Files selected for processing (11)
apps/mm-info/main.cppapps/mm2grid/main.cppapps/mm2las/main.cppapps/mm2ply/main.cppapps/mm2txt/main.cppapps/rawlog-filter/main.cppdocs/source/app_mm-info.rstdocs/source/app_mm2grid.rstdocs/source/app_mm2las.rstdocs/source/app_mm2ply.rstdocs/source/app_mm2txt.rst
c70ea5c to
1c7ca91
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
mp2p_icp_filters/src/PointCloudToVoxelGridSingle.cpp (1)
78-78: Remove unnecessaryconst_caston mapped value.At Line 78,
it->secondshould already be mutable here; usingconst_castadds avoidable risk and obscures intent. Prefer:
auto& vx = it->second;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@mp2p_icp_filters/src/PointCloudToVoxelGridSingle.cpp` at line 78, The mapped value is being forcibly cast mutable with const_cast on it->second to initialize vx; remove the const_cast and bind directly with auto& vx = it->second to avoid undefined behavior and clarify intent, and if the iterator variable it is a const_iterator update its declaration to a non-const iterator so that it->second is already mutable (adjust the loop or container access where it is created to use iterator rather than const_iterator).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@mp2p_icp_filters/src/PointCloudToVoxelGridSingle.cpp`:
- Line 78: The mapped value is being forcibly cast mutable with const_cast on
it->second to initialize vx; remove the const_cast and bind directly with auto&
vx = it->second to avoid undefined behavior and clarify intent, and if the
iterator variable it is a const_iterator update its declaration to a non-const
iterator so that it->second is already mutable (adjust the loop or container
access where it is created to use iterator rather than const_iterator).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8a5d18ec-c136-428a-820b-d5fcc50607a8
📒 Files selected for processing (19)
apps/mm-filter/main.cppapps/mm-georef/main.cppapps/mm-info/main.cppapps/mm2grid/main.cppapps/mm2las/main.cppapps/mm2ply/main.cppapps/mm2txt/main.cppapps/rawlog-filter/main.cppdocs/source/app_mm-info.rstdocs/source/app_mm2grid.rstdocs/source/app_mm2las.rstdocs/source/app_mm2ply.rstdocs/source/app_mm2txt.rstmp2p_icp_filters/src/FilterAbsoluteTimestamp.cppmp2p_icp_filters/src/FilterDeskew.cppmp2p_icp_filters/src/FilterSOR.cppmp2p_icp_filters/src/PointCloudToVoxelGridSingle.cpptests/test-mp2p_quality_reproject_ranges.cpptests/test-mp2p_quality_voxels.cpp
✅ Files skipped from review due to trivial changes (12)
- tests/test-mp2p_quality_reproject_ranges.cpp
- apps/mm-filter/main.cpp
- apps/mm-georef/main.cpp
- docs/source/app_mm2grid.rst
- tests/test-mp2p_quality_voxels.cpp
- mp2p_icp_filters/src/FilterSOR.cpp
- mp2p_icp_filters/src/FilterAbsoluteTimestamp.cpp
- docs/source/app_mm2ply.rst
- docs/source/app_mm2las.rst
- docs/source/app_mm2txt.rst
- mp2p_icp_filters/src/FilterDeskew.cpp
- apps/rawlog-filter/main.cpp
🚧 Files skipped from review as they are similar to previous changes (3)
- docs/source/app_mm-info.rst
- apps/mm2ply/main.cpp
- apps/mm-info/main.cpp
Summary by CodeRabbit
New Features
Bug Fixes
Documentation