Struct LatticeMotionTable

Struct Documentation

struct LatticeMotionTable

A table of motion primitives and related functions.

Public Functions

inline LatticeMotionTable()

A constructor for nav2_smac_planner::LatticeMotionTable.

void initMotionModel(unsigned int &size_x_in, SearchInfo &search_info)

Initializing state lattice planner’s motion model.

Parameters:
  • size_x_in – Size of costmap in X

  • search_info – Parameters for searching

MotionPrimitivePtrs getMotionPrimitives(const NodeLattice *node)

Get projections of motion models.

Parameters:

node – Ptr to NodeLattice

Returns:

A set of motion poses

unsigned int getClosestAngularBin(const double &theta)

Get the angular bin to use from a raw orientation.

Parameters:

theta – Angle in radians

Returns:

bin index of closest angle to request

float &getAngleFromBin(const unsigned int &bin_idx)

Get the raw orientation from an angular bin.

Parameters:

bin_idx – Index of the bin

Returns:

Raw orientation in radians

Public Members

unsigned int size_x
unsigned int num_angle_quantization
float change_penalty
float non_straight_penalty
float cost_penalty
float reverse_penalty
float travel_distance_reward
float rotation_penalty
bool allow_reverse_expansion
std::vector<std::vector<MotionPrimitive>> motion_primitives
ompl::base::StateSpacePtr state_space
std::vector<TrigValues> trig_values
std::string current_lattice_filepath
LatticeMetadata lattice_metadata

Public Static Functions

static LatticeMetadata getLatticeMetadata(const std::string &lattice_filepath)

Get file metadata needed.

Parameters:

lattice_filepath – Filepath to the lattice file

Returns:

A set of metadata containing the number of angular bins and the global coordinates minimum turning radius of the primitives for use in analytic expansion and heuristic calculation.