Skip to content

refactor: rename DART 7 headers to snake_case (Phase 1)#2475

Merged
jslee02 merged 21 commits intomainfrom
feature/header-snake-case-migration
Jan 20, 2026
Merged

refactor: rename DART 7 headers to snake_case (Phase 1)#2475
jslee02 merged 21 commits intomainfrom
feature/header-snake-case-migration

Conversation

@jslee02
Copy link
Member

@jslee02 jslee02 commented Jan 19, 2026

Summary

Complete header migration from PascalCase to snake_case naming convention. This PR renames ~325 header files with structural changes (multi-word names) that are safe to migrate without breaking backward compatibility.

Commits

  1. Phase 1: DART 7 additions (All.hpp, Export.hpp, Fwd.hpp) - 21 files
  2. Phase 2a: dart/common structural renames - 40 files
  3. Phase 2b-h: All remaining modules - ~264 files

Modules Renamed

Module Files Examples
dart/common 40 MemoryManager.hppmemory_manager.hpp
dart/math 32 LcpSolver.hpplcp_solver.hpp
dart/collision 46 CollisionDetector.hppcollision_detector.hpp
dart/constraint 23 ConstraintSolver.hppconstraint_solver.hpp
dart/dynamics 96 BodyNode.hppbody_node.hpp
dart/gui 38 WorldNode.hppworld_node.hpp
dart/utils 24 UrdfParser.hppurdf_parser.hpp
Others 5 SensorManager.hppsensor_manager.hpp

What's NOT in this PR

Case-only renames are deferred to DART 8 to avoid collision issues on case-insensitive filesystems (macOS, Windows):

  • World.hppworld.hpp
  • Frame.hppframe.hpp
  • Joint.hppjoint.hpp
  • etc.

How Backward Compatibility Works

CMake automatically generates PascalCase wrapper headers that emit deprecation warnings:

// Auto-generated BodyNode.hpp (wrapper)
#warning "BodyNode.hpp is deprecated. Use body_node.hpp instead."
#include "dart/dynamics/body_node.hpp"

Users can continue using old include paths during DART 7, with removal planned for DART 8.

Testing

  • pixi run lint passes
  • pixi run build passes (383 targets)
  • pixi run test passes (143 tests)
  • pixi run -e gazebo test-gz (Gazebo compatibility) - needs CI

Documentation

  • docs/onboarding/header-migration-analysis.md - Full migration strategy
  • docs/dev_tasks/header-snake-case-migration/ - Task tracking for resumable work

…wd.hpp)

Phase 1 of PascalCase → snake_case header migration. These files are
DART 7 additions (not present in release-6.16) so safe for immediate
case-only rename without backward compatibility concerns.

Renamed 21 header files:
- dart/All.hpp → dart/all.hpp
- dart/Export.hpp → dart/export.hpp
- dart/collision/Fwd.hpp → dart/collision/fwd.hpp
- dart/common/Export.hpp → dart/common/export.hpp
- dart/constraint/Fwd.hpp → dart/constraint/fwd.hpp
- dart/dynamics/Fwd.hpp → dart/dynamics/fwd.hpp
- dart/gui/All.hpp → dart/gui/all.hpp
- dart/gui/Export.hpp → dart/gui/export.hpp
- dart/gui/Fwd.hpp → dart/gui/fwd.hpp
- dart/io/Export.hpp → dart/io/export.hpp
- dart/lcpsolver/All.hpp → dart/lcpsolver/all.hpp
- dart/math/lcp/All.hpp → dart/math/lcp/all.hpp
- dart/optimizer/All.hpp → dart/optimizer/all.hpp
- dart/optimizer/ipopt/Export.hpp → dart/optimizer/ipopt/export.hpp
- dart/optimizer/nlopt/Export.hpp → dart/optimizer/nlopt/export.hpp
- dart/optimizer/pagmo/Export.hpp → dart/optimizer/pagmo/export.hpp
- dart/sensor/Fwd.hpp → dart/sensor/fwd.hpp
- dart/simulation/Fwd.hpp → dart/simulation/fwd.hpp
- dart/utils/Export.hpp → dart/utils/export.hpp
- dart/utils/Fwd.hpp → dart/utils/fwd.hpp
- dart/utils/urdf/Export.hpp → dart/utils/urdf/export.hpp

Updated all internal includes to use new lowercase names.
CMake will auto-generate PascalCase compatibility wrappers.

See docs/onboarding/header-migration-analysis.md for full migration plan.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

#pragma once

P2 Badge Fix remaining references to removed LCP All.hpp

This new dart/math/lcp/all.hpp replaces the former All.hpp, but there is no compatibility header generated for the old name (it’s not snake_case per the compat generator). As a result, any remaining #include <dart/math/lcp/All.hpp> (e.g., examples/lcp_solvers/main.cpp:43) will now fail to compile when DART_BUILD_EXAMPLES is enabled. Update those includes or add a shim header if backward compatibility is required.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Phase 2a of PascalCase → snake_case header migration. This commit
performs structural renames (e.g., BodyNode.hpp → body_node.hpp) for
the dart/common module.

Renamed 40 header files in dart/common/:
- AspectWithVersion.hpp → aspect_with_version.hpp
- ClassWithVirtualBase.hpp → class_with_virtual_base.hpp
- CompositeJoiner.hpp → composite_joiner.hpp
- EmbeddedAspect.hpp → embedded_aspect.hpp
- FreeListAllocator.hpp → free_list_allocator.hpp
- IncludeWindows.hpp → include_windows.hpp
- LocalResource.hpp → local_resource.hpp
- LocalResourceRetriever.hpp → local_resource_retriever.hpp
- LockableReference.hpp → lockable_reference.hpp
- MemoryAllocator.hpp → memory_allocator.hpp
- MemoryAllocatorDebugger.hpp → memory_allocator_debugger.hpp
- MemoryManager.hpp → memory_manager.hpp
- NameManager.hpp → name_manager.hpp
- PoolAllocator.hpp → pool_allocator.hpp
- ProxyAspect.hpp → proxy_aspect.hpp
- RequiresAspect.hpp → requires_aspect.hpp
- ResourceRetriever.hpp → resource_retriever.hpp
- SharedLibrary.hpp → shared_library.hpp
- SmartPointer.hpp → smart_pointer.hpp
- SpecializedForAspect.hpp → specialized_for_aspect.hpp
- StlAllocator.hpp → stl_allocator.hpp
- StlHelpers.hpp → stl_helpers.hpp
- VersionCounter.hpp → version_counter.hpp
(plus corresponding detail/ files)

Updated all internal includes to use new lowercase names.
CMake will auto-generate PascalCase compatibility wrappers.
@jslee02 jslee02 added this to the DART 7.0 milestone Jan 19, 2026
jslee02 and others added 4 commits January 19, 2026 12:56
Phase 2b-h of PascalCase → snake_case header migration. This commit
performs structural renames for all remaining modules.

Modules renamed:
- dart/math: 32 files (LcpSolver, MathTypes, TriMesh, etc.)
- dart/collision: 46 files (CollisionDetector, FCL/Bullet/ODE backends)
- dart/constraint: 23 files (ConstraintSolver, ContactConstraint, etc.)
- dart/dynamics: 96 files (BodyNode, Skeleton, Joint types, Shapes)
- dart/gui: 38 files (Viewer, WorldNode, ShapeNodes, DragAndDrop)
- dart/utils: 24 files (UrdfParser, SdfParser, ResourceRetrievers)
- dart/sensor: 1 file (SensorManager)
- dart/simulation: 1 file (SmartPointer)
- dart/optimizer: 1 file (GradientDescentSolver)
- dart/lcpsolver: 2 files (PivotMatrix, DeprecatedNamespace)

Total: ~264 header files renamed

Updated all internal includes across ~500+ source files.
Updated CMakeLists.txt files with new header names.
CMake will auto-generate PascalCase compatibility wrappers.

Added docs/dev_tasks/header-snake-case-migration/ for task tracking.
Address Codex review feedback:
- Update include in examples/lcp_solvers/main.cpp
- Update documentation in docs/background/lcp/02_overview.md
@jslee02
Copy link
Member Author

jslee02 commented Jan 19, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 067846c761

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- Fix BackwardCompatibility.hpp -> backward_compatibility.hpp include
  in dart/utils/urdf/UrdfParser.cpp and urdf_world_parser.hpp
- Add dart/All.hpp wrapper for backward compat with dart/all.hpp
- Add dart/Export.hpp wrapper for backward compat with dart/export.hpp
- Update CMakeLists.txt to install compatibility headers

Addresses Codex review feedback about missing compatibility wrappers
for top-level headers and fixes CI build failures.
@jslee02
Copy link
Member Author

jslee02 commented Jan 19, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d02f6ced60

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

The generated PascalCase All.hpp wrapper was not being installed,
causing examples/tutorials using #include <dart/gui/All.hpp> to fail.
@jslee02
Copy link
Member Author

jslee02 commented Jan 19, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 87a11e4871

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…esystems

Address Codex review feedback:
- Remove dart/all.hpp and dart/export.hpp (case-only duplicates)
- Keep only dart/All.hpp and dart/Export.hpp (no collision)
- Update ~200 files referencing lowercase top-level headers
- Update examples/tutorials to use dart/gui/all.hpp
- Update dart/dart.hpp deprecation message

Top-level headers (All.hpp, Export.hpp) stay PascalCase for DART 7
compatibility. Submodule headers remain snake_case as migrated.

Fixes case collision on macOS/Windows where All.hpp and all.hpp
cannot coexist in the same directory.
Task complete - working documentation no longer needed.
Key insights preserved in docs/onboarding/header-migration-analysis.md.
Phase 6-7 of header snake_case migration:

Source files (~200 files):
- Rename all PascalCase .cpp files to snake_case to match headers
- Examples: BodyNode.cpp → body_node.cpp, CollisionDetector.cpp → collision_detector.cpp

CMake modules (19 files):
- Rename DARTFind*.cmake → dart_find_*.cmake
- Rename CompilerCache.cmake → compiler_cache.cmake
- Update cmake/dart_defs.cmake with string(TOLOWER) for dynamic includes
- Update cmake/dart_Component.cmake.in template for installed components

Preserved (standard CMake conventions):
- Find*.cmake (CMake find module convention)
- DARTConfig.cmake.in (required for find_package(DART))

Verified: build (395 targets), tests (144/144), installation, find_package(DART)
@jslee02
Copy link
Member Author

jslee02 commented Jan 20, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f02b95a585

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jslee02
Copy link
Member Author

jslee02 commented Jan 20, 2026

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 84.54301% with 115 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.52%. Comparing base (8a6414e) to head (5405b49).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dart/collision/collision_group.cpp 85.81% 40 Missing ⚠️
dart/collision/collision_detector.cpp 66.66% 20 Missing ⚠️
dart/collision/collision_filter.cpp 68.33% 19 Missing ⚠️
dart/collision/dart/dart_collision_detector.cpp 86.92% 17 Missing ⚠️
dart/collision/dart/dart_collision_group.cpp 66.66% 5 Missing ⚠️
dart/collision/collision_object.cpp 73.33% 4 Missing ⚠️
dart/collision/collision_detector.hpp 60.00% 2 Missing ⚠️
dart/collision/collision_result.cpp 94.87% 2 Missing ⚠️
dart/collision/distance_result.cpp 90.00% 2 Missing ⚠️
dart/collision/fcl/backward_compatibility.cpp 92.85% 2 Missing ⚠️
... and 2 more
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2475   +/-   ##
=======================================
  Coverage   66.51%   66.52%           
=======================================
  Files         407      407           
  Lines       37320    37322    +2     
  Branches     4919     4919           
=======================================
+ Hits        24825    24827    +2     
  Misses      12495    12495           
Flag Coverage Δ
unittests 66.52% <84.54%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dart/collision/Contact.cpp 88.63% <ø> (ø)
dart/collision/collision_group.hpp 100.00% <100.00%> (ø)
dart/collision/collision_object.hpp 100.00% <100.00%> (ø)
dart/collision/collision_option.cpp 100.00% <100.00%> (ø)
dart/collision/dart/DARTCollide.cpp 45.71% <ø> (ø)
dart/collision/dart/dart_collision_group.hpp 100.00% <100.00%> (ø)
dart/collision/detail/collision_group.hpp 100.00% <100.00%> (ø)
dart/collision/detail/contact-impl.hpp 100.00% <100.00%> (ø)
dart/collision/detail/unordered_pairs.hpp 89.47% <ø> (ø)
dart/collision/distance_option.cpp 100.00% <100.00%> (ø)
... and 45 more

... and 580 files with indirect coverage changes

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

@jslee02
Copy link
Member Author

jslee02 commented Jan 20, 2026

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. 👍

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jslee02 jslee02 merged commit 3e2ab2f into main Jan 20, 2026
63 of 64 checks passed
@jslee02 jslee02 deleted the feature/header-snake-case-migration branch January 20, 2026 20:14
jslee02 added a commit that referenced this pull request Jan 20, 2026
Complete the PascalCase to snake_case migration for all source files.

Changes:
- Rename 55 dart/ library source files (case-only and acronym files)
  - Single-word: Skeleton.cpp → skeleton.cpp, World.cpp → world.cpp, etc.
  - Acronyms: DARTCollide.cpp → dart_collide.cpp, FCLTypes.cpp → fcl_types.cpp
  - Top-level: All.hpp → all.hpp, Export.hpp → export.hpp
- Rename 34 examples/ files to snake_case
- Rename 9 tests/ helper files to snake_case
- Rename 145 test files from test_PascalCase.cpp to test_snake_case.cpp
- Update all #include statements across the codebase
- Update CMakeLists.txt files with new filenames

Total: 247 files renamed, 11 files modified

This completes the snake_case migration started in PR #2475.
All unit tests pass.
jslee02 added a commit that referenced this pull request Jan 20, 2026
Complete the PascalCase to snake_case migration for all source files.

Changes:
- Rename 55 dart/ library source files (case-only and acronym files)
  - Single-word: Skeleton.cpp → skeleton.cpp, World.cpp → world.cpp, etc.
  - Acronyms: DARTCollide.cpp → dart_collide.cpp, FCLTypes.cpp → fcl_types.cpp
  - Top-level: All.hpp → all.hpp, Export.hpp → export.hpp
- Rename 34 examples/ files to snake_case
- Rename 9 tests/ helper files to snake_case
- Rename 145 test files from test_PascalCase.cpp to test_snake_case.cpp
- Update all #include statements across the codebase
- Update CMakeLists.txt files with new filenames

Total: 247 files renamed, 11 files modified

This completes the snake_case migration started in PR #2475.
All unit tests pass.
jslee02 added a commit that referenced this pull request Jan 21, 2026
Resolve merge conflicts from snake_case rename (PRs #2475, #2478):
- Update includes in lemke_solver.cpp to snake_case, keep EIGEN_STACK_ALLOCATION_LIMIT fix
- Update test_collision_group.cpp includes to snake_case
- Update test_subject_observer.cpp includes to snake_case
- Rename new test files from PascalCase to snake_case in CMakeLists.txt
- Rename actual test source files to snake_case to match CMakeLists.txt
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.

1 participant