UFO 1.0.0
An Efficient Probabilistic 3D Mapping Framework That Embraces the Unknown
Loading...
Searching...
No Matches
ufo::NavMap< Dim > Class Template Reference

Classes

struct  Path
 

Public Types

using const_iterator = typename TreeMap< Dim, node_t >::const_iterator
 
using Coord = Vec< Dim, float >
 
using edge_t = std::uint32_t
 
using iterator = typename TreeMap< Dim, node_t >::iterator
 
using node_t = std::uint32_t
 

Public Member Functions

int addBiEdge (node_t node_1, node_t node_2, float cost, float distance)
 
int addBiEdge (node_t node_1, node_t node_2, float cost=0.0f)
 
int addBiEdge (node_t node_1, node_t node_2, float cost_1, float cost_2, float distance_1, float distance_2)
 
bool addEdge (node_t start, node_t end, float cost, float distance)
 
bool addEdge (node_t start, node_t end, float cost=0.0f)
 
node_t addNode (Coord const &position, float cost)
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
void clear ()
 
Coord const & coord (node_t node) const
 
float & cost (node_t node)
 
float cost (node_t node) const
 
float & cost (node_t node, node_t neighbor)
 
float cost (node_t node, node_t neighbor) const
 
float & distance (node_t node, node_t neighbor)
 
float distance (node_t node, node_t neighbor) const
 
iterator end ()
 
const_iterator end () const
 
int eraseBiEdge (node_t node_1, node_t node_2)
 
bool eraseEdge (node_t start, node_t end)
 
bool eraseNode (node_t const &node)
 
template<class Geometry >
std::vector< node_t > intersectingNodes (Geometry const &geometry) const
 
bool isNeighbor (node_t node, node_t neighbor) const
 
template<class Geometry >
std::vector< node_t > kNearestNodes (Geometry const &geometry, unsigned k) const
 
std::vector< node_t > kNearestNodes (node_t node, unsigned k) const
 
template<class Geometry >
node_t nearestNode (Geometry const &geometry) const
 
node_t nearestNode (node_t node) const
 
std::vector< node_t > neighbors (node_t node) const
 
std::size_t numEdges () const
 
std::size_t numNeighbors (node_t node) const
 
std::size_t numNodes () const
 
template<class CostFun >
Path plan (node_t start, node_t goal, CostFun cost_f, float heuristic_weight=1.0f) const
 
template<class CostFun , class HeuristicFun >
Path plan (node_t start, node_t goal, CostFun cost_f, HeuristicFun heuristic_f) const
 
Path plan (node_t start, node_t goal, float distance_weight=1.0f, float edge_cost_weight=1.0f, float node_cost_weight=1.0f, float heuristic_weight=1.0f) const
 
template<class CostFun , class HeuristicFun >
Path plan (std::vector< node_t > const &starts, node_t const &goal, CostFun cost_f, HeuristicFun heuristic_f) const
 
template<class CostFun >
Path plan (std::vector< node_t > const &starts, node_t goal, CostFun cost_f, float heuristic_weight=1.0f) const
 
Path plan (std::vector< node_t > const &starts, node_t goal, float distance_weight=1.0f, float edge_cost_weight=1.0f, float node_cost_weight=1.0f, float heuristic_weight=1.0f) const
 
template<class Map >
void update (Map const &map, float robot_radius)
 
template<class Map >
void updateModified (Map const &map)
 
bool validNode (node_t node) const
 

Static Public Attributes

static constexpr float const NULL_COST = std::numeric_limits<float>::infinity()
 
static constexpr float const NULL_DISTANCE = std::numeric_limits<float>::infinity()
 
static constexpr edge_t const NULL_EDGE = std::numeric_limits<edge_t>::max()
 
static constexpr node_t const NULL_NODE = std::numeric_limits<node_t>::max()
 

Detailed Description

template<std::size_t Dim = 3>
class ufo::NavMap< Dim >

Definition at line 22 of file nav_map.hpp.

Member Typedef Documentation

◆ const_iterator

template<std::size_t Dim = 3>
using ufo::NavMap< Dim >::const_iterator = typename TreeMap<Dim, node_t>::const_iterator

Definition at line 70 of file nav_map.hpp.

◆ Coord

template<std::size_t Dim = 3>
using ufo::NavMap< Dim >::Coord = Vec<Dim, float>

Definition at line 25 of file nav_map.hpp.

◆ edge_t

template<std::size_t Dim = 3>
using ufo::NavMap< Dim >::edge_t = std::uint32_t

Definition at line 28 of file nav_map.hpp.

◆ iterator

template<std::size_t Dim = 3>
using ufo::NavMap< Dim >::iterator = typename TreeMap<Dim, node_t>::iterator

Definition at line 69 of file nav_map.hpp.

◆ node_t

template<std::size_t Dim = 3>
using ufo::NavMap< Dim >::node_t = std::uint32_t

Definition at line 27 of file nav_map.hpp.

Member Function Documentation

◆ addBiEdge() [1/3]

template<std::size_t Dim = 3>
int ufo::NavMap< Dim >::addBiEdge ( node_t  node_1,
node_t  node_2,
float  cost,
float  distance 
)
inline

Definition at line 411 of file nav_map.hpp.

◆ addBiEdge() [2/3]

template<std::size_t Dim = 3>
int ufo::NavMap< Dim >::addBiEdge ( node_t  node_1,
node_t  node_2,
float  cost = 0.0f 
)
inline

Definition at line 404 of file nav_map.hpp.

◆ addBiEdge() [3/3]

template<std::size_t Dim = 3>
int ufo::NavMap< Dim >::addBiEdge ( node_t  node_1,
node_t  node_2,
float  cost_1,
float  cost_2,
float  distance_1,
float  distance_2 
)
inline

Definition at line 418 of file nav_map.hpp.

◆ addEdge() [1/2]

template<std::size_t Dim = 3>
bool ufo::NavMap< Dim >::addEdge ( node_t  start,
node_t  end,
float  cost,
float  distance 
)
inline

Definition at line 392 of file nav_map.hpp.

◆ addEdge() [2/2]

template<std::size_t Dim = 3>
bool ufo::NavMap< Dim >::addEdge ( node_t  start,
node_t  end,
float  cost = 0.0f 
)
inline

Definition at line 385 of file nav_map.hpp.

◆ addNode()

template<std::size_t Dim = 3>
node_t ufo::NavMap< Dim >::addNode ( Coord const &  position,
float  cost 
)
inline

Definition at line 339 of file nav_map.hpp.

◆ begin() [1/2]

template<std::size_t Dim = 3>
iterator ufo::NavMap< Dim >::begin ( )
inline

Definition at line 613 of file nav_map.hpp.

◆ begin() [2/2]

template<std::size_t Dim = 3>
const_iterator ufo::NavMap< Dim >::begin ( ) const
inline

Definition at line 617 of file nav_map.hpp.

◆ cbegin()

template<std::size_t Dim = 3>
const_iterator ufo::NavMap< Dim >::cbegin ( ) const
inline

Definition at line 621 of file nav_map.hpp.

◆ cend()

template<std::size_t Dim = 3>
const_iterator ufo::NavMap< Dim >::cend ( ) const
inline

Definition at line 623 of file nav_map.hpp.

◆ clear()

template<std::size_t Dim = 3>
void ufo::NavMap< Dim >::clear ( )
inline

Definition at line 256 of file nav_map.hpp.

◆ coord()

template<std::size_t Dim = 3>
Coord const & ufo::NavMap< Dim >::coord ( node_t  node) const
inline

Definition at line 293 of file nav_map.hpp.

◆ cost() [1/4]

template<std::size_t Dim = 3>
float & ufo::NavMap< Dim >::cost ( node_t  node)
inline

Definition at line 299 of file nav_map.hpp.

◆ cost() [2/4]

template<std::size_t Dim = 3>
float ufo::NavMap< Dim >::cost ( node_t  node) const
inline

Definition at line 305 of file nav_map.hpp.

◆ cost() [3/4]

template<std::size_t Dim = 3>
float & ufo::NavMap< Dim >::cost ( node_t  node,
node_t  neighbor 
)
inline

Definition at line 311 of file nav_map.hpp.

◆ cost() [4/4]

template<std::size_t Dim = 3>
float ufo::NavMap< Dim >::cost ( node_t  node,
node_t  neighbor 
) const
inline

Definition at line 318 of file nav_map.hpp.

◆ distance() [1/2]

template<std::size_t Dim = 3>
float & ufo::NavMap< Dim >::distance ( node_t  node,
node_t  neighbor 
)
inline

Definition at line 325 of file nav_map.hpp.

◆ distance() [2/2]

template<std::size_t Dim = 3>
float ufo::NavMap< Dim >::distance ( node_t  node,
node_t  neighbor 
) const
inline

Definition at line 332 of file nav_map.hpp.

◆ end() [1/2]

template<std::size_t Dim = 3>
iterator ufo::NavMap< Dim >::end ( )
inline

Definition at line 615 of file nav_map.hpp.

◆ end() [2/2]

template<std::size_t Dim = 3>
const_iterator ufo::NavMap< Dim >::end ( ) const
inline

Definition at line 619 of file nav_map.hpp.

◆ eraseBiEdge()

template<std::size_t Dim = 3>
int ufo::NavMap< Dim >::eraseBiEdge ( node_t  node_1,
node_t  node_2 
)
inline

Definition at line 540 of file nav_map.hpp.

◆ eraseEdge()

template<std::size_t Dim = 3>
bool ufo::NavMap< Dim >::eraseEdge ( node_t  start,
node_t  end 
)
inline

Definition at line 517 of file nav_map.hpp.

◆ eraseNode()

template<std::size_t Dim = 3>
bool ufo::NavMap< Dim >::eraseNode ( node_t const &  node)
inline

Definition at line 348 of file nav_map.hpp.

◆ intersectingNodes()

template<std::size_t Dim = 3>
template<class Geometry >
std::vector< node_t > ufo::NavMap< Dim >::intersectingNodes ( Geometry const &  geometry) const
inline

Definition at line 604 of file nav_map.hpp.

◆ isNeighbor()

template<std::size_t Dim = 3>
bool ufo::NavMap< Dim >::isNeighbor ( node_t  node,
node_t  neighbor 
) const
inline

Definition at line 630 of file nav_map.hpp.

◆ kNearestNodes() [1/2]

template<std::size_t Dim = 3>
template<class Geometry >
std::vector< node_t > ufo::NavMap< Dim >::kNearestNodes ( Geometry const &  geometry,
unsigned  k 
) const
inline

Definition at line 588 of file nav_map.hpp.

◆ kNearestNodes() [2/2]

template<std::size_t Dim = 3>
std::vector< node_t > ufo::NavMap< Dim >::kNearestNodes ( node_t  node,
unsigned  k 
) const
inline

Definition at line 569 of file nav_map.hpp.

◆ nearestNode() [1/2]

template<std::size_t Dim = 3>
template<class Geometry >
node_t ufo::NavMap< Dim >::nearestNode ( Geometry const &  geometry) const
inline

Definition at line 561 of file nav_map.hpp.

◆ nearestNode() [2/2]

template<std::size_t Dim = 3>
node_t ufo::NavMap< Dim >::nearestNode ( node_t  node) const
inline

Definition at line 548 of file nav_map.hpp.

◆ neighbors()

template<std::size_t Dim = 3>
std::vector< node_t > ufo::NavMap< Dim >::neighbors ( node_t  node) const
inline

Definition at line 279 of file nav_map.hpp.

◆ numEdges()

template<std::size_t Dim = 3>
std::size_t ufo::NavMap< Dim >::numEdges ( ) const
inline

Definition at line 638 of file nav_map.hpp.

◆ numNeighbors()

template<std::size_t Dim = 3>
std::size_t ufo::NavMap< Dim >::numNeighbors ( node_t  node) const
inline

Definition at line 267 of file nav_map.hpp.

◆ numNodes()

template<std::size_t Dim = 3>
std::size_t ufo::NavMap< Dim >::numNodes ( ) const
inline

Definition at line 636 of file nav_map.hpp.

◆ plan() [1/6]

template<std::size_t Dim = 3>
template<class CostFun >
Path ufo::NavMap< Dim >::plan ( node_t  start,
node_t  goal,
CostFun  cost_f,
float  heuristic_weight = 1.0f 
) const
inline

Definition at line 98 of file nav_map.hpp.

◆ plan() [2/6]

template<std::size_t Dim = 3>
template<class CostFun , class HeuristicFun >
Path ufo::NavMap< Dim >::plan ( node_t  start,
node_t  goal,
CostFun  cost_f,
HeuristicFun  heuristic_f 
) const
inline

Definition at line 117 of file nav_map.hpp.

◆ plan() [3/6]

template<std::size_t Dim = 3>
Path ufo::NavMap< Dim >::plan ( node_t  start,
node_t  goal,
float  distance_weight = 1.0f,
float  edge_cost_weight = 1.0f,
float  node_cost_weight = 1.0f,
float  heuristic_weight = 1.0f 
) const
inline

Definition at line 72 of file nav_map.hpp.

◆ plan() [4/6]

template<std::size_t Dim = 3>
template<class CostFun , class HeuristicFun >
Path ufo::NavMap< Dim >::plan ( std::vector< node_t > const &  starts,
node_t const &  goal,
CostFun  cost_f,
HeuristicFun  heuristic_f 
) const
inline

Definition at line 125 of file nav_map.hpp.

◆ plan() [5/6]

template<std::size_t Dim = 3>
template<class CostFun >
Path ufo::NavMap< Dim >::plan ( std::vector< node_t > const &  starts,
node_t  goal,
CostFun  cost_f,
float  heuristic_weight = 1.0f 
) const
inline

Definition at line 106 of file nav_map.hpp.

◆ plan() [6/6]

template<std::size_t Dim = 3>
Path ufo::NavMap< Dim >::plan ( std::vector< node_t > const &  starts,
node_t  goal,
float  distance_weight = 1.0f,
float  edge_cost_weight = 1.0f,
float  node_cost_weight = 1.0f,
float  heuristic_weight = 1.0f 
) const
inline

Definition at line 81 of file nav_map.hpp.

◆ update()

template<std::size_t Dim = 3>
template<class Map >
void ufo::NavMap< Dim >::update ( Map const &  map,
float  robot_radius 
)
inline

Definition at line 210 of file nav_map.hpp.

◆ updateModified()

template<std::size_t Dim = 3>
template<class Map >
void ufo::NavMap< Dim >::updateModified ( Map const &  map)
inline

Definition at line 251 of file nav_map.hpp.

◆ validNode()

template<std::size_t Dim = 3>
bool ufo::NavMap< Dim >::validNode ( node_t  node) const
inline

Definition at line 625 of file nav_map.hpp.

Member Data Documentation

◆ NULL_COST

template<std::size_t Dim = 3>
constexpr float const ufo::NavMap< Dim >::NULL_COST = std::numeric_limits<float>::infinity()
staticconstexpr

Definition at line 32 of file nav_map.hpp.

◆ NULL_DISTANCE

template<std::size_t Dim = 3>
constexpr float const ufo::NavMap< Dim >::NULL_DISTANCE = std::numeric_limits<float>::infinity()
staticconstexpr

Definition at line 33 of file nav_map.hpp.

◆ NULL_EDGE

template<std::size_t Dim = 3>
constexpr edge_t const ufo::NavMap< Dim >::NULL_EDGE = std::numeric_limits<edge_t>::max()
staticconstexpr

Definition at line 31 of file nav_map.hpp.

◆ NULL_NODE

template<std::size_t Dim = 3>
constexpr node_t const ufo::NavMap< Dim >::NULL_NODE = std::numeric_limits<node_t>::max()
staticconstexpr

Definition at line 30 of file nav_map.hpp.


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