added interface for walkers
some new helper methods added interpolater for paths
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "../../math/Distributions.h"
|
||||
#include "../../nav/dijkstra/Dijkstra.h"
|
||||
|
||||
#include "GridWalk.h"
|
||||
#include "GridWalkState.h"
|
||||
#include "GridWalkHelper.h"
|
||||
|
||||
@@ -23,14 +24,14 @@
|
||||
* - adds additional randomness which should be more stable
|
||||
*
|
||||
*/
|
||||
template <typename T> class GridWalkRandomHeadingUpdateAdv {
|
||||
template <typename T> class GridWalkRandomHeadingUpdateAdv : public GridWalk<T> {
|
||||
|
||||
friend class GridWalkHelper;
|
||||
|
||||
private:
|
||||
|
||||
/** per-edge: change heading with this sigma */
|
||||
static constexpr float HEADING_CHANGE_SIGMA = Angle::degToRad(5);
|
||||
static constexpr float HEADING_CHANGE_SIGMA = Angle::degToRad(10);
|
||||
|
||||
/** fast random-number-generator */
|
||||
std::minstd_rand gen;
|
||||
@@ -45,7 +46,7 @@ public:
|
||||
;
|
||||
}
|
||||
|
||||
GridWalkState<T> getDestination(Grid<T>& grid, const GridWalkState<T> start, const float distance_m) {
|
||||
GridWalkState<T> getDestination(Grid<T>& grid, const GridWalkState<T> start, const float distance_m) override {
|
||||
|
||||
return GridWalkHelper::retryOrInvert(*this, 2, grid, start, distance_m);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user