Drake
Drake C++ Documentation
CollisionFilterDeclaration Class Reference

## Detailed Description

Class for articulating changes to the configuration of SceneGraph's "collision filters"; collision filters limit the scope of various proximity queries.

This class provides the basis for declaring what pairs should or should not be included in the set of proximity query candidates C (see documentation for CollisionFilterManager for details on the set C).

A declaration consists of zero or more statements. Each statement can declare, for example, that the pair (g₁, g₂) should be excluded from C (also known as "filtering the pair"). That statement is added to the declaration by invoking the corresponding statement method (see below), and the result of the invocation, is that the statement is appended to the declaration.

Each statement method returns a reference to the declaration instance, so a number of statements can be chained together, i.e.,

collision_filter_manager.Apply(
.ExcludeWithin(some_geometry_set)
.ExcludeBetween(set_A, set_B));

It's worth noting, that the statements are evaluated in invocation order such that a later statement can partially or completely undo the effect of an earlier statement. The full declaration is evaluated by CollisionFilterManager::Apply().

#include <drake/geometry/collision_filter_declaration.h>

## Public Member Functions

CollisionFilterDeclaration ()=default

Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
CollisionFilterDeclaration (const CollisionFilterDeclaration &)=default

CollisionFilterDeclarationoperator= (const CollisionFilterDeclaration &)=default

CollisionFilterDeclaration (CollisionFilterDeclaration &&)=default

CollisionFilterDeclarationoperator= (CollisionFilterDeclaration &&)=default

Allowing pairs in consideration (removing collision filters)

These methods provide mechanisms which implicitly define a set of pairs and add each pair into the set of proximity query candidates C (see the documentation for CollisionFilterManager for definition of set C).

Each method provides the definition for the set of pairs.

SceneGraph maintains some invariants about pairs which will never be considered in proximity queries (the sets Aₚ × Aₚ, Fₚ, or Iₚ – again see CollisionFilterManager for explanation of those sets). If any pair in those sets are included in declarations which allow collisions, those pairs will simply be ignored.

The declared pairs can be invalid (e.g., containing GeometryId values that aren't part of the SceneGraph data). This will only be detected when applying the declaration (see CollisionFilterManager::Apply()).

CollisionFilterDeclarationAllowBetween (const GeometrySet &set_A, const GeometrySet &set_B)
Allows geometry pairs in proximity evaluation by updating the candidate pair set C ← C ⋃ P*, where P = {(a, b)}, ∀ a ∈ A, b ∈ B, a ≠ b and A = {a₀, a₁, ..., aₘ} and B = {b₀, b₁, ..., bₙ} are the input sets of geometries set_A and set_B, respectively. More...

CollisionFilterDeclarationAllowWithin (const GeometrySet &geometry_set)
Allows geometry pairs in proximity evaluation by updating the candidate pair set C ← C ⋃ P*, where P = {(gᵢ, gⱼ)}, ∀ gᵢ, gⱼ ∈ G, i ≠ j and G = {g₀, g₁, ..., gₘ} is the input geometry_set of geometries. More...

Excluding pairs from consideration (adding collision filters)

These methods provide mechanisms which implicitly define a set of pairs and subtracts each implied pair from the set of proximity query candidates C (see the documentation for CollisionFilterManager for definition of set C).

The documentation of each method explains the relationship between the input parameters and the set of implied geometry pairs.

The declared pairs can be invalid (e.g., containing GeometryId values that aren't part of the SceneGraph data). This will only be detected when applying the declaration (see CollisionFilterManager::Apply()).

CollisionFilterDeclarationExcludeBetween (GeometrySet set_A, GeometrySet set_B)
Excludes geometry pairs from proximity evaluation by updating the candidate pair set C ← C - P, where P = {(a, b)}, ∀ a ∈ A, b ∈ B and A = {a₀, a₁, ..., aₘ} and B = {b₀, b₁, ..., bₙ} are the input sets of geometries set_A and set_B, respectively. More...

CollisionFilterDeclarationExcludeWithin (GeometrySet geometry_set)
Excludes geometry pairs from proximity evaluation by updating the candidate pair set C ← C - P, where P = {(gᵢ, gⱼ)}, ∀ gᵢ, gⱼ ∈ G and G = {g₀, g₁, ..., gₘ} is the input geometry_set of geometries. More...

## Friends

class CollisionFilterDeclTester

class internal::CollisionFilter

## ◆ CollisionFilterDeclaration() [1/3]

 CollisionFilterDeclaration ( const CollisionFilterDeclaration & )
default

## ◆ CollisionFilterDeclaration() [2/3]

 CollisionFilterDeclaration ( CollisionFilterDeclaration && )
default

## ◆ CollisionFilterDeclaration() [3/3]

 CollisionFilterDeclaration ( )
default

## ◆ AllowBetween()

 CollisionFilterDeclaration& AllowBetween ( const GeometrySet & set_A, const GeometrySet & set_B )

Allows geometry pairs in proximity evaluation by updating the candidate pair set C ← C ⋃ P*, where P = {(a, b)}, ∀ a ∈ A, b ∈ B, a ≠ b and A = {a₀, a₁, ..., aₘ} and B = {b₀, b₁, ..., bₙ} are the input sets of geometries set_A and set_B, respectively.

Where P* = P - (Aₚ × Aₚ) - Fₚ - Iₚ, the set of pairs after we remove the SceneGraph-mandated invariants (see CollisionFilterManager for details on those invariants).

To be explicit, in contrast to AllowWithin, this does not clear filters between members of the same set (e.g., (aᵢ, aⱼ) or (bᵢ, bⱼ)).

## ◆ AllowWithin()

 CollisionFilterDeclaration& AllowWithin ( const GeometrySet & geometry_set )

Allows geometry pairs in proximity evaluation by updating the candidate pair set C ← C ⋃ P*, where P = {(gᵢ, gⱼ)}, ∀ gᵢ, gⱼ ∈ G, i ≠ j and G = {g₀, g₁, ..., gₘ} is the input geometry_set of geometries.

Where P* = P - (Aₚ × Aₚ) - Fₚ - Iₚ, the set of pairs after we remove the SceneGraph-mandated invariants (see CollisionFilterManager for details on those invariants).

## ◆ ExcludeBetween()

 CollisionFilterDeclaration& ExcludeBetween ( GeometrySet set_A, GeometrySet set_B )

Excludes geometry pairs from proximity evaluation by updating the candidate pair set C ← C - P, where P = {(a, b)}, ∀ a ∈ A, b ∈ B and A = {a₀, a₁, ..., aₘ} and B = {b₀, b₁, ..., bₙ} are the input sets of geometries set_A and set_B, respectively.

## ◆ ExcludeWithin()

 CollisionFilterDeclaration& ExcludeWithin ( GeometrySet geometry_set )

Excludes geometry pairs from proximity evaluation by updating the candidate pair set C ← C - P, where P = {(gᵢ, gⱼ)}, ∀ gᵢ, gⱼ ∈ G and G = {g₀, g₁, ..., gₘ} is the input geometry_set of geometries.

## ◆ operator=() [1/2]

 CollisionFilterDeclaration& operator= ( CollisionFilterDeclaration && )
default

## ◆ operator=() [2/2]

 CollisionFilterDeclaration& operator= ( const CollisionFilterDeclaration & )
default

## ◆ CollisionFilterDeclTester

 friend class CollisionFilterDeclTester
friend

## ◆ internal::CollisionFilter

 friend class internal::CollisionFilter
friend

The documentation for this class was generated from the following file: