Class FMT::Motion

Nested Relationships

This class is a nested type of Class FMT.

Class Documentation

class Motion

Representation of a motion.

Public Types

enum SetType

The FMT* planner begins with all nodes included in set Unvisited “Waiting for optimal connection”. As nodes are connected to the tree, they are transferred into set Open “Horizon of explored tree.” Once a node in Open is no longer close enough to the frontier to connect to any more nodes in Unvisited, it is removed from Open. These three SetTypes are flags indicating which set the node belongs to; Open, Unvisited, or Closed (neither)

Values:

enumerator SET_CLOSED
enumerator SET_OPEN
enumerator SET_UNVISITED

Public Functions

Motion() = default
inline Motion(const base::SpaceInformationPtr &si)

Constructor that allocates memory for the state.

~Motion() = default
inline void setState(base::State *state)

Set the state associated with the motion.

inline base::State *getState() const

Get the state associated with the motion.

inline void setParent(Motion *parent)

Set the parent motion of the current motion.

inline Motion *getParent() const

Get the parent motion of the current motion.

inline void setCost(const base::Cost cost)

Set the cost-to-come for the current motion.

inline base::Cost getCost() const

Get the cost-to-come for the current motion.

inline void setSetType(const SetType currentSet)

Specify the set that this motion belongs to.

inline SetType getSetType() const

Get the set that this motion belongs to.

inline bool alreadyCC(Motion *m)

Returns true if the connection to m has been already tested and failed because of a collision.

inline void addCC(Motion *m)

Caches a failed collision check to m.

inline void setHeuristicCost(const base::Cost h)

Set the cost to go heuristic cost.

inline base::Cost getHeuristicCost() const

Get the cost to go heuristic cost.

inline std::vector<Motion*> &getChildren()

Get the children of the motion.

Protected Attributes

base::State *state_ = {nullptr}

The state contained by the motion.

Motion *parent_ = {nullptr}

The parent motion in the exploration tree.

base::Cost cost_ = {0.}

The cost of this motion.

base::Cost hcost_ = {0.}

The minimum cost to go of this motion (heuristically computed)

SetType currentSet_ = {SET_UNVISITED}

The flag indicating which set a motion belongs to.

std::set<Motion*> collChecksDone_

Contains the connections attempted FROM this node.

std::vector<Motion*> children_

The set of motions descending from the current motion.