Function mav_trajectory_generation::createRandomVertices

Function Documentation

Vertex::Vector mav_trajectory_generation::createRandomVertices(int maximum_derivative, size_t n_segments, const Eigen::VectorXd &minimum_position, const Eigen::VectorXd &maximum_position, size_t seed = 0)

Creates random vertices for position within minimum_position and maximum_position.

Vertices at the beginning and end have only fixed constraints with their derivative set to zero, while all vertices in between have position as fixed constraint and the derivatives are left free. Input: maximum_derivative = The maximum derivative to be set to zero for beginning and end. Input: n_segments = Number of segments of the resulting trajectory. Number of vertices is n_segments + 1. Input: minimum_position = Minimum position of the space to sample. Input: maximum_position = Maximum position of the space to sample. Input: seed = Initial seed for random number generation. Output: return = Vector containing n_segments + 1 vertices.