ugv_nav4d
|
#include <EnvironmentXYZTheta.hpp>
Classes | |
struct | Distance |
struct | EnvironmentXYZThetaException |
struct | Hash |
struct | PlannerData |
struct | ThetaNode |
Public Types | |
typedef traversability_generator3d::TraversabilityGenerator3d::MLGrid | MLGrid |
Public Member Functions | |
bool | obstacleCheck (const maps::grid::Vector3d &pos, double theta, const ObstacleMapGenerator3D &obsGen, const traversability_generator3d::TraversabilityConfig &travConf, const sbpl_spline_primitives::SplinePrimitivesConfig &splineConf, const std::string &nodeName="node") |
EnvironmentXYZTheta (std::shared_ptr< MLGrid > mlsGrid, const traversability_generator3d::TraversabilityConfig &travConf, const sbpl_spline_primitives::SplinePrimitivesConfig &primitiveConfig, const Mobility &mobilityConfig) | |
virtual | ~EnvironmentXYZTheta () |
void | updateMap (std::shared_ptr< MLGrid > mlsGrid) |
void | setInitialPatch (const Eigen::Affine3d &ground2Mls, double patchRadius) |
virtual bool | InitializeEnv (const char *sEnvFile) |
virtual bool | InitializeMDPCfg (MDPConfig *MDPCfg) |
void | expandMap (const std::vector< Eigen::Vector3d > &positions) |
std::shared_ptr< trajectory_follower::SubTrajectory > | findTrajectoryOutOfObstacle (const Eigen::Vector3d &start, double theta, const Eigen::Affine3d &ground2Body) |
virtual int | GetFromToHeuristic (int FromStateID, int ToStateID) |
heuristic estimate from state FromStateID to state ToStateID More... | |
virtual int | GetStartHeuristic (int stateID) |
heuristic estimate from start state to state with stateID More... | |
virtual int | GetGoalHeuristic (int stateID) |
heuristic estimate from state with stateID to goal state More... | |
virtual void | GetPreds (int TargetStateID, std::vector< int > *PredIDV, std::vector< int > *CostV) |
virtual void | GetSuccs (int SourceStateID, std::vector< int > *SuccIDV, std::vector< int > *CostV) |
virtual void | GetSuccs (int SourceStateID, std::vector< int > *SuccIDV, std::vector< int > *CostV, std::vector< size_t > &motionIdV) |
virtual void | PrintEnv_Config (FILE *fOut) |
virtual void | PrintState (int stateID, bool bVerbose, FILE *fOut=0) |
virtual void | SetAllActionsandAllOutcomes (CMDPSTATE *state) |
virtual void | SetAllPreds (CMDPSTATE *state) |
virtual int | SizeofCreatedEnv () |
void | setStart (const Eigen::Vector3d &startPos, double theta) |
void | setGoal (const Eigen::Vector3d &goalPos, double theta) |
maps::grid::Vector3d | getStatePosition (const int stateID) const |
const Motion & | getMotion (const int fromStateID, const int toStateID) |
const maps::grid::TraversabilityMap3d< traversability_generator3d::TravGenNode * > & | getTraversabilityMap () const |
const maps::grid::TraversabilityMap3d< traversability_generator3d::TravGenNode * > & | getObstacleMap () const |
traversability_generator3d::TraversabilityGenerator3d & | getTravGen () |
traversability_generator3d::TraversabilityGenerator3d & | getObstacleGen () |
const MLGrid & | getMlsMap () const |
std::vector< Motion > | getMotions (const std::vector< int > &stateIDPath) |
void | getTrajectory (const std::vector< int > &stateIDPath, std::vector< trajectory_follower::SubTrajectory > &result, bool setZToZero, const Eigen::Vector3d &startPos, const Eigen::Vector3d &goalPos, const double &goalHeading, const Eigen::Affine3d &plan2Body=Eigen::Affine3d::Identity()) |
const PreComputedMotions & | getAvailableMotions () const |
void | clear () |
void | setTravConfig (const traversability_generator3d::TraversabilityConfig &cfg) |
void | dijkstraComputeCost (const traversability_generator3d::TravGenNode *source, std::vector< double > &outDistances, const double maxDist) const |
void | enablePathStatistics (bool enable) |
Public Attributes | |
Eigen::Vector3d | robotHalfSize |
Protected Types | |
typedef maps::grid::TraversabilityNode< PlannerData > | XYZNode |
Protected Member Functions | |
ThetaNode * | createNewState (const DiscreteTheta &curTheta, EnvironmentXYZTheta::XYZNode *curNode) |
XYZNode * | createNewXYZState (traversability_generator3d::TravGenNode *travNode) |
ThetaNode * | createNewStateFromPose (const std::string &name, const Eigen::Vector3d &pos, double theta, ugv_nav4d::EnvironmentXYZTheta::XYZNode **xyzBackNode) |
bool | checkStartGoalNode (const std::string &name, traversability_generator3d::TravGenNode *node, double theta) |
traversability_generator3d::TravGenNode * | findObstacleNode (const traversability_generator3d::TravGenNode *travNode) const |
Protected Attributes | |
traversability_generator3d::TraversabilityGenerator3d | travGen |
ObstacleMapGenerator3D | obsGen |
std::shared_ptr< MLGrid > | mlsGrid |
maps::grid::TraversabilityMap3d< XYZNode * > | searchGrid |
std::vector< Hash > | idToHash |
std::vector< Distance > | travNodeIdToDistance |
PreComputedMotions | availableMotions |
ThetaNode * | startThetaNode |
XYZNode * | startXYZNode |
ThetaNode * | goalThetaNode |
XYZNode * | goalXYZNode |
traversability_generator3d::TravGenNode * | obstacleStartNode |
typedef traversability_generator3d::TraversabilityGenerator3d::MLGrid ugv_nav4d::EnvironmentXYZTheta::MLGrid |
|
protected |
A position on the traversability map
ugv_nav4d::EnvironmentXYZTheta::EnvironmentXYZTheta | ( | std::shared_ptr< MLGrid > | mlsGrid, |
const traversability_generator3d::TraversabilityConfig & | travConf, | ||
const sbpl_spline_primitives::SplinePrimitivesConfig & | primitiveConfig, | ||
const Mobility & | mobilityConfig | ||
) |
generateDebugData | If true, lots of debug information will becollected and stored in members starting with debug |
|
virtual |
|
protected |
void ugv_nav4d::EnvironmentXYZTheta::clear | ( | ) |
Clears the state of the environment. Clears everything except the mls map.
|
protected |
|
protected |
|
protected |
void ugv_nav4d::EnvironmentXYZTheta::dijkstraComputeCost | ( | const traversability_generator3d::TravGenNode * | source, |
std::vector< double > & | outDistances, | ||
const double | maxDist | ||
) | const |
maxDist | The value that should be used as maximum distance. This value is used for non-traversable nodes and for initialization. |
void ugv_nav4d::EnvironmentXYZTheta::enablePathStatistics | ( | bool | enable | ) |
Should a computationally expensive obstacle check be done to check whether the robot bounding box is in collision with obstacles. This mode is useful for highly cluttered and tight spaced environments
void ugv_nav4d::EnvironmentXYZTheta::expandMap | ( | const std::vector< Eigen::Vector3d > & | positions | ) |
Expand the underlying travmap and obstacle map starting from all given positions.
|
protected |
Find the obstacle node corresponding to travNode
std::shared_ptr< SubTrajectory > ugv_nav4d::EnvironmentXYZTheta::findTrajectoryOutOfObstacle | ( | const Eigen::Vector3d & | start, |
double | theta, | ||
const Eigen::Affine3d & | ground2Body | ||
) |
Returns the trajectory of least resistance to leave the obstacle.
start | start position that is inside an obstacle | |
theta | robot orientation | |
[out] | outNewStart | The new start position of the robot after it has moved out of the obstacle in the map frame |
const PreComputedMotions & ugv_nav4d::EnvironmentXYZTheta::getAvailableMotions | ( | ) | const |
|
virtual |
heuristic estimate from state FromStateID to state ToStateID
|
virtual |
heuristic estimate from state with stateID to goal state
const EnvironmentXYZTheta::MLGrid & ugv_nav4d::EnvironmentXYZTheta::getMlsMap | ( | ) | const |
const Motion & ugv_nav4d::EnvironmentXYZTheta::getMotion | ( | const int | fromStateID, |
const int | toStateID | ||
) |
returns the motion connection fromStateID
and toStateID
.
std::runtime_error | if no matching motion exists |
vector< Motion > ugv_nav4d::EnvironmentXYZTheta::getMotions | ( | const std::vector< int > & | stateIDPath | ) |
traversability_generator3d::TraversabilityGenerator3d & ugv_nav4d::EnvironmentXYZTheta::getObstacleGen | ( | ) |
const maps::grid::TraversabilityMap3d< traversability_generator3d::TravGenNode * > & ugv_nav4d::EnvironmentXYZTheta::getObstacleMap | ( | ) | const |
|
virtual |
|
virtual |
heuristic estimate from start state to state with stateID
maps::grid::Vector3d ugv_nav4d::EnvironmentXYZTheta::getStatePosition | ( | const int | stateID | ) | const |
|
virtual |
|
virtual |
void ugv_nav4d::EnvironmentXYZTheta::getTrajectory | ( | const std::vector< int > & | stateIDPath, |
std::vector< trajectory_follower::SubTrajectory > & | result, | ||
bool | setZToZero, | ||
const Eigen::Vector3d & | startPos, | ||
const Eigen::Vector3d & | goalPos, | ||
const double & | goalHeading, | ||
const Eigen::Affine3d & | plan2Body = Eigen::Affine3d::Identity() |
||
) |
const maps::grid::TraversabilityMap3d< traversability_generator3d::TravGenNode * > & ugv_nav4d::EnvironmentXYZTheta::getTraversabilityMap | ( | ) | const |
traversability_generator3d::TraversabilityGenerator3d & ugv_nav4d::EnvironmentXYZTheta::getTravGen | ( | ) |
|
virtual |
|
virtual |
bool ugv_nav4d::EnvironmentXYZTheta::obstacleCheck | ( | const maps::grid::Vector3d & | pos, |
double | theta, | ||
const ObstacleMapGenerator3D & | obsGen, | ||
const traversability_generator3d::TraversabilityConfig & | travConf, | ||
const sbpl_spline_primitives::SplinePrimitivesConfig & | splineConf, | ||
const std::string & | nodeName = "node" |
||
) |
pos | Position in map frame |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
void ugv_nav4d::EnvironmentXYZTheta::setGoal | ( | const Eigen::Vector3d & | goalPos, |
double | theta | ||
) |
void ugv_nav4d::EnvironmentXYZTheta::setInitialPatch | ( | const Eigen::Affine3d & | ground2Mls, |
double | patchRadius | ||
) |
void ugv_nav4d::EnvironmentXYZTheta::setStart | ( | const Eigen::Vector3d & | startPos, |
double | theta | ||
) |
void ugv_nav4d::EnvironmentXYZTheta::setTravConfig | ( | const traversability_generator3d::TraversabilityConfig & | cfg | ) |
|
virtual |
void ugv_nav4d::EnvironmentXYZTheta::updateMap | ( | std::shared_ptr< MLGrid > | mlsGrid | ) |
|
protected |
|
protected |
|
protected |
|
protected |
maps sbpl state ids to internal planner state (Hash).
|
protected |
|
protected |
|
protected |
Start node in obstacle map
Eigen::Vector3d ugv_nav4d::EnvironmentXYZTheta::robotHalfSize |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Contains the distance from each travNode to start-node and goal-node Stored in real-world coordinates (i.e. do NOT scale with gridResolution before use)