struct mrpt::nav::CAbstractHolonomicReactiveMethod::NavInput

Overview

Input parameters for CAbstractHolonomicReactiveMethod::navigate()

#include <mrpt/nav/holonomic/CAbstractHolonomicReactiveMethod.h>

struct NavInput
{
    // fields

    std::vector<double> obstacles;
    std::vector<mrpt::math::TPoint2D> targets;
    double maxRobotSpeed {1.0};
    double maxObstacleDist {1.0};
    const mrpt::nav::ClearanceDiagram* clearance {nullptr};

    // construction

    NavInput();
};

Fields

std::vector<double> obstacles

Distance to obstacles in polar coordinates, relative to the robot.

First index refers to -PI direction, and last one to +PI direction. Distances can be dealed as “meters”, although when used inside the PTG-based navigation system, they are “pseudometers”, normalized to the range [0,1].

std::vector<mrpt::math::TPoint2D> targets

Relative location (x,y) of target point(s).

In the same units than obstacles. If many, last targets have higher priority.

double maxRobotSpeed {1.0}

Maximum robot speed, in the same units than obstacles, per second.

double maxObstacleDist {1.0}

Maximum expected value to be found in obstacles.

Typically, values in obstacles larger or equal to this value mean there is no visible obstacle in that direction.

const mrpt::nav::ClearanceDiagram* clearance {nullptr}

The computed clearance for each direction (optional in some implementations).

Leave to default (NULL) if not needed.