{"record":{"id":"f4e4d634ab48fd54","repo":"Genesis-Embodied-AI/genesis-world","slug":"probe-arc-spacing-must-be-positive-got-arc-spaci","errorCode":null,"errorMessage":"probe_arc_spacing must be positive, got {arc_spacing}","messagePattern":"probe_arc_spacing must be positive, got (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"genesis/utils/geom.py","lineNumber":2359,"sourceCode":"        Number of latitude rings, including the pole as a degenerate ring.\n    arc_spacing : float\n        Target arc length between neighboring probes along each ring.\n    return_normals : bool\n        Whether to return the normal vectors of the points.\n\n    Returns\n    -------\n    points : np.ndarray, shape (N, 3)\n        Points on the sphere surface.\n    normals : np.ndarray, shape (N, 3), optional\n        Normal vectors of the points. Only returned if ``return_normals`` is True.\n    \"\"\"\n    if radius <= 0.0:\n        raise ValueError(f\"radius must be positive, got {radius}\")\n    if n_rings < 1:\n        raise ValueError(f\"n_rings must be >= 1, got {n_rings}\")\n    if arc_spacing <= 0.0:\n        raise ValueError(f\"probe_arc_spacing must be positive, got {arc_spacing}\")\n\n    pole = np.asarray(cap_axis, dtype=gs.np_float)\n    p_norm = float(np.linalg.norm(pole))\n    if p_norm < gs.EPS:\n        raise ValueError(\"cap_axis must be non-zero\")\n    pole = pole / p_norm\n    t0, t1 = orthogonals(pole)\n\n    pts: list[np.ndarray] = []\n    denom = max(n_rings - 1, 1)\n    for i in range(n_rings):\n        theta = (i / denom) * (0.5 * np.pi)\n        sin_t, cos_t = np.sin(theta), np.cos(theta)\n        ring_r = radius * sin_t\n        circ = 2.0 * np.pi * ring_r\n        if ring_r <= radius * gs.EPS:\n            n_pts = 1\n        else:","sourceCodeStart":2341,"sourceCodeEnd":2377,"githubUrl":"https://github.com/Genesis-Embodied-AI/genesis-world/blob/56e4aa5d82bdb83f2e532e4cc364cb69527acb06/genesis/utils/geom.py#L2341-L2377","documentation":"Raised by the spherical-cap probe point generator in genesis/utils/geom.py when the arc_spacing argument is zero or negative. arc_spacing controls the angular spacing between probe rings on the cap, so it must be a positive float for the sampling loop to produce points. The check runs after the radius and n_rings validations, so all three must be valid together.","triggerScenarios":"Calling the cap-sphere sampling helper (the function around genesis/utils/geom.py:2359) with arc_spacing=0, a negative arc_spacing, or a value that degenerates to 0 through unit conversion (e.g. degrees/radians mix-up).","commonSituations":"Computing arc_spacing from a formula such as arc_spacing = 1.0 / n_rings with n_rings very large (integer division yielding 0), or passing an angular step in the wrong units so it underflows to 0.","solutions":["Pass an explicit positive arc_spacing (e.g. 0.1 radians).","Check the expression computing arc_spacing; ensure no integer division by a larger number yields 0.","If deriving spacing from n_rings, guard with max(arc_spacing, small_positive)."],"exampleFix":"// before\npts = sample_cap_probe_points(radius=0.5, n_rings=5, arc_spacing=1 // 20)\n// after\npts = sample_cap_probe_points(radius=0.5, n_rings=5, arc_spacing=1.0 / 20)","handlingStrategy":"validation","validationCode":"assert arc_spacing > 0.0, f'arc_spacing must be positive, got {arc_spacing}'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate derived spacing formulas (avoid integer division).","Treat all geometry sampling parameters as positive-only contracts at the call boundary."],"tags":["genesis","geometry","validation","argument-validation"],"backgroundTag":"invalid-argument-value","analyzedSha":"56e4aa5d82bdb83f2e532e4cc364cb69527acb06","analyzedAt":"2026-08-28T15:15:07.922Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}