Skip to content

Replace uint with unsigned int for MSVC compatibility - #762

Merged
rhaschke merged 2 commits into
moveit:ros2from
iamnambiar:fix/msvc-uint
Nov 23, 2026
Merged

rhaschke merged 2 commits into
moveit:ros2from
iamnambiar:fix/msvc-uint

Conversation

@iamnambiar

@iamnambiar iamnambiar commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

uint is not a standard C++ type. It's only defined by glibc's <sys/types.h>, so it isn't available on MSVC. This PR replaces every use of uint as a type with unsigned int

Summary by CodeRabbit

  • Refactor
    • Standardized numeric type declarations across planning, solution introspection, and task visualization.
    • Planning defaults, solution lookups, and displayed information remain unchanged.
    • No changes to user-facing workflows or functionality.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request replaces uint with unsigned int in core APIs, planner properties, pose-generation counters, visualization models, and tests. Existing lookup behavior, defaults, and Python property names remain unchanged.

Changes: Unsigned integer type updates

Layer / File(s) Summary
Core declarations and use
core/include/moveit/task_constructor/*, core/python/bindings/src/solvers.cpp, core/src/introspection.cpp, core/src/solvers/pipeline_planner.cpp, core/src/stages/generate_place_pose.cpp, core/test/test_stage.cpp
Core APIs, planner properties, pose-generation counters, and a stage test use unsigned int instead of uint. The planner default and existing lookup behavior are unchanged.
Visualization model and counters
visualization/motion_planning_tasks/src/*, visualization/motion_planning_tasks/test/test_task_model.cpp
Visualization model return types, counters, and test identifiers use unsigned int instead of uint.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Refactor

Suggested reviewers: rhaschke

Merge Risk: Minimal · up to 9a51f

This change replaces a non-standard type alias with the standard type so the code builds on MSVC. It does not change behavior on existing platforms, and no merge-blocking risk is evident.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title states the main change: replacing the non-standard uint type with unsigned int. The raw summary shows this change across all listed files (introspection, properties, solvers bindings, pi…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states the main change: replacing the non-standard uint type with unsigned int. The raw summary shows this change across all listed files (introspection, properties, solvers bindings, pipeline planner, place pose stage, tests, and visualization code). The stated reason, MSVC compatibility, matches the PR objectives, which say uint is defined only by glibc's <sys/types.h> and is unavailable on MSVC.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e1f17214-b238-4cbf-9836-483680ae138e
Commits

Reviewing files that changed from the base of the PR and between 3c12f79 and 9a51f5b.

Files selected for processing: 1

  • core/src/stages/generate_place_pose.cpp
Files skipped from review as they are similar to previous changes: 1

  • core/src/stages/generate_place_pose.cpp

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@iamnambiar iamnambiar changed the title Replace uint with unsigned int Replace uint with unsigned int for MSVC compatibility Oct 26, 2026

@rhaschke rhaschke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please apply the format changes requested by clang-format.

@iamnambiar

Copy link
Copy Markdown
Contributor Author

@rhaschke Thanks! I have applied the clang-format fix and pre-commit now passes.

@codecov

codecov Bot commented Nov 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.14286% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.87%. Comparing base (f527048) to head (9a51f5b).
⚠️ Report is 2 commits behind head on ros2.

Files with missing lines Patch % Lines
core/src/stages/generate_place_pose.cpp 0.00% 4 Missing ⚠️
core/src/introspection.cpp 0.00% 1 Missing ⚠️
...on/motion_planning_tasks/src/remote_task_model.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             ros2     #762      +/-   ##
==========================================
+ Coverage   47.86%   47.87%   +0.01%     
==========================================
  Files         142      142              
  Lines       10446    10448       +2     
  Branches     1149     1150       +1     
==========================================
+ Hits         4999     5001       +2     
  Misses       5183     5183              
  Partials      264      264              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rhaschke
rhaschke merged commit 8762fae into moveit:ros2 Nov 23, 2026
7 checks passed
@rhaschke

Copy link
Copy Markdown
Contributor

Thanks.

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.

2 participants