Fawkes API
Fawkes Development Version
clusters_static_cost_constraint.h
1
/***************************************************************************
2
* clusters_static_cost_constraint.h - static cost factor for blocked edges
3
*
4
* Created: Fri Jul 18 22:36:37 2014
5
* Copyright 2014 Tim Niemueller
6
****************************************************************************/
7
8
/* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU Library General Public License for more details.
17
*
18
* Read the full text in the LICENSE.GPL file in the doc directory.
19
*/
20
21
#ifndef __NAVGRAPH_CLUSTERS_CLUSTERS_STATIC_COST_CONSTRAINT_H_
22
#define __NAVGRAPH_CLUSTERS_CLUSTERS_STATIC_COST_CONSTRAINT_H_
23
24
#include <navgraph/constraints/edge_cost_constraint.h>
25
26
#include <list>
27
#include <string>
28
29
class
NavGraphClustersThread
;
30
31
class
NavGraphClustersStaticCostConstraint
:
public
fawkes::NavGraphEdgeCostConstraint
32
{
33
public
:
34
NavGraphClustersStaticCostConstraint
(
const
char
*
name
,
NavGraphClustersThread
*parent,
35
float
cost_factor
);
36
virtual
~NavGraphClustersStaticCostConstraint
();
37
38
virtual
bool
compute
(
void
)
throw
();
39
virtual
float
cost_factor
(
const
fawkes::NavGraphNode
&from,
40
const
fawkes::NavGraphNode
&to)
throw
();
41
42
private
:
43
NavGraphClustersThread
*parent_;
44
float
cost_factor_;
45
std::list<std::pair<std::string, std::string>> blocked_;
46
47
};
48
49
#endif
NavGraphClustersStaticCostConstraint::NavGraphClustersStaticCostConstraint
NavGraphClustersStaticCostConstraint(const char *name, NavGraphClustersThread *parent, float cost_factor)
Constructor.
Definition:
clusters_static_cost_constraint.cpp:34
fawkes::NavGraphEdgeCostConstraint
Constraint that can be queried for an edge cost factor.
Definition:
edge_cost_constraint.h:36
NavGraphClustersStaticCostConstraint
Constraint apply a static cost factor to blocked edges.
Definition:
clusters_static_cost_constraint.h:31
NavGraphClustersStaticCostConstraint::~NavGraphClustersStaticCostConstraint
virtual ~NavGraphClustersStaticCostConstraint()
Virtual empty destructor.
Definition:
clusters_static_cost_constraint.cpp:45
NavGraphClustersThread
Block navgraph paths based on laser clusters.
Definition:
navgraph_clusters_thread.h:48
NavGraphClustersStaticCostConstraint::cost_factor
virtual float cost_factor(const fawkes::NavGraphNode &from, const fawkes::NavGraphNode &to)
Get cost factor for given edge.
Definition:
clusters_static_cost_constraint.cpp:59
fawkes::NavGraphNode
Topological graph node.
Definition:
navgraph_node.h:38
NavGraphClustersStaticCostConstraint::compute
virtual bool compute(void)
Perform compuations before graph search and to indicate re-planning.
Definition:
clusters_static_cost_constraint.cpp:51
fawkes::NavGraphEdgeCostConstraint::name
std::string name()
Get name of constraint.
Definition:
edge_cost_constraint.cpp:85
src
plugins
navgraph-clusters
clusters_static_cost_constraint.h
Generated by
1.8.13