HOG2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ArmToArmHeuristic Class Reference

#include <RoboticArm.h>

Inheritance diagram for ArmToArmHeuristic:
Inheritance graph
[legend]
Collaboration diagram for ArmToArmHeuristic:
Collaboration graph
[legend]

Public Member Functions

 ArmToArmHeuristic (RoboticArm *r, armAngles &initial, bool optimize=false)
 
virtual ~ArmToArmHeuristic ()
 
double HCost (const armAngles &node1, const armAngles &node2) const
 
void AddDiffTable ()
 
bool IsLegalState (armAngles &arm)
 
const std::vector< armAngles > & GetTipPositions (double x, double y)
 
- Public Member Functions inherited from RoboticArmHeuristic
virtual ~RoboticArmHeuristic ()
 

Private Member Functions

armAngles SelectStartNode ()
 
int TipPositionIndex (const double x, const double y, const double minX=-1.0, const double minY=-1.0, const double width=2.0)
 
void GenerateLegalStates (armAngles &init)
 

Private Attributes

bool optimizeLocations
 
RoboticArmra
 
std::vector< std::vector< uint16_t > > distances
 
std::vector< armAnglescanonicalStates
 
std::vector< std::vector< armAngles > > tipPositionTables
 
std::vector< bool > legalStates
 

Detailed Description

Definition at line 166 of file RoboticArm.h.

Constructor & Destructor Documentation

◆ ArmToArmHeuristic()

ArmToArmHeuristic::ArmToArmHeuristic ( RoboticArm r,
armAngles initial,
bool  optimize = false 
)

Definition at line 1235 of file RoboticArm.cpp.

References GenerateLegalStates(), optimizeLocations, and ra.

◆ ~ArmToArmHeuristic()

virtual ArmToArmHeuristic::~ArmToArmHeuristic ( )
inlinevirtual

Definition at line 169 of file RoboticArm.h.

Member Function Documentation

◆ AddDiffTable()

void ArmToArmHeuristic::AddDiffTable ( )

◆ GenerateLegalStates()

void ArmToArmHeuristic::GenerateLegalStates ( armAngles init)
private

◆ GetTipPositions()

const std::vector<armAngles>& ArmToArmHeuristic::GetTipPositions ( double  x,
double  y 
)
inline

Definition at line 173 of file RoboticArm.h.

References TipPositionIndex(), and tipPositionTables.

◆ HCost()

double ArmToArmHeuristic::HCost ( const armAngles node1,
const armAngles node2 
) const
virtual

Implements RoboticArmHeuristic.

Definition at line 1242 of file RoboticArm.cpp.

References distances, RoboticArm::GetStateHash(), armAngles::IsGoalState(), max, and ra.

◆ IsLegalState()

bool ArmToArmHeuristic::IsLegalState ( armAngles arm)

Definition at line 1361 of file RoboticArm.cpp.

References RoboticArm::GetStateHash(), legalStates, and ra.

Referenced by SelectStartNode().

◆ SelectStartNode()

armAngles ArmToArmHeuristic::SelectStartNode ( )
private

◆ TipPositionIndex()

int ArmToArmHeuristic::TipPositionIndex ( const double  x,
const double  y,
const double  minX = -1.0,
const double  minY = -1.0,
const double  width = 2.0 
)
private

Definition at line 1262 of file RoboticArm.cpp.

References RoboticArm::GetTolerance(), ra, and width.

Referenced by GenerateLegalStates(), and GetTipPositions().

Member Data Documentation

◆ canonicalStates

std::vector<armAngles> ArmToArmHeuristic::canonicalStates
private

Definition at line 184 of file RoboticArm.h.

Referenced by AddDiffTable(), and SelectStartNode().

◆ distances

std::vector<std::vector<uint16_t> > ArmToArmHeuristic::distances
private

Definition at line 183 of file RoboticArm.h.

Referenced by AddDiffTable(), HCost(), and SelectStartNode().

◆ legalStates

std::vector<bool> ArmToArmHeuristic::legalStates
private

Definition at line 186 of file RoboticArm.h.

Referenced by GenerateLegalStates(), and IsLegalState().

◆ optimizeLocations

bool ArmToArmHeuristic::optimizeLocations
private

Definition at line 181 of file RoboticArm.h.

Referenced by ArmToArmHeuristic(), and SelectStartNode().

◆ ra

RoboticArm* ArmToArmHeuristic::ra
private

◆ tipPositionTables

std::vector<std::vector<armAngles> > ArmToArmHeuristic::tipPositionTables
private

Definition at line 185 of file RoboticArm.h.

Referenced by GenerateLegalStates(), and GetTipPositions().


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