GT RoboCup SSL
Soccer software, robot firmware
|
Class which represents a Path with an angle Function attached. More...
Public Member Functions | |
AngleFunctionPath (std::unique_ptr< Path > path=nullptr, std::optional< std::function< AngleInstant(MotionInstant)>> angleFunction=std::nullopt) | |
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 void | draw (DebugDrawer *const debug_drawer, const QColor &color=Qt::black, const QString &layer="Motion") 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 > | subPath (RJ::Seconds startTime=RJ::Seconds::zero(), RJ::Seconds endTime=RJ::Seconds::max()) const override |
Returns a subPath. More... | |
virtual RobotInstant | start () const override |
Start instant of the path. | |
virtual RobotInstant | end () const override |
Destination instant of the path. | |
virtual std::unique_ptr< Path > | clone () const override |
Returns a deep copy of the Path. | |
virtual RJ::Time | startTime () const override |
The time the path starts at. | |
virtual void | setStartTime (RJ::Time t) override |
virtual void | setDebugText (QString string) override |
virtual void | drawDebugText (DebugDrawer *debug_drawer, const QColor &color=Qt::darkCyan, const QString &layer="PathDebugText") const override |
Public Member Functions inherited from Planning::Path | |
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 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()) |
Public Attributes | |
std::unique_ptr< Path > | path |
std::optional< std::function< AngleInstant(MotionInstant)> > | angleFunction |
Protected Member Functions | |
virtual std::optional< RobotInstant > | eval (RJ::Seconds t) const override |
This method evaluates the path at a given time and returns the target position and velocity of the robot. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Planning::Path | |
double | evalRate = 1.0 |
RJ::Time | _startTime |
std::optional< QString > | _debugText |
Class which represents a Path with an angle Function attached.
|
inlineoverridevirtual |
Draws the path.
The default implementation adds a DebugRobotPath to the SystemState that interpolates points along the path.
debug_drawer | The SystemState to draw the path on |
color | The color the path should be drawn |
layer | The layer to draw the path on |
Reimplemented from Planning::Path.
|
inlineoverrideprotectedvirtual |
This method evaluates the path at a given time and returns the target position and velocity of the robot.
t | Time (in seconds) since the robot started the path. Throws an exception if t<0 |
Implements Planning::Path.
|
inlineoverridevirtual |
Returns how long it would take for the entire path to be traversed.
Implements Planning::Path.
|
inlineoverridevirtual |
Returns true if the path hits an obstacle.
[in] | shape | The obstacles on the field |
[out] | hitTime | the approximate time when the path hits an obstacle. If no obstacles are hit, behavior is undefined for the final value. |
[in] | startTimeIntoPath | The time on the path to start checking from |
Implements Planning::Path.
|
inlineoverridevirtual |
Returns a subPath.
startTime | The startTime for from which the subPath should be taken. |
endTime | The endTime from which the subPath should be taken. If it is greater than the duration fo the path, it should go to the end of the path. |
Implements Planning::Path.