Class conflict_checker

Nested Relationships

Nested Types

Class Documentation

class conflict_checker

Checker for various kinds of spatial conflicts in the arena. Prior to creating this class, the checking functions were scattered all over in various utils:: namespaces. Much better to have them all centralized.

Public Types

using map_cb_type = std::function<status(const crepr::sim_block3D *const block, const rmath::vector2d &loc)>

Public Functions

conflict_checker(conflict_checker&&) = delete
conflict_checker(const conflict_checker&) = delete
conflict_checker &operator=(conflict_checker&&) = delete
const conflict_checker &operator=(const conflict_checker&) = delete

Public Static Functions

static status placement2D(const carena::base_arena_map *map, const crepr::sim_block3D *block, const rmath::vector2d &loc)

Check for conflict if the specified block is placed at the specified location in the arena.

The following are checked:

  • Within arena distributable area (not near boundaries, which can causing problems with robot block acquisition).

  • Overlap with all other blocks.

  • Overlap with all nests.

static status placement2D(const carena::caching_arena_map *map, const crepr::sim_block3D *block, const rmath::vector2d &loc)

Check for conflict if the specified block is placed at the specified location in the arena.

The following are checked:

  • Within arena distributable area (not near boundaries, which can causing problems with robot block acquisition).

  • Overlap with all other blocks.

  • Overlap with all nests.

  • Overlap with all caches.

static status placement2D(const rmath::vector2d &ent1_anchor, const rmath::vector2d &ent1_dims, const crepr::entity2D *ent2)

Determine if an entity anchored at ent1_anchor with dimensions ent1_dims overlaps 2D entity ent2.

static status placement2D(const rmath::vector2d &ent1_anchor, const rmath::vector2d &ent1_dims, const crepr::entity3D *entity)

Determine if an entity anchored at ent1_anchor with dimensions ent1_dims overlaps 3D entity ent2.

struct status

Public Functions

inline status &operator|=(const status &other)

Public Members

bool x = {false}
bool y = {false}