8 namespace HybridAStar {
35 float getX()
const {
return x; }
37 float getY()
const {
return y; }
39 float getT()
const {
return t; }
41 float getG()
const {
return g; }
43 float getH()
const {
return h; }
59 void setX(
const float&
x) { this->x =
x; }
61 void setY(
const float&
y) { this->y =
y; }
63 void setT(
const float&
t) { this->t =
t; }
65 void setG(
const float&
g) { this->g =
g; }
67 void setH(
const float&
h) { this->h =
h; }
69 int setIdx(
int width,
int height) { this->
idx = (int)(
t / Constants::deltaHeadingRad) * width * height + (int)(
y) * width + (int)(
x);
return idx;}
93 bool isOnGrid(
const int width,
const int height)
const;
103 static const float dx[];
105 static const float dy[];
107 static const float dt[];
float y
the y position
Definition: node3d.h:113
int setIdx(int width, int height)
set and get the index of the node in the 3D grid
Definition: node3d.h:69
const Node3D * getPred() const
determine whether the node is open
Definition: node3d.h:55
bool isInRange(const Node3D &goal) const
Determines whether it is appropriate to find a analytical solution.
Definition: node3d.cpp:38
A three dimensional node class that is at the heart of the algorithm.
Definition: node3d.h:14
void setPred(const Node3D *pred)
set a pointer to the predecessor of the node
Definition: node3d.h:77
float getX() const
get the x position
Definition: node3d.h:35
float h
the cost-to-go
Definition: node3d.h:119
float getC() const
get the total estimated cost
Definition: node3d.h:45
This is a collection of constants that are used throughout the project.
bool isOnGrid(const int width, const int height) const
Validity check to test, whether the node is in the 3D array.
Definition: node3d.cpp:30
float getH() const
get the cost-to-come (heuristic value)
Definition: node3d.h:43
float g
the cost-so-far
Definition: node3d.h:117
bool isOpen() const
determine whether the node is open
Definition: node3d.h:51
void setY(const float &y)
set the y position
Definition: node3d.h:61
void updateG()
Updates the cost-so-far for the node x' coming from its predecessor. It also discovers the node...
Definition: node3d.cpp:73
static const float dt[]
Possible movements regarding heading theta.
Definition: node3d.h:107
Node3D(float x, float y, float t, float g, float h, const Node3D *pred, int prim=0)
Constructor for a node with the given arguments.
Definition: node3d.h:20
int prim
the motion primitive of the node
Definition: node3d.h:127
const Node3D * pred
the predecessor pointer
Definition: node3d.h:129
Node3D * createSuccessor(const int i)
Creates a successor in the continous space.
Definition: node3d.cpp:48
void setH(const float &h)
set the cost-to-come (heuristic value)
Definition: node3d.h:67
void setX(const float &x)
set the x position
Definition: node3d.h:59
void setT(const float &t)
set the heading theta
Definition: node3d.h:63
void close()
close the node
Definition: node3d.h:75
void open()
open the node
Definition: node3d.h:73
bool isClosed() const
determine whether the node is closed
Definition: node3d.h:53
float t
the heading theta
Definition: node3d.h:115
bool operator==(const Node3D &rhs) const
Custom operator to compare nodes. Nodes are equal if their x and y position as well as heading is sim...
Definition: node3d.cpp:297
bool o
the open value
Definition: node3d.h:123
static const float dx[]
Possible movements in the x direction.
Definition: node3d.h:103
float getY() const
get the y position
Definition: node3d.h:37
static const float dy[]
Possible movements in the y direction.
Definition: node3d.h:105
void setG(const float &g)
set the cost-so-far (real value)
Definition: node3d.h:65
int getIdx() const
get the index of the node in the 3D array
Definition: node3d.h:47
float getG() const
get the cost-so-far (real value)
Definition: node3d.h:41
float getT() const
get the heading theta
Definition: node3d.h:39
int idx
the index of the node in the 3D array
Definition: node3d.h:121
float x
the x position
Definition: node3d.h:111
static const int dir
Number of possible directions.
Definition: node3d.h:101
bool c
the closed value
Definition: node3d.h:125
int getPrim() const
get the number associated with the motion primitive of the node
Definition: node3d.h:49
Node3D()
The default constructor for 3D array initialization.
Definition: node3d.h:18
void setPrim(const int &prim)
set the primitive
Definition: node3d.h:71
This is a collection of helper functions that are used throughout the project.