graphical exception [temporary solution]
performance fixes minor changes
This commit is contained in:
@@ -20,7 +20,7 @@ private:
|
||||
|
||||
const Grid<Node>& grid;
|
||||
Dijkstra<Node> dijkstra;
|
||||
const DijkstraNode<Node>* dnDest;
|
||||
const DijkstraNode<Node>* dnDest = nullptr;
|
||||
|
||||
struct DijkstraAccess {
|
||||
const Grid<Node>& grid;
|
||||
@@ -58,9 +58,14 @@ public:
|
||||
|
||||
/** get the shortest path from the given start to the configured destination */
|
||||
DijkstraPath<Node> getShortestPath(const Node& start) {
|
||||
|
||||
// destination unknown? -> empty path
|
||||
if (!dnDest) {return DijkstraPath<Node>();}
|
||||
|
||||
const DijkstraNode<Node>* dnStart = dijkstra.getNode(start);
|
||||
const DijkstraPath<Node> path(dnStart, dnDest);
|
||||
return path;
|
||||
|
||||
}
|
||||
|
||||
virtual void updateBefore(WalkState& state, const Node& startNode) override {
|
||||
|
||||
@@ -14,7 +14,7 @@ template <typename Node, typename WalkState, typename Control> class WalkModuleH
|
||||
private:
|
||||
|
||||
/** CURRENTLY NOT USED van-Mises distribution */
|
||||
Distribution::LUT<double> dist;
|
||||
Distribution::LUT<float> dist;
|
||||
|
||||
/** random noise */
|
||||
Distribution::Normal<float> distNoise;
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
|
||||
/** ctor 3.0 should be OK! */
|
||||
WalkModuleHeadingControl(const Control* ctrl, const float sensorNoiseDegreesSigma) :
|
||||
dist(Distribution::VonMises<double>(0.0f, 2.0).getLUT()),
|
||||
dist(Distribution::VonMises<float>(0.0f, 2.0f).getLUT()),
|
||||
distNoise(0, Angle::degToRad(sensorNoiseDegreesSigma)),
|
||||
ctrl(ctrl) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user