Roomba Controller Dashboard 1
A GUI and TCP client application that is used to control a Roomba for Computer Engineering 2880 @ Iowa State
Loading...
Searching...
No Matches
HoleManager Class Reference

#include <HoleManager.hpp>

Public Member Functions

 HoleManager ()
 
void addPoint (const Pose2D &position)
 
Hole getHole (uint8_t index)
 
void addHole (const Hole &hole)
 
void addHole (const Pose2D &cornerOne, const Pose2D &cornerTwo)
 
std::vector< HolegetHoles ()
 
std::vector< Pose2DgetPointsOnHoles ()
 
std::vector< Pose2DgetSuggestedNodePlacements ()
 
bool nodeCollides (Pose2D position)
 
bool lineIntersectsAnyHoleMeasurement (const Pose2D &positionOne, const Pose2D &positionTwo)
 
void offsetAll (const Pose2D &offset) const
 

Detailed Description

A hole manager handles holes that and the measurments that are associated with them. Wrapped class for lists of holes

Definition at line 18 of file HoleManager.hpp.

Constructor & Destructor Documentation

◆ HoleManager()

HoleManager::HoleManager ( )

Creats a new Hole manager

Created by Caleb Kugel 11/15/2024

Definition at line 9 of file HoleManager.cpp.

Member Function Documentation

◆ addHole() [1/2]

void HoleManager::addHole ( const Hole & hole)

Adds a hole to the holes

Parameters
holeto add

Definition at line 19 of file HoleManager.cpp.

◆ addHole() [2/2]

void HoleManager::addHole ( const Pose2D & cornerOne,
const Pose2D & cornerTwo )

Adds a hole to the hole manager

Parameters
cornerOnethe first Corner
cornerTwothe second Corner

Definition at line 14 of file HoleManager.cpp.

◆ addPoint()

void HoleManager::addPoint ( const Pose2D & position)

Adds a point that we collided on the hole with

Parameters
positionthe position of the collision

Definition at line 40 of file HoleManager.cpp.

◆ getHole()

Hole HoleManager::getHole ( uint8_t index)

get a hole from registered holes

Parameters
indexof the hole in the holes list
Returns
the hole that has been registered

Definition at line 23 of file HoleManager.cpp.

◆ getHoles()

std::vector< Hole > HoleManager::getHoles ( )

get the holes that we for sure know about

Definition at line 32 of file HoleManager.cpp.

◆ getPointsOnHoles()

std::vector< Pose2D > HoleManager::getPointsOnHoles ( )

get the points along unconfirmed holes

◆ getSuggestedNodePlacements()

std::vector< Pose2D > HoleManager::getSuggestedNodePlacements ( )

returns a list of likely accessible nodes

Definition at line 80 of file HoleManager.cpp.

◆ lineIntersectsAnyHoleMeasurement()

bool HoleManager::lineIntersectsAnyHoleMeasurement ( const Pose2D & positionOne,
const Pose2D & positionTwo )

Determines whether a line is valid for all the hole measurements

Definition at line 94 of file HoleManager.cpp.

◆ nodeCollides()

bool HoleManager::nodeCollides ( Pose2D position)

Whether a node collides with the estimated hole or not

Parameters
positionthe position of the node
Returns
whether that node is valid from a hole perspective

Definition at line 56 of file HoleManager.cpp.

◆ offsetAll()

void HoleManager::offsetAll ( const Pose2D & offset) const

provides the offset to all holes and their values

Definition at line 117 of file HoleManager.cpp.


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