7.1.1. collision_environment.CollisionEnvironment

class collision_environment.CollisionEnvironment(*args: Any, **kwargs: Any)

Bases: State

Deals with the MoveIt collision Environment.

It adds the object and the table to the MoveIt collision environment. The object is added as a box with the name ‘object’ and the same dimensions as the bounding box of the object. The table is added as a box with the name ‘table’ and the same dimensions as the bounding box of the table. It also adds a floor plane to filter weird octomap points in the floor that prevent the robot from moving because of ‘collisions’ with the floor.

Parameters:
  • grasp_object_bb (BoundingBox3D) – The bounding box of the object to grasp.

  • table_bbs (BoundingBox3DArray) – The bounding boxes of the detected planes. The first one is considered the actual table.

Returns:

grasp_object_name_moveit – The name of the object in the MoveIt collision environment. Currently set to ‘object’, but might be changed in the future (and be an actual variable), hence the output key.

Return type:

str

__init__()

Initializes the CollisionEnvironment state.

It creates a MoveitWrapper object and detaches all objects from the robot’s end effector. It also adds a floor plane to filter weird octomap points in the floor that prevent the robot from moving because of ‘collisions’ with the floor.

Methods

__init__()

Initializes the CollisionEnvironment state.

add_floor_plane()

Adds a floor plane to the MoveIt collision environment centered at the robot's current position.

execute(userdata)

Adds the object and the table to the MoveIt collision environment.

add_floor_plane()

Adds a floor plane to the MoveIt collision environment centered at the robot’s current position.

This is necessary to filter weird octomap points in the floor that prevent the robot from moving because of ‘collisions’ with the floor.

execute(userdata)

Adds the object and the table to the MoveIt collision environment.