8 #include <base/Pose.hpp>
9 #include <maps/grid/Index.hpp>
10 #include <sbpl_spline_primitives/SbplSplineMotionPrimitives.hpp>
24 std::vector<base::Pose2D>
poses;
90 std::vector<std::vector<Motion> > thetaToMotion;
91 std::vector<Motion> idToMotion;
92 sbpl_spline_primitives::SbplSplineMotionPrimitives primitives;
99 PreComputedMotions(
const sbpl_spline_primitives::SplinePrimitivesConfig& primitiveConfig,
104 double obstGridResolution,
double travGridResolution);
106 void computeMotions(
double obstGridResolution,
double travGridResolution);
116 const sbpl_spline_primitives::SbplSplineMotionPrimitives&
getPrimitives()
const;
122 void sampleOnResolution(
double gridResolution, base::geometry::Spline2 spline, std::vector< ugv_nav4d::PoseWithCell >& result, std::vector< ugv_nav4d::CellWithPoses >& fullResult);
127 void computeSplinePrimCost(
const sbpl_spline_primitives::SplinePrimitive& prim,
Definition: DiscreteTheta.hpp:7
Definition: PreComputedMotions.hpp:29
int xDiff
Definition: PreComputedMotions.hpp:47
Motion(unsigned int numAngles=0)
Definition: PreComputedMotions.hpp:43
std::vector< PoseWithCell > intermediateStepsTravMap
Definition: PreComputedMotions.hpp:59
Type type
Definition: PreComputedMotions.hpp:52
Type
Definition: PreComputedMotions.hpp:36
@ MOV_POINTTURN
Definition: PreComputedMotions.hpp:39
@ MOV_BACKWARD
Definition: PreComputedMotions.hpp:38
@ MOV_LATERAL
Definition: PreComputedMotions.hpp:40
@ MOV_FORWARD
Definition: PreComputedMotions.hpp:37
static double costScaleFactor
Definition: PreComputedMotions.hpp:34
static int calculateCost(double translationalDist, double angularDist, double translationVelocity, double angularVelocity, double costMultiplier)
Definition: PreComputedMotions.cpp:296
DiscreteTheta endTheta
Definition: PreComputedMotions.hpp:49
std::vector< CellWithPoses > fullSplineSamples
Definition: PreComputedMotions.hpp:76
int baseCost
Definition: PreComputedMotions.hpp:78
DiscreteTheta startTheta
Definition: PreComputedMotions.hpp:50
double translationlDist
Definition: PreComputedMotions.hpp:80
int yDiff
Definition: PreComputedMotions.hpp:48
double angularDist
Definition: PreComputedMotions.hpp:81
size_t id
Definition: PreComputedMotions.hpp:83
std::vector< PoseWithCell > intermediateStepsObstMap
Definition: PreComputedMotions.hpp:66
int costMultiplier
Definition: PreComputedMotions.hpp:79
Definition: PreComputedMotions.hpp:88
void setMotionForTheta(const Motion &motion, const DiscreteTheta &theta)
Definition: PreComputedMotions.cpp:190
static double calculateCurvatureFromRadius(const double r)
Definition: PreComputedMotions.cpp:329
void readMotionPrimitives(const sbpl_spline_primitives::SbplSplineMotionPrimitives &primGen, const Mobility &mobilityConfig, double obstGridResolution, double travGridResolution)
Definition: PreComputedMotions.cpp:92
void preComputeCost(Motion &motion)
const Motion & getMotion(std::size_t id) const
Definition: PreComputedMotions.cpp:319
const sbpl_spline_primitives::SbplSplineMotionPrimitives & getPrimitives() const
Definition: PreComputedMotions.cpp:324
void computeMotions(double obstGridResolution, double travGridResolution)
Definition: PreComputedMotions.cpp:20
const std::vector< Motion > & getMotionForStartTheta(const DiscreteTheta &theta) const
Definition: PreComputedMotions.cpp:358
PreComputedMotions(const sbpl_spline_primitives::SplinePrimitivesConfig &primitiveConfig, const Mobility &mobilityConfig)
Definition: PreComputedMotions.cpp:12
Definition: Dijkstra.cpp:8
Definition: PreComputedMotions.hpp:22
maps::grid::Index cell
Definition: PreComputedMotions.hpp:23
std::vector< base::Pose2D > poses
Definition: PreComputedMotions.hpp:24
Definition: Mobility.hpp:12
Definition: PreComputedMotions.hpp:16
maps::grid::Index cell
Definition: PreComputedMotions.hpp:18
base::Pose2D pose
Definition: PreComputedMotions.hpp:17