Skip to main content

Crate repose_collision

Crate repose_collision 

Source
Expand description

Deterministic, allocation-free capsule and sphere robot collision checking for copper-rs.

§Example

use repose_collision::{CuCollisionEnv, CuCollisionReport, CuCollisionShape, CuSphere};
use repose_collision::igus_rebel_collision_model;
use repose_kinematics::igus_rebel_chain;
use cu29::units::si::angle::radian;
use cu29::units::si::f64::{Angle, Length};
use cu29::units::si::length::meter;

let chain = igus_rebel_chain();
let model = igus_rebel_collision_model();
let q_home = [Angle::new::<radian>(0.0).into(); 6];
let mut report = CuCollisionReport::<8>::default();
model.check_configuration(&chain, &q_home, &CuCollisionEnv::EMPTY, &mut report).unwrap();
assert!(report.is_collision_free());

let m = Length::new::<meter>;
let obstacles = [CuCollisionShape::Sphere(CuSphere::new([m(0.0), m(0.0), m(0.87)], m(0.08)).unwrap())];
model.check_configuration(&chain, &q_home, &CuCollisionEnv::new(&obstacles), &mut report).unwrap();
assert!(!report.is_collision_free());

Structs§

CuAttachedShape
A collision shape rigidly attached to a robot frame or the base.
CuAttachedUpdate
Changes applied by CuPlanningScene::update_attached; unset parts are kept.
CuCapsule
3D capsule (swept sphere along line segment a -> b) with radius.
CuCollisionCheckParams
Node config of CuCollisionCheckTask.
CuCollisionCheckTask
Stateless CuTask evaluating self-collision, environment obstacles, and attached shapes in place.
CuCollisionContact
Single contact or clearance violation between a robot link and another link or obstacle.
CuCollisionEnv
Borrowed view of the collision environment: world obstacles, attached shapes, and exclusions.
CuCollisionModelParams
Parameters of a CuRobotCollisionModel.
CuCollisionReport
Fixed-capacity collision report populated in place (CuMsgPayload-compliant).
CuLinkShape
A robot collision shape and the frame it is expressed in.
CuObjectId
Strongly typed, stable object identifier for obstacles and attached shapes in a planning scene.
CuPlanningScene
Fixed-capacity, versioned planning scene storage (CuMsgPayload-compliant).
CuRobotCollisionModel
Fixed-capacity model for N movable frames and up to M collision shapes.
CuSceneExclusion
One excluded attached-shape pair, addressed by stable IDs where the scene owns them.
CuSceneExclusions
Fixed-capacity stable-ID exclusion set (CuMsgPayload-compliant).
CuSceneObstacle
An environment obstacle in world coordinates, as stored in a planning scene.
CuSceneRevision
Monotonically increasing revision counter tracking changes to the planning scene.
CuSphere
3D sphere primitive defined by a center point and radius.

Enums§

CuCollisionModelSpec
Source of a robot collision model in RON: a preset name or an inline model.
CuCollisionShape
Convex collision shape primitive (Sphere or Capsule).
CuContactKind
Category of a detected collision or safety-margin violation.
CuSceneError
Errors that can occur during planning scene modifications and queries.
CuSceneExclusionPartner
Partner of an attached shape in a CuSceneExclusion.

Constants§

DEFAULT_MAX_ATTACHED
Default attached shape capacity of CuPlanningScene and CuCollisionCheckTask.
DEFAULT_MAX_CONTACTS
Default contact capacity of CuCollisionCheckTask.
DEFAULT_MAX_EXCLUSIONS
Default capacity for stable-ID exclusions in CuSceneExclusions.
DEFAULT_MAX_OBSTACLES
Default obstacle capacity of CuPlanningScene and CuCollisionCheckTask.

Functions§

capsule_capsule_signed_distance
Computes the exact signed surface-to-surface distance between two capsules.
capsule_sphere_signed_distance
Computes the exact signed surface-to-surface distance between a capsule and a sphere.
igus_rebel_collision_model
Returns the 6-link capsule/sphere collision model for the igus ReBeL 6-DOF cobot.
shape_signed_distance
Computes the exact signed surface-to-surface distance between any two CuCollisionShape primitives.
shapes_violate_margin
Returns true if the signed distance between a and b is strictly less than safety_margin.
sphere_sphere_signed_distance
Computes the exact signed surface-to-surface distance between two spheres.
transform_shape
Transforms a local CuCollisionShape by frame and writes the world-space shape into out_world.