Collision · repose-collision

Collision check task

CuCollisionCheckTask runs a full collision check on every cycle and publishes the report. Use it for monitoring, for gating a motion on a check, or for visualising clearance live.

Type and channels

text
CuCollisionCheckTask<N, M = N, MAX_OBS = 32, MAX_ATTACHED = 8, MAX_CONTACTS = 16, MAX_EXCL = 16>

inputs:  CuJointPositionsPayload<N>
         CuPlanningScene<MAX_OBS, MAX_ATTACHED>      (optional)
         CuSceneExclusions<MAX_EXCL>                 (optional)
output:  CuCollisionReport<MAX_CONTACTS>

Without joint positions nothing is published. Without a scene it checks self-collision only. Exclusions without a scene are an error, because they would have nothing to bind to.

Config

ron
(
    id: "collision",
    type: "repose_collision::CuCollisionCheckTask<6>",
    config: {
        "chain": "igus_rebel",
        "collision_model": "igus_rebel",
    },
),

Both keys are required and accept a preset or an inline spec (chain, collision model). For an imported robot with more shapes than joints, set M: CuCollisionCheckTask<6, 12>.

From Rust

rust
let task = CuCollisionCheckTask::<6>::from_params(chain, model)?;
task.check_configuration(&q, Some(&scene), Some(&exclusions), &mut report)?;

This is the same call the task makes each cycle, available for tests and pre-flight code.

API reference