{"id":26841,"library":"coal-library","title":"Coal Library","description":"An extension of the Flexible Collision Library (FCL) for collision detection and distance computation. Supports convex primitives, meshes, octrees, and BVH. Version 3.0.1, with recent patch 3.0.2.c1. Release cadence: irregular.","status":"active","version":"3.0.1","language":"python","source_language":"en","source_url":"https://github.com/cmake-wheel/coal","tags":["collision detection","fcl","robotics","geometry"],"install":[{"cmd":"pip install coal-library","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"The package name is 'coal' after installation, not 'coal_library'.","wrong":"from coal_library import CoalObject","symbol":"CoalObject","correct":"from coal import CoalObject"}],"quickstart":{"code":"import coal\n\n# Create a box collision object\nbox = coal.Box(1, 2, 3)\nobj = coal.CollisionObject(box)\n\n# Perform collision check\nres = coal.collide(obj, obj, coal.CollisionRequest())\nprint(res.is_collision)","lang":"python","description":"Simple collision check between two identical boxes."},"warnings":[{"fix":"Use `import coal` and `from coal import ...` for all symbols.","message":"In coal-library v3.x, the main module is imported as `import coal` not `import coal_library`. The PyPI package name differs from the import name.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Set the transformation using `obj.setTransform(transform)` before calling collide or distance.","message":"Collision objects require explicit transform updates; transformations are not automatically applied after creation.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `coal.CollisionRequest(enable_contact=True)` instead of `coal.CollisionRequest(True)` .","message":"The `CollisionRequest` and `DistanceRequest` constructors now require keyword arguments for flags and settings; positional arguments are deprecated.","severity":"deprecated","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install with `pip install coal-library` but import as `import coal`.","cause":"Trying to import using the PyPI package name instead of the Python import name.","error":"ModuleNotFoundError: No module named 'coal_library'"},{"fix":"Upgrade to coal-library >=3.0 and use `from coal import Box` or `coal.Box`.","cause":"In older versions (pre-3.0), shapes were in a different location or named differently.","error":"AttributeError: module 'coal' has no attribute 'Box'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}