Skip to content

Add windows Build#1307

Closed
Puiching-Memory wants to merge 2 commits intoompl:pybinding-wheelsfrom
Puiching-Memory:pybinding-wheels
Closed

Add windows Build#1307
Puiching-Memory wants to merge 2 commits intoompl:pybinding-wheelsfrom
Puiching-Memory:pybinding-wheels

Conversation

@Puiching-Memory
Copy link
Copy Markdown

Add the vcpkg cmake toolchain to automatically install dependencies on windows. Currently, it still has issues with environment variable detection, using relative paths to find locally installed vcpkg.

Build log:
https://github.com/Puiching-Memory/ompl/actions/runs/17008018101

Only this kind of import can work:

from ompl import base as ob
from ompl import geometric as og

This will result in an error:

import ompl.base

At present, I am still unable to verify whether the build on windows is working properly.The generated binary file is much smaller than that of other platforms. This makes me worried.

$env:CIBW_BUILD = "cp311-*"; cibuildwheel .\bindings\
Run pytest:
================================================ test session starts =================================================
platform win32 -- Python 3.11.13, pytest-8.4.1, pluggy-1.6.0
rootdir: C:\workspace\github\ompl
collected 21 items / 6 errors                                                                                         

======================================================= ERRORS =======================================================
______________________________________ ERROR collecting tests/base/test_base.py ______________________________________ 
ImportError while importing test module 'C:\workspace\github\ompl\tests\base\test_base.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
C:\Users\11386\.conda\envs\ompl\Lib\importlib\__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests\base\test_base.py:44: in <module>
    from ompl.base import *
E   ModuleNotFoundError: No module named 'ompl.base'
___________________________________ ERROR collecting tests/control/test_control.py ___________________________________ 
ImportError while importing test module 'C:\workspace\github\ompl\tests\control\test_control.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
C:\Users\11386\.conda\envs\ompl\Lib\importlib\__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests\control\test_control.py:47: in <module>
    import ompl.util as ou
E   ModuleNotFoundError: No module named 'ompl.util'
_________________________________ ERROR collecting tests/geometric/test_geometric.py _________________________________ 
ImportError while importing test module 'C:\workspace\github\ompl\tests\geometric\test_geometric.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
C:\Users\11386\.conda\envs\ompl\Lib\importlib\__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests\geometric\test_geometric.py:47: in <module>
    import ompl.util as ou
E   ModuleNotFoundError: No module named 'ompl.util'
__________________________ ERROR collecting tests/geometric/test_geometric_compoundstate.py __________________________ 
ImportError while importing test module 'C:\workspace\github\ompl\tests\geometric\test_geometric_compoundstate.py'.    
Hint: make sure your test modules/packages have valid Python names.
Traceback:
C:\Users\11386\.conda\envs\ompl\Lib\importlib\__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests\geometric\test_geometric_compoundstate.py:47: in <module>
    import ompl.base as ob
E   ModuleNotFoundError: No module named 'ompl.base'
________________________________ ERROR collecting tests/util/test_py_std_function.py _________________________________ 
ImportError while importing test module 'C:\workspace\github\ompl\tests\util\test_py_std_function.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
C:\Users\11386\.conda\envs\ompl\Lib\importlib\__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests\util\test_py_std_function.py:40: in <module>
    from py_std_function import *
E   ModuleNotFoundError: No module named 'py_std_function'
______________________________________ ERROR collecting tests/util/test_util.py ______________________________________ 
ImportError while importing test module 'C:\workspace\github\ompl\tests\util\test_util.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
C:\Users\11386\.conda\envs\ompl\Lib\importlib\__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests\util\test_util.py:43: in <module>
    from ompl.util import *
E   ModuleNotFoundError: No module named 'ompl.util'
============================================== short test summary info =============================================== 
ERROR tests/base/test_base.py
ERROR tests/control/test_control.py
ERROR tests/geometric/test_geometric.py
ERROR tests/geometric/test_geometric_compoundstate.py
ERROR tests/util/test_py_std_function.py
ERROR tests/util/test_util.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 6 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
================================================= 6 errors in 21.00s ================================================= 
Run print(dir(base)):
['ATLAS_STATE_SPACE_ALPHA', 'ATLAS_STATE_SPACE_BACKOFF', 'ATLAS_STATE_SPACE_EPSILON', 'ATLAS_STATE_SPACE_EXPLORATION', 'ATLAS_STATE_SPACE_MAX_CHARTS_PER_EXTENSION', 'ATLAS_STATE_SPACE_RHO_MULTIPLIER', 'ATLAS_STATE_SPACE_SAMPLES', 'AllValidStateValidityChecker', 'AtlasChart', 'AtlasStateSampler', 'AtlasStateSpace', 'AtlasStateType', 'BridgeTestValidStateSampler', 'CONSTRAINED_STATE_SPACE_DELTA', 'CONSTRAINED_STATE_SPACE_LAMBDA', 'CONSTRAINT_PROJECTION_MAX_ITERATIONS', 'CONSTRAINT_PROJECTION_TOLERANCE', 'CompoundState', 'CompoundStateSampler', 'CompoundStateSpace', 'ConditionalStateSampler', 'ConstrainedMotionValidator', 'ConstrainedSpaceInformation', 'ConstrainedStateSpace', 'ConstrainedStateSpaceStateType', 'ConstrainedValidStateSampler', 'Constraint', 'ConstraintIntersection', 'ControlDurationObjective', 'Cost', 'CostConvergenceTerminationCondition', 'DeterministicSequence', 'DeterministicStateSampler', 'DiscreteMotionValidator', 'DiscreteState', 'DiscreteStateSampler', 'DiscreteStateSpace', 'DubinsMotionValidator', 'DubinsPath', 'DubinsPathSegmentType', 'DubinsStateSpace', 'EmptyStateSpace', 'GOAL_ANY', 'GOAL_LAZY_SAMPLES', 'GOAL_REGION', 'GOAL_SAMPLEABLE_REGION', 'GOAL_STATE', 'GOAL_STATES', 'GaussianValidStateSampler', 'GenericParam', 'Goal', 'GoalLazySamples', 'GoalRegion', 'GoalSampleableRegion', 'GoalSpace', 'GoalState', 'GoalStates', 'GoalType', 'HaltonSequence', 'InformedSampler', 'InformedStateSampler', 'IterationTerminationCondition', 'KleinBottleStateSampler', 'KleinBottleStateSpace', 'MaximizeClearanceValidStateSampler', 'MaximizeMinClearanceObjective', 'MechanicalWorkOptimizationObjective', 'MinimaxObjective', 'MinimizeArrivalTime', 'MinimumClearanceValidStateSampler', 'MobiusStateSpace', 'MotionValidator', 'MultiOptimizationObjective', 'ObstacleBasedValidStateSampler', 'OptimizationObjective', 'OrderedInfSampler', 'ParamSet', 'Path', 'PathLengthDirectInfSampler', 'PathLengthOptimizationObjective', 'Planner', 'PlannerData', 'PlannerDataEdge', 'PlannerDataStorage', 'PlannerDataVertex', 'PlannerInputStates', 'PlannerStatus', 'PlannerTerminationCondition', 'PrecomputedSequence', 'PrecomputedStateSampler', 'ProblemDefinition', 'ProjectedStateSampler', 'ProjectedStateSpace', 'ProjectionEvaluator', 'ProjectionMatrix', 'RealVectorBounds', 'RealVectorIdentityProjectionEvaluator', 'RealVectorLinearProjectionEvaluator', 'RealVectorOrthogonalProjectionEvaluator', 'RealVectorRandomLinearProjectionEvaluator', 'RealVectorStateSampler', 'RealVectorStateSpace', 'RealVectorStateType', 'ReedsSheppMotionValidator', 'ReedsSheppPath', 'ReedsSheppStateSpace', 'RejectionInfSampler', 'SE2StateSpace', 'SE2StateType', 'SE3State', 'SE3StateSpace', 'SO2State', 'SO2StateSampler', 'SO2StateSpace', 'SO3State', 'SO3StateSampler', 'SO3StateSpace', 'SolutionNonExistenceProof', 'SpaceInformation', 'SpaceTimeStateSpace', 'SphereStateSampler', 'SphereStateSpace', 'SphereStateSpaceStateType', 'State', 'StateCostIntegralObjective', 'StateSampler', 'StateSpace', 'StateStorage', 'StateValidityChecker', 'SubspaceProjectionEvaluator', 'SubspaceStateSampler', 'TangentBundleSpaceInformation', 'TangentBundleStateSpace', 'TimeState', 'TimeStateSampler', 'TimeStateSpace', 'TorusStateSampler', 'TorusStateSpace', 'TorusStateSpaceStateType', 'UniformValidStateSampler', 'VFMechanicalWorkOptimizationObjective', 'VFUpstreamCriterionOptimizationObjective', 'ValidStateSampler', 'WrapperProjectionEvaluator', 'WrapperStateSampler', 'WrapperStateSpace', 'WrapperStateType', '__doc__', '__loader__', '__name__', '__package__', '__spec__', 'exactSolnPlannerTerminationCondition', 'plannerAlwaysTerminatingCondition', 'plannerAndTerminationCondition', 'plannerNonTerminatingCondition', 'plannerOrTerminationCondition', 'timedPlannerTerminationCondition']
Run pytest/test_Base.py:
Geometric path with 3 states
RealVectorState [0.25 0.25]
RealVectorState [0.948511 0.106417]
RealVectorState [0.124105 0.0833464]

Initial path:
 None
Path length before interpolation: 1.537843652513164
Path length after interpolation: 1.5378436525131638
Geometric path with 19 states
RealVectorState [0.124105 0.0833464]
RealVectorState [0.227156 0.0862303]
RealVectorState [0.330206 0.0891142]
RealVectorState [0.433257 0.0919981]
RealVectorState [0.536308 0.0948819]
RealVectorState [0.639359 0.0977658]
RealVectorState [0.742409 0.10065]
RealVectorState [0.84546 0.103534]
RealVectorState [0.948511 0.106417]
RealVectorState [0.87866 0.120776]
RealVectorState [0.808809 0.135134]
RealVectorState [0.738958 0.149492]
RealVectorState [0.669106 0.16385]
RealVectorState [0.599255 0.178209]
RealVectorState [0.529404 0.192567]
RealVectorState [0.738958 0.149492]
RealVectorState [0.669106 0.16385]
RealVectorState [0.599255 0.178209]
RealVectorState [0.529404 0.192567]
RealVectorState [0.669106 0.16385]
RealVectorState [0.599255 0.178209]
RealVectorState [0.529404 0.192567]
RealVectorState [0.599255 0.178209]
RealVectorState [0.529404 0.192567]
RealVectorState [0.529404 0.192567]
RealVectorState [0.459553 0.206925]
RealVectorState [0.389702 0.221283]
RealVectorState [0.319851 0.235642]
RealVectorState [0.25 0.25]

Path after subdivide + reverse:
 None
Geometric path with 2 states
RealVectorState [0.755394 0.359394]
RealVectorState [0.948053 0.872129]

Path after randomization:
 None
Path is cleared. State count = 0

@mamoll
Copy link
Copy Markdown
Member

mamoll commented Aug 16, 2025

@WeihangGuo please check it out.

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