2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
path_planning Namespace Reference

Classes

struct  ArmCompositePathDynamicConstraints
 
struct  ArmPathPoint
 
struct  ArmPathVelocity
 
struct  CompositeMPPath
 
struct  GenericMPPathPoint
 
struct  LineSegment
 
struct  PathDynamicsConstraints
 
struct  PathIntersection
 
struct  VelocityComponents
 

Typedefs

using ArmMPPathPoint = GenericMPPathPoint< ArmPathPoint, ArmPathVelocity >
 
using AngularMPPathPoint = GenericMPPathPoint< units::degree_t, units::degrees_per_second_t >
 
using LinearMPPathPoint = GenericMPPathPoint< units::inch_t, units::velocity::inches_per_second_t >
 
using ShoulderPoint = units::degree_t
 
using ExtensionPoint = units::inch_t
 
using BashGuardPoint = units::inch_t
 
using Polygon = std::vector< ArmPathPoint >
 
using ArmPath = std::vector< ArmPathPoint >
 
using ShoulderPath = std::vector< ShoulderPoint >
 
using ExtensionPath = std::vector< ExtensionPoint >
 
using BashGuardPath = std::vector< BashGuardPoint >
 
using ShoulderMPPathPoint = AngularMPPathPoint
 
using ExtensionMPPathPoint = LinearMPPathPoint
 
using BashGuardMPPathPoint = LinearMPPathPoint
 
using ArmMPPath = std::vector< ArmMPPathPoint >
 
using ShoulderMPPath = std::vector< ShoulderMPPathPoint >
 
using ExtensionMPPath = std::vector< ExtensionMPPathPoint >
 
using BashGuardMPPath = std::vector< BashGuardMPPathPoint >
 

Enumerations

enum class  Orientation { Colinear , Clockwise , Counterclockwise }
 

Functions

units::degree_t CalculateCuspAngle (const ArmPath &path, const size_t segmentIndex)
 
VelocityComponents DecomposeVelocity (const ArmMPPathPoint &pathPoint, const ArmPathPoint &armVector)
 
CompositeMPPath GenerateCompositeMPPath (ArmMPPath generalPath, const BashGuardMPPath &bashGuardPath, const ArmPathPoint &shoulderFulcrum, LifterSubsystem *lifter)
 
BashGuardMPPath GenerateProfiledBashGuard (const BashGuardPoint &startPoint, const BashGuardPoint &endPoint, const PathDynamicsConstraints &constraints, units::millisecond_t resolution=20_ms)
 
ArmMPPath GenerateProfiledPath (const ArmPath &initialPath, const PathDynamicsConstraints &constraints, const Polygon &avoidancePolygon, units::millisecond_t resolution=20_ms)
 
std::vector< units::inch_t > GenerateSegmentLengths (const path_planning::ArmPath &path)
 
template<typename SegmentIt , typename PathIt >
std::vector< frc::TrapezoidProfile< units::inch > > GenerateSegmentProfiles (SegmentIt segmentLengthsBegin, SegmentIt segmentLengthsEnd, PathIt pathBegin, PathIt pathEnd, const PathDynamicsConstraints &constraints)
 
std::vector< frc::TrapezoidProfile< units::inch > > GenerateContinuousSegmentProfiles (const std::vector< units::inch_t > &segmentLengths, const path_planning::ArmPath &path, const PathDynamicsConstraints &constraints)
 
template<typename PositionType , typename VelocityType >
std::vector< GenericMPPathPoint< PositionType, VelocityType > > PadProfile (const std::vector< GenericMPPathPoint< PositionType, VelocityType > > &profile, units::millisecond_t paddingTime, bool padFront)
 
Orientation GetOrientation (const ArmPathPoint &point1, const ArmPathPoint &point2, const ArmPathPoint &point3)
 
bool OnSegment (const ArmPathPoint &p, const ArmPathPoint &q, const ArmPathPoint &r)
 
bool SegmentsIntersect (const LineSegment &segment1, const LineSegment &segment2)
 
std::optional< ArmPathPointIntersection (const LineSegment &segment1, const LineSegment &segment2)
 
std::vector< LineSegmentPolygonSegments (const Polygon &polygon)
 
units::inch_t SegmentLength (const LineSegment &segment)
 
ArmPath KeepOut (const ArmPath &initialPath, const Polygon &avoidancePolygon)
 

Detailed Description

Typedef Documentation

◆ AngularMPPathPoint

using path_planning::AngularMPPathPoint = typedef GenericMPPathPoint<units::degree_t, units::degrees_per_second_t>

◆ ArmMPPath

using path_planning::ArmMPPath = typedef std::vector<ArmMPPathPoint>

◆ ArmMPPathPoint

◆ ArmPath

using path_planning::ArmPath = typedef std::vector<ArmPathPoint>

◆ BashGuardMPPath

◆ BashGuardMPPathPoint

◆ BashGuardPath

using path_planning::BashGuardPath = typedef std::vector<BashGuardPoint>

◆ BashGuardPoint

using path_planning::BashGuardPoint = typedef units::inch_t

◆ ExtensionMPPath

◆ ExtensionMPPathPoint

◆ ExtensionPath

using path_planning::ExtensionPath = typedef std::vector<ExtensionPoint>

◆ ExtensionPoint

using path_planning::ExtensionPoint = typedef units::inch_t

◆ LinearMPPathPoint

using path_planning::LinearMPPathPoint = typedef GenericMPPathPoint<units::inch_t, units::velocity::inches_per_second_t>

◆ Polygon

using path_planning::Polygon = typedef std::vector<ArmPathPoint>

◆ ShoulderMPPath

using path_planning::ShoulderMPPath = typedef std::vector<ShoulderMPPathPoint>

◆ ShoulderMPPathPoint

◆ ShoulderPath

using path_planning::ShoulderPath = typedef std::vector<ShoulderPoint>

◆ ShoulderPoint

using path_planning::ShoulderPoint = typedef units::degree_t

Enumeration Type Documentation

◆ Orientation

enum class path_planning::Orientation
strong
Enumerator
Colinear 
Clockwise 
Counterclockwise 

Function Documentation

◆ CalculateCuspAngle()

units::degree_t path_planning::CalculateCuspAngle ( const ArmPath path,
const size_t  segmentIndex 
)

◆ DecomposeVelocity()

VelocityComponents path_planning::DecomposeVelocity ( const ArmMPPathPoint pathPoint,
const ArmPathPoint armVector 
)

◆ GenerateCompositeMPPath()

CompositeMPPath path_planning::GenerateCompositeMPPath ( ArmMPPath  generalPath,
const BashGuardMPPath bashGuardPath,
const ArmPathPoint shoulderFulcrum,
LifterSubsystem lifter 
)

◆ GenerateContinuousSegmentProfiles()

std::vector< frc::TrapezoidProfile< units::inch > > path_planning::GenerateContinuousSegmentProfiles ( const std::vector< units::inch_t > &  segmentLengths,
const path_planning::ArmPath path,
const PathDynamicsConstraints constraints 
)

◆ GenerateProfiledBashGuard()

BashGuardMPPath path_planning::GenerateProfiledBashGuard ( const BashGuardPoint startPoint,
const BashGuardPoint endPoint,
const PathDynamicsConstraints constraints,
units::millisecond_t  resolution = 20_ms 
)

◆ GenerateProfiledPath()

ArmMPPath path_planning::GenerateProfiledPath ( const ArmPath initialPath,
const PathDynamicsConstraints constraints,
const Polygon avoidancePolygon,
units::millisecond_t  resolution = 20_ms 
)

◆ GenerateSegmentLengths()

std::vector< units::inch_t > path_planning::GenerateSegmentLengths ( const path_planning::ArmPath path)

◆ GenerateSegmentProfiles()

template<typename SegmentIt , typename PathIt >
std::vector< frc::TrapezoidProfile< units::inch > > path_planning::GenerateSegmentProfiles ( SegmentIt  segmentLengthsBegin,
SegmentIt  segmentLengthsEnd,
PathIt  pathBegin,
PathIt  pathEnd,
const PathDynamicsConstraints constraints 
)

◆ GetOrientation()

Orientation path_planning::GetOrientation ( const ArmPathPoint point1,
const ArmPathPoint point2,
const ArmPathPoint point3 
)

◆ Intersection()

std::optional< ArmPathPoint > path_planning::Intersection ( const LineSegment segment1,
const LineSegment segment2 
)

◆ KeepOut()

ArmPath path_planning::KeepOut ( const ArmPath initialPath,
const Polygon avoidancePolygon 
)

◆ OnSegment()

bool path_planning::OnSegment ( const ArmPathPoint p,
const ArmPathPoint q,
const ArmPathPoint r 
)

◆ PadProfile()

template<typename PositionType , typename VelocityType >
std::vector< GenericMPPathPoint< PositionType, VelocityType > > path_planning::PadProfile ( const std::vector< GenericMPPathPoint< PositionType, VelocityType > > &  profile,
units::millisecond_t  paddingTime,
bool  padFront 
)

◆ PolygonSegments()

std::vector< LineSegment > path_planning::PolygonSegments ( const Polygon polygon)

◆ SegmentLength()

units::inch_t path_planning::SegmentLength ( const LineSegment segment)

◆ SegmentsIntersect()

bool path_planning::SegmentsIntersect ( const LineSegment segment1,
const LineSegment segment2 
)