moveit.core.collision_detection

Classes

AllowedCollisionMatrix

Definition of a structure for the allowed collision matrix.

CollisionRequest

Representation of a collision checking request.

CollisionResult

Representation of a collision checking result.

class moveit.core.collision_detection.AllowedCollisionMatrix

Definition of a structure for the allowed collision matrix. All elements in the collision world are referred to by their names. This class represents which collisions are allowed to happen and which are not.

clear()

Clear the allowed collision matrix.

get_entry()

Get the allowed collision entry for a pair of objects.

Parameters:
  • name1 (str) – The name of the first object.

  • name2 (str) – The name of the second object.

Returns:

(bool, str) – Whether the collision is allowed and the type of allowed collision.

remove_entry()

Remove an entry corresponding to a pair of elements. Nothing happens if the pair does not exist in the collision matrix.

Parameters:
  • name1 (str) – The name of the first object.

  • name2 (str) – The name of the second object.

set_entry()

Set the allowed collision state between two objects.

Parameters:
  • name1 (str) – The name of the first object.

  • name2 (str) – The name of the second object.

  • allowed (bool) – If true, indicates that the collision between the two objects is allowed. If false, indicates that the collision between the two objects is not allowed.

class moveit.core.collision_detection.CollisionRequest

Representation of a collision checking request.

property contacts

If true, compute contacts.

Type:

bool

property cost

If true, a collision cost is computed.

Type:

bool

property distance

If true, compute proximity distance.

Type:

bool

property joint_model_group_name

The group name to check collisions for (optional; if empty, assume the complete robot)

Type:

str

property max_contacts

Overall maximum number of contacts to compute.

Type:

int

property max_contacts_per_pair

Maximum number of contacts to compute per pair of bodies (multiple bodies may be in contact at different configurations).

Type:

int

property max_cost_sources

When costs are computed, this value defines how many of the top cost sources should be returned.

Type:

int

property verbose

Flag indicating whether information about detected collisions should be reported.

Type:

bool

class moveit.core.collision_detection.CollisionResult

Representation of a collision checking result.

property collision

True if collision was found, false otherwise.

Type:

bool

property contact_count

Number of contacts returned.

Type:

int

property contacts

A dict returning the pairs of ids of the bodies in contact, plus information about the contacts themselves.

Type:

dict

property cost_sources

The individual cost sources from computed costs.

Type:

dict

property distance

Closest distance between two bodies.

Type:

float