Fawkes API
Fawkes Development Version
clusters_distance_cost_constraint.h
1
/***************************************************************************
2
* clusters_static_cost_constraint.h - distance-based cost factor for
3
* blocked edges
4
*
5
* Created: Sat Jul 19 21:17:20 2014
6
* Copyright 2014 Tim Niemueller
7
****************************************************************************/
8
9
/* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU Library General Public License for more details.
18
*
19
* Read the full text in the LICENSE.GPL file in the doc directory.
20
*/
21
22
#ifndef _NAVGRAPH_CLUSTERS_CLUSTERS_DISTANCE_COST_CONSTRAINT_H_
23
#define _NAVGRAPH_CLUSTERS_CLUSTERS_DISTANCE_COST_CONSTRAINT_H_
24
25
#include <navgraph/constraints/edge_cost_constraint.h>
26
27
#include <Eigen/Geometry>
28
#include <list>
29
#include <string>
30
#include <tuple>
31
32
class
NavGraphClustersThread
;
33
34
class
NavGraphClustersDistanceCostConstraint
:
public
fawkes::NavGraphEdgeCostConstraint
35
{
36
public
:
37
NavGraphClustersDistanceCostConstraint
(
const
char
*
name
,
38
NavGraphClustersThread
*parent,
39
float
cost_min,
40
float
cost_max,
41
float
dist_min,
42
float
dist_max);
43
virtual
~NavGraphClustersDistanceCostConstraint
();
44
45
virtual
bool
compute
(
void
)
throw
();
46
virtual
float
cost_factor
(
const
fawkes::NavGraphNode
&from,
47
const
fawkes::NavGraphNode
&to)
throw
();
48
49
private
:
50
NavGraphClustersThread
* parent_;
51
float
cost_min_;
52
float
cost_max_;
53
float
cost_span_;
54
float
dist_min_;
55
float
dist_max_;
56
float
dist_span_;
57
bool
valid_;
58
std::list<std::tuple<std::string, std::string, Eigen::Vector2f>> blocked_;
59
Eigen::Vector2f pose_;
60
};
61
62
#endif
fawkes::NavGraphNode
Definition:
navgraph_node.h:38
NavGraphClustersDistanceCostConstraint
Definition:
clusters_distance_cost_constraint.h:33
NavGraphClustersDistanceCostConstraint::cost_factor
virtual float cost_factor(const fawkes::NavGraphNode &from, const fawkes::NavGraphNode &to)
Definition:
clusters_distance_cost_constraint.cpp:85
NavGraphClustersDistanceCostConstraint::compute
virtual bool compute(void)
Perform compuations before graph search and to indicate re-planning.
Definition:
clusters_distance_cost_constraint.cpp:77
NavGraphClustersThread
Definition:
navgraph_clusters_thread.h:46
fawkes::NavGraphEdgeCostConstraint
Definition:
edge_cost_constraint.h:36
NavGraphClustersDistanceCostConstraint::NavGraphClustersDistanceCostConstraint
NavGraphClustersDistanceCostConstraint(const char *name, NavGraphClustersThread *parent, float cost_min, float cost_max, float dist_min, float dist_max)
Constructor.
Definition:
clusters_distance_cost_constraint.cpp:45
fawkes::NavGraphEdgeCostConstraint::name
std::string name()
Get name of constraint.
Definition:
edge_cost_constraint.cpp:82
NavGraphClustersDistanceCostConstraint::~NavGraphClustersDistanceCostConstraint
virtual ~NavGraphClustersDistanceCostConstraint()
Virtual empty destructor.
Definition:
clusters_distance_cost_constraint.cpp:72
src
plugins
navgraph-clusters
clusters_distance_cost_constraint.h
Generated by
1.8.16