|
| InterpolatedPath () |
| default path is empty
|
|
| InterpolatedPath (Geometry2d::Point p0) |
| constructor with a single point
|
|
| InterpolatedPath (Geometry2d::Point p0, Geometry2d::Point p1) |
| constructor from two points
|
|
void | addInstant (RJ::Seconds time, MotionInstant instant) |
| Adds an instant at the end of the path for the given time. More...
|
|
virtual RobotInstant | start () const override |
| Start instant of the path.
|
|
virtual RobotInstant | end () const override |
| Destination instant of the path.
|
|
virtual bool | hit (const Geometry2d::ShapeSet &obstacles, RJ::Seconds startTimeIntoPath, RJ::Seconds *hitTime) const override |
| Returns true if the path hits an obstacle. More...
|
|
virtual std::unique_ptr< Path > | subPath (RJ::Seconds startTime=RJ::Seconds::zero(), RJ::Seconds endTime=RJ::Seconds::max()) const override |
| Returns a subPath. More...
|
|
virtual void | draw (DebugDrawer *constdebug_drawer, const QColor &color, const QString &layer) const override |
| Draws the path. More...
|
|
virtual RJ::Seconds | getDuration () const override |
| Returns how long it would take for the entire path to be traversed. More...
|
|
virtual std::unique_ptr< Path > | clone () const override |
| Returns a deep copy of the Path.
|
|
bool | empty () const |
|
void | clear () |
| Erase all path contents.
|
|
float | length (unsigned int start=0) const |
| Calulates the length of the path. More...
|
|
float | length (unsigned int start, unsigned int end) const |
| Calulates the length of the path. More...
|
|
float | length (Geometry2d::Point pt) const |
| Returns the length of the path from the closet point found to pt.
|
|
size_t | size () const |
| Returns number of waypoints.
|
|
int | nearestIndex (Geometry2d::Point pt) const |
|
Geometry2d::Segment | nearestSegment (Geometry2d::Point pt) const |
| returns the nearest segement of pt to the path
|
|
float | distanceTo (Geometry2d::Point pt) const |
|
RJ::Seconds | getTime (int index) const |
| Estimates how long it would take for the robot to get to a certain point in the path using Trapezoidal motion. More...
|
|
| Path (RJ::Time startTime=RJ::now()) |
|
std::optional< RobotInstant > | evaluate (RJ::Seconds t) const |
| This method evaluates the path at a given time and returns the target angle, position, and velocity of the robot. More...
|
|
RJ::Seconds | getSlowedDuration () const |
|
virtual void | setDebugText (QString string) |
|
virtual void | drawDebugText (DebugDrawer *debug_drawer, const QColor &color=Qt::darkCyan, const QString &layer="PathDebugText") const |
|
virtual RJ::Time | startTime () const |
| The time the path starts at.
|
|
virtual void | setStartTime (RJ::Time t) |
|
virtual bool | pathsIntersect (const std::vector< DynamicObstacle > &paths, RJ::Time startTime, Geometry2d::Point *hitLocation, RJ::Seconds *hitTime) const |
|
virtual std::unique_ptr< ConstPathIterator > | iterator (RJ::Time startTime, RJ::Seconds deltaT) const |
|
void | slow (float multiplier, RJ::Seconds timeInto=RJ::Seconds::zero()) |
|
Represents a motion path as a series of {pos, vel} pairs.
The path represents a function of position given time that the robot should follow. A line-segment-based path comes from the planner, then we use cubic bezier curves to interpolate and smooth it out. This is done via the evaulate() method.