struct mrpt::nav::TWaypointStatusSequence

The struct for querying the status of waypoints navigation.

Used in CWaypointsNavigator::getWaypointNavStatus().

#include <mrpt/nav/reactive/TWaypoint.h>

struct TWaypointStatusSequence
{
    //
fields

    std::vector<TWaypointStatus> waypoints;
    mrpt::system::TTimeStamp timestamp_nav_started;
    bool final_goal_reached {false};
    int waypoint_index_current_goal {-1};
    mrpt::math::TPose2D last_robot_pose;

    //
methods

    std::string getAsText() const;
    void getAsOpenglVisualization(mrpt::opengl::CSetOfObjects& obj, const mrpt::nav::TWaypointsRenderingParams& params = mrpt::nav::TWaypointsRenderingParams()) const;
};

Fields

std::vector<TWaypointStatus> waypoints

Waypoints parameters and status (reached, skipped, etc.)

mrpt::system::TTimeStamp timestamp_nav_started

Timestamp of user navigation command.

bool final_goal_reached {false}

Whether the final waypoint has been reached successfuly.

int waypoint_index_current_goal {-1}

Index in waypoints of the waypoint the navigator is currently trying to reach.

This will point to the last waypoint after navigation ends successfully. Its value is -1 if navigation has not started yet

mrpt::math::TPose2D last_robot_pose

Robot pose at last time step (has INVALID_NUM fields upon initialization)

Methods

std::string getAsText() const

Gets navigation params as a human-readable format.

void getAsOpenglVisualization(mrpt::opengl::CSetOfObjects& obj, const mrpt::nav::TWaypointsRenderingParams& params = mrpt::nav::TWaypointsRenderingParams()) const

Renders the sequence of waypoints (previous contents of obj are cleared)