PathPlannerLib
Loading...
Searching...
No Matches
pathplanner::EventMarker Class Reference

Public Member Functions

 EventMarker (std::string triggerName, double waypointRelativePos, double endWaypointRelativePos, frc2::CommandPtr &&command)
 
 EventMarker (std::string triggerName, double waypointRelativePos, double endWaypointRelativePos)
 
 EventMarker (std::string triggerName, double waypointRelativePos, frc2::CommandPtr &&command)
 
 EventMarker (std::string triggerName, double waypointRelativePos)
 
 EventMarker (std::string triggerName, double waypointRelativePos, double endWaypointRelativePos, std::shared_ptr< frc2::Command > command)
 
 EventMarker (std::string triggerName, double waypointRelativePos, std::shared_ptr< frc2::Command > command)
 
std::shared_ptr< frc2::Command > getCommand () const
 
constexpr double getWaypointRelativePos () const
 
constexpr double getEndWaypointRelativePos () const
 
constexpr const std::string & getTriggerName ()
 

Static Public Member Functions

static EventMarker fromJson (const wpi::json &json)
 

Constructor & Destructor Documentation

◆ EventMarker() [1/6]

pathplanner::EventMarker::EventMarker ( std::string  triggerName,
double  waypointRelativePos,
double  endWaypointRelativePos,
frc2::CommandPtr &&  command 
)
inline

Create a new event marker

Parameters
triggerNameThe name of the trigger this event marker will control
waypointRelativePosThe waypoint relative position of the marker
endWaypointRelativePosThe end waypoint relative position of the event's zone. A value of -1.0 indicates that this event is not zoned.
commandThe command that should be triggered at this marker

◆ EventMarker() [2/6]

pathplanner::EventMarker::EventMarker ( std::string  triggerName,
double  waypointRelativePos,
double  endWaypointRelativePos 
)
inline

Create a new event marker

Parameters
triggerNameThe name of the trigger this event marker will control
waypointRelativePosThe waypoint relative position of the marker
endWaypointRelativePosThe end waypoint relative position of the event's zone. A value of -1.0 indicates that this event is not zoned.

◆ EventMarker() [3/6]

pathplanner::EventMarker::EventMarker ( std::string  triggerName,
double  waypointRelativePos,
frc2::CommandPtr &&  command 
)
inline

Create a new event marker

Parameters
triggerNameThe name of the trigger this event marker will control
waypointRelativePosThe waypoint relative position of the marker
commandThe command that should be triggered at this marker

◆ EventMarker() [4/6]

pathplanner::EventMarker::EventMarker ( std::string  triggerName,
double  waypointRelativePos 
)
inline

Create a new event marker

Parameters
triggerNameThe name of the trigger this event marker will control
waypointRelativePosThe waypoint relative position of the marker

◆ EventMarker() [5/6]

pathplanner::EventMarker::EventMarker ( std::string  triggerName,
double  waypointRelativePos,
double  endWaypointRelativePos,
std::shared_ptr< frc2::Command >  command 
)
inline

Create a new event marker

Parameters
triggerNameThe name of the trigger this event marker will control
waypointRelativePosThe waypoint relative position of the marker
endWaypointRelativePosThe end waypoint relative position of the event's zone. A value of -1.0 indicates that this event is not zoned.
commandThe command that should be triggered at this marker

◆ EventMarker() [6/6]

pathplanner::EventMarker::EventMarker ( std::string  triggerName,
double  waypointRelativePos,
std::shared_ptr< frc2::Command >  command 
)
inline

Create a new event marker

Parameters
triggerNameThe name of the trigger this event marker will control
waypointRelativePosThe waypoint relative position of the marker
commandThe command that should be triggered at this marker

Member Function Documentation

◆ fromJson()

EventMarker EventMarker::fromJson ( const wpi::json &  json)
static

Create an event marker from json

Parameters
jsonjson reference representing an event marker
Returns
The event marker defined by the given json object

◆ getCommand()

std::shared_ptr< frc2::Command > pathplanner::EventMarker::getCommand ( ) const
inline

Get the command associated with this marker

Returns
Command for this marker

◆ getEndWaypointRelativePos()

constexpr double pathplanner::EventMarker::getEndWaypointRelativePos ( ) const
inlineconstexpr

Get the waypoint relative position of the end of this event's zone. A value of -1.0 indicates this marker is not zoned.

Returns
The end position of the zone, -1.0 if not zoned

◆ getTriggerName()

constexpr const std::string & pathplanner::EventMarker::getTriggerName ( )
inlineconstexpr

Get the name of the trigger this marker will control

Returns
The name of the trigger

◆ getWaypointRelativePos()

constexpr double pathplanner::EventMarker::getWaypointRelativePos ( ) const
inlineconstexpr

Get the waypoint relative position of this marker

Returns
Waypoint relative position of this marker

The documentation for this class was generated from the following files: