Skip to content

Python API missing CVT classes (ClairvoyantCVT, CentralizedCVT, etc.) #14

Description

@swayanshree07-gif

Hello,

I was following the Quick Start guide for the Python interface of Coverage Control, where the following import is used:

from coverage_control import ClairvoyantCVT as CoverageAlgorithm

However, in my installation, none of the following classes are available:

  • ClairvoyantCVT
  • CentralizedCVT
  • DecentralizedCVT
  • NearOptimalCVT

Import test result

(venv) root@swayanshree-ASUS-TUF-Gaming-F16-FX608JH-FX608JH:CoverageControl$ python3 -c "from coverage_control import CentralizedCVT as C; print(dir(C))"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'CentralizedCVT' from 'coverage_control' (/opt/venv/lib/python3.10/site-packages/coverage_control/__init__.py)

To verify, I ran:

python3 -c "import coverage_control as cc; print(dir(cc))"

And the output does not include any of these classes.

Environment:

  • OS: Ubuntu 24.04
  • Python version: 3.10.12
  • Installation method: pip install coverage_control

Available attributes in my installation:

['BNDVector', 'BivariateNormalDistribution', 'CoverageEnvUtils', 'CoverageSystem', 'CudaUtils', 'DblVector', 'DblVectorVector', 'IOUtils', 'Parameters', 'Point2', 'PointVector', 'PolygonFeature', 'RobotModel', 'VoronoiCell', 'VoronoiCells', 'WorldIDF', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '__version__', '_core', '_osp', '_version', 'annotations', 'cmake_prefix_path', 'core', 'coverage_env_utils', 'io_utils']

Because of this, I could not use the controller-based approach shown in the documentation.
As a workaround, I tried using random control inputs via StepControl(), but the coverage cost increases instead of decreasing.

Questions:

1. Is this an issue related to Ubuntu 24.04 compatibility?
2. What is the recommended way to perform coverage optimization using the current Python API?

Below are the code and output images using random function.

Image Image

Any clarification would be very helpful.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions